Skip to content

Fix storage range issue during snapsync#7624

Merged
matkt merged 6 commits intobesu-eth:mainfrom
matkt:feature/fix-snapsync
Oct 2, 2024
Merged

Fix storage range issue during snapsync#7624
matkt merged 6 commits intobesu-eth:mainfrom
matkt:feature/fix-snapsync

Conversation

@matkt
Copy link
Copy Markdown
Contributor

@matkt matkt commented Sep 16, 2024

PR description

Besu currently has a problem where, if it receives all storage slots at once without an accompanying proof, it correctly sets the end of the range to 0xFFF...FFFF. However, if all storage and a proof are received simultaneously, the logic mistakenly treats the end of the range as the last slot received rather than the expected end of the range. This discrepancy results in incomplete persistence of storage trie nodes.

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Signed-off-by: Karim Taam <karim.t2am@gmail.com>
@siladu
Copy link
Copy Markdown
Contributor

siladu commented Sep 26, 2024

Not sure how feasible it would be but would love to get an automated test around this. I think it should go in the next release regardless as it has passed a lot of manual sync testing #7620 (comment) so is a clear improvement

Signed-off-by: Karim Taam <karim.t2am@gmail.com>
@matkt
Copy link
Copy Markdown
Contributor Author

matkt commented Sep 30, 2024

added a new tests and also modified the AccountHealingTrackingTest class in order to verify and match the new behavior

@matkt matkt marked this pull request as ready for review September 30, 2024 08:41
@matkt matkt requested a review from siladu September 30, 2024 08:42
Copy link
Copy Markdown
Contributor

@siladu siladu left a comment

Choose a reason for hiding this comment

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

LGTM!

@siladu
Copy link
Copy Markdown
Contributor

siladu commented Oct 2, 2024

@matkt worth a changelog?

@matkt
Copy link
Copy Markdown
Contributor Author

matkt commented Oct 2, 2024

@matkt worth a changelog?

don't think it is needed for this one

@matkt matkt enabled auto-merge (squash) October 2, 2024 07:49
@matkt matkt merged commit 9310e10 into besu-eth:main Oct 2, 2024
2fehee added a commit to 2fehee/besu that referenced this pull request Oct 4, 2024
Signed-off-by: Karim Taam <karim.t2am@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>Signed-off-by: Chulhee lee <leefehee@naver.com>
@matkt matkt deleted the feature/fix-snapsync branch October 16, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants