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

Fix revert for trie diffs to include incomplete part as well #2610

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

paberr
Copy link
Member

@paberr paberr commented Jun 13, 2024

What's in this pull request?

Fix apply_diff to also record changes to the unknown part of the trie to properly revert those.

This fixes #2539.

Also fixes parts of #2162.

Pull request checklist

  • All tests pass. The project builds and runs.
  • I have resolved any merge conflicts.
  • I have resolved all clippy and rustfmt warnings.

@paberr paberr requested review from styppo, ii-cruz and hrxi June 13, 2024 15:35
@paberr paberr self-assigned this Jun 13, 2024
@paberr paberr added the bug Something isn't working label Jun 13, 2024
@paberr paberr added this to the Nimiq PoS Mainnet milestone Jun 13, 2024
@paberr paberr marked this pull request as ready for review June 13, 2024 17:18
Copy link
Member

@nibhar nibhar left a comment

Choose a reason for hiding this comment

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

Very good find!

blockchain/tests/push_with_chunks.rs Outdated Show resolved Hide resolved
primitives/trie/src/trie.rs Show resolved Hide resolved
@paberr
Copy link
Member Author

paberr commented Jun 14, 2024

Resolved the comments @nibhar

@jsdanielh jsdanielh merged commit 94f0f96 into albatross Jun 17, 2024
6 checks passed
@jsdanielh jsdanielh deleted the pb/trie branch June 17, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic: Inconsistent state after reverting block
3 participants