Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Fix transaction history report #2021

Merged
merged 27 commits into from
Feb 8, 2024

Conversation

sameersubudhi
Copy link
Contributor

@sameersubudhi sameersubudhi commented Feb 2, 2024

What was the problem?

This PR resolves #2020

How was it solved?

  • Refactor code & clean dead code
  • Introduces flexibility in job scheduling (depending on request params and live index status)
  • Fix reporting logic (now completely event driven)
  • Adds handling for missing scenarios
  • Cache (LRU) public keys in-memory
  • Increase moleculer broker timeouts to 10s
  • Add auto job rescheduling
  • Update final report structure to be lean and notes to be short & precise
  • Fix existing unit tests
  • Add new unit tests
  • Improved logging in queue (microservice param validations)

How was it tested?

  • Ran against both mainnet and testnet on multiple servers
  • Exported history for various addresses during different phases of indexing

services/export/shared/helpers/account.js Fixed Show fixed Hide fixed
services/export/shared/helpers/account.js Dismissed Show dismissed Hide dismissed
services/export/shared/helpers/account.js Dismissed Show dismissed Hide dismissed
services/export/shared/helpers/chain.js Dismissed Show dismissed Hide dismissed
services/export/shared/helpers/file.js Dismissed Show dismissed Hide dismissed
services/export/shared/transactionsExport.js Dismissed Show dismissed Hide dismissed
services/export/shared/transactionsExport.js Dismissed Show dismissed Hide dismissed
services/export/shared/transactionsExport.js Fixed Show fixed Hide fixed
services/export/shared/transactionsExport.js Dismissed Show dismissed Hide dismissed
services/export/shared/transactionsExport.js Dismissed Show dismissed Hide dismissed
@sameersubudhi sameersubudhi force-pushed the 2020-fix-transaction-history-report branch 6 times, most recently from 9936271 to 7802b79 Compare February 5, 2024 18:43
@sameersubudhi sameersubudhi force-pushed the 2020-fix-transaction-history-report branch from 7802b79 to da085fe Compare February 5, 2024 19:05
Copy link

@ishantiw ishantiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, I will go through the transactionExport file again to double check

services/export/shared/helpers/account.js Outdated Show resolved Hide resolved
@sameersubudhi sameersubudhi force-pushed the 2020-fix-transaction-history-report branch from ddd138d to d65822e Compare February 6, 2024 11:18
@sameersubudhi sameersubudhi force-pushed the 2020-fix-transaction-history-report branch 2 times, most recently from 1bc3a76 to 1e9bba2 Compare February 6, 2024 19:01
@sameersubudhi sameersubudhi force-pushed the 2020-fix-transaction-history-report branch from 1e9bba2 to cf01cdd Compare February 6, 2024 19:10
@nagdahimanshu nagdahimanshu force-pushed the 2020-fix-transaction-history-report branch from 3cdf63a to 7bd66a6 Compare February 6, 2024 20:48
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

Attention: 228 lines in your changes are missing coverage. Please review.

Comparison is base (c17581b) 68.33% compared to head (9032ed2) 67.89%.
Report is 1 commits behind head on development.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #2021      +/-   ##
===============================================
- Coverage        68.33%   67.89%   -0.44%     
===============================================
  Files              300      303       +3     
  Lines             5429     5704     +275     
  Branches           991     1081      +90     
===============================================
+ Hits              3710     3873     +163     
- Misses            1719     1831     +112     
Files Coverage Δ
services/blockchain-app-registry/config.js 100.00% <100.00%> (ø)
services/blockchain-indexer/shared/constants.js 54.11% <ø> (ø)
services/export/config.js 100.00% <100.00%> (ø)
services/export/shared/excelFieldMappings.js 100.00% <ø> (ø)
services/export/shared/helpers/array.js 100.00% <100.00%> (ø)
services/export/shared/helpers/constants.js 100.00% <100.00%> (ø)
services/export/shared/helpers/event.js 100.00% <100.00%> (ø)
services/export/shared/helpers/file.js 93.02% <100.00%> (+3.73%) ⬆️
services/export/shared/helpers/requestAll.js 64.10% <ø> (ø)
services/export/shared/helpers/time.js 100.00% <100.00%> (ø)
... and 9 more

@sameersubudhi sameersubudhi force-pushed the 2020-fix-transaction-history-report branch 2 times, most recently from d0c7ea3 to b81211f Compare February 7, 2024 06:45
@sameersubudhi sameersubudhi force-pushed the 2020-fix-transaction-history-report branch from b81211f to 5cf84dd Compare February 7, 2024 06:48
@sameersubudhi sameersubudhi force-pushed the 2020-fix-transaction-history-report branch from f720f55 to c3db14f Compare February 7, 2024 08:42
@sameersubudhi sameersubudhi force-pushed the 2020-fix-transaction-history-report branch from 24ca95d to cb22381 Compare February 7, 2024 09:38
@sameersubudhi sameersubudhi marked this pull request as ready for review February 7, 2024 10:45
Copy link

@ishantiw ishantiw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested scenarios taking regular account, validator account and account with incoming crossChainTransfer and looks good to me. Great job 👏

services/export/shared/transactionsExport.js Dismissed Show dismissed Hide dismissed
Copy link
Contributor

@nagdahimanshu nagdahimanshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@sameersubudhi sameersubudhi merged commit d566d68 into development Feb 8, 2024
8 of 10 checks passed
@sameersubudhi sameersubudhi deleted the 2020-fix-transaction-history-report branch February 8, 2024 17:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix transaction history report
3 participants