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

Inconsistent Validator Information Across Multiple Service Instances #1692

Merged
merged 103 commits into from
Oct 20, 2023

Conversation

nagdahimanshu
Copy link
Contributor

@nagdahimanshu nagdahimanshu commented Jun 8, 2023

What was the problem?

This PR resolves #1673

How was it solved?

  • Missing blocks job is skipped if the indexing is in progress
    • Active+Waiting job count is greater equal to 1000 (configurableThreshold)
    • Active+Waiting job count is lesser than equal to (currentHeight - genesisHeight + 1 - configurableThreshold).
  • Block indexing is sequential
    • For newBlock: Previous block must be indexed else schedule the previous block (higher priority)
    • For deleteBlock: Reschedule the job if the blockHeight is not indexed yet. If blockHeight is indexed continue only if the blockID matches.
  • Improve logging in:
    • blockchain-coordinator
  • Update accounts balances in a seperate job
  • Use a separate queue for each queue name

How was it tested?

  • Digital ocean droplets named:
    rc6-validator-incosistency-1-devnet-node-blocktime-4sec (seed),
    rc6-validator-incosistency-2-devnet-node-blocktime-4sec (peer),
    rc6-validator-incosistency-3-devnet-node-blocktime-4sec (peer)

Skip missing blocks scheduling job in some cases
Add log messages
…into 1673-fix-inconsistent-validator-information
@nagdahimanshu nagdahimanshu self-assigned this Jun 8, 2023
@codecov
Copy link

codecov bot commented Jun 8, 2023

Codecov Report

Merging #1692 (16e340b) into release/0.7.0 (f14c6c4) will increase coverage by 0.02%.
The diff coverage is 72.72%.

Impacted file tree graph

@@                Coverage Diff                @@
##           release/0.7.0    #1692      +/-   ##
=================================================
+ Coverage          66.82%   66.84%   +0.02%     
=================================================
  Files                298      298              
  Lines               5112     5128      +16     
  Branches             922      925       +3     
=================================================
+ Hits                3416     3428      +12     
- Misses              1696     1700       +4     
Files Coverage Δ
services/blockchain-indexer/config.js 100.00% <100.00%> (ø)
...hain-indexer/shared/dataService/business/events.js 79.43% <100.00%> (+0.19%) ⬆️
...ndexer/shared/dataService/business/feeEstimates.js 88.23% <100.00%> (+2.52%) ⬆️
...chain-indexer/shared/dataService/business/index.js 100.00% <ø> (ø)
...ces/blockchain-indexer/shared/dataService/index.js 100.00% <ø> (ø)
.../blockchain-indexer/shared/indexer/accountIndex.js 83.78% <ø> (ø)
services/export/shared/requestAll.js 62.50% <100.00%> (ø)
services/blockchain-indexer/shared/constants.js 51.85% <50.00%> (+1.14%) ⬆️

@sameersubudhi sameersubudhi self-assigned this Jun 19, 2023
@sameersubudhi sameersubudhi force-pushed the 1673-fix-inconsistent-validator-information branch 9 times, most recently from fc567b7 to 5722156 Compare June 23, 2023 13:07
@sameersubudhi sameersubudhi force-pushed the 1673-fix-inconsistent-validator-information branch 2 times, most recently from 7bb5e62 to e7619be Compare June 23, 2023 14:57
Makefile Outdated Show resolved Hide resolved
@nagdahimanshu
Copy link
Contributor Author

Looks good to me 👍

@sameersubudhi sameersubudhi merged commit 789d641 into release/0.7.0 Oct 20, 2023
8 checks passed
@sameersubudhi sameersubudhi deleted the 1673-fix-inconsistent-validator-information branch October 20, 2023 11:23
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.

3 participants