Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/sync missing trie nodes #4616

Merged
merged 91 commits into from May 24, 2023
Merged

Conversation

BeniaminDrasovean
Copy link
Contributor

@BeniaminDrasovean BeniaminDrasovean commented Oct 20, 2022

Description of the reasoning behind the pull request (what feature was missing / how the problem was manifesting itself / what was the motive behind the refactoring)

  • If there was a bug during processing and a trie node is missing (either because it was deleted or because it was never saved in the first place), that validator will not be able to move forward with blocks processing.

Proposed Changes

  • When a missing trie node is reached, sync it from the network. This way, the network nodes will be able to repair themselves.

Testing procedure

  • Run a test in which some random trie nodes are not saved in storage, and check that they are synced from the network.
  • Normal testing procedure should work.

@BeniaminDrasovean BeniaminDrasovean self-assigned this Oct 20, 2022
@BeniaminDrasovean BeniaminDrasovean marked this pull request as ready for review May 19, 2023 09:22
gabi-vuls
gabi-vuls previously approved these changes May 24, 2023
Copy link
Collaborator

@gabi-vuls gabi-vuls left a comment

Choose a reason for hiding this comment

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

System test passed.
@@ Log scanner @@

sync-missing-trie-nodes

================================================================================

  • Known Warnings 9
  • New Warnings 3
  • Known Errors 0
  • New Errors 0
  • Panics 0
    ================================================================================
  • block hash does not match 7844
  • wrong nonce in block 2827
  • miniblocks does not match 0
  • num miniblocks does not match 0
  • miniblock hash does not match 0
  • block bodies does not match 0
  • receipts hash missmatch 0
    ================================================================================
  • No jailed nodes on the testnet
    ================================================================================

@BeniaminDrasovean BeniaminDrasovean merged commit d3ebeb7 into rc/v1.6.0 May 24, 2023
5 checks passed
@BeniaminDrasovean BeniaminDrasovean deleted the feat/sync-missing-trie-nodes branch May 24, 2023 09:01
@schimih schimih added the type:feature New feature or request label May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants