Skip to content

Snap sync client handle empty final account storage ranges#6295

Closed
garyschulte wants to merge 10 commits intobesu-eth:mainfrom
garyschulte:bugfix/snap-empty-storage-ranges
Closed

Snap sync client handle empty final account storage ranges#6295
garyschulte wants to merge 10 commits intobesu-eth:mainfrom
garyschulte:bugfix/snap-empty-storage-ranges

Conversation

@garyschulte
Copy link
Copy Markdown
Contributor

PR description

Bugfix snap sync edge case. When snap syncing large contract storage, if the final requested range is empty, but there is an accompanying proof of exclusion, besu will not mark the request complete and will endlessly retry.

This PR handles this case by marking the request complete as long as there is an accompanying proof

Fixed Issue(s)

@github-actions
Copy link
Copy Markdown

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

@garyschulte garyschulte force-pushed the bugfix/snap-empty-storage-ranges branch 2 times, most recently from 85cb6ab to 73291e1 Compare December 14, 2023 22:24
@garyschulte garyschulte marked this pull request as ready for review December 14, 2023 22:24
@garyschulte garyschulte force-pushed the bugfix/snap-empty-storage-ranges branch from 73291e1 to b5a594c Compare December 18, 2023 18:10
&& Arrays.compare(location.toArrayUnsafe(), endKeyHash.toArrayUnsafe()) <= 0;
return location.isEmpty()
|| (Arrays.compare(location.toArrayUnsafe(), startKeyHash.toArrayUnsafe()) >= 0
&& Arrays.compare(location.toArrayUnsafe(), endKeyHash.toArrayUnsafe()) <= 0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@garyschulte garyschulte force-pushed the bugfix/snap-empty-storage-ranges branch 3 times, most recently from 7cff6d0 to d1abab6 Compare January 18, 2024 18:02
…as complete

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
…avoid throwing MerkleTrieException for failed lookups

Signed-off-by: garyschulte <garyschulte@gmail.com>
…roken persist test

Signed-off-by: garyschulte <garyschulte@gmail.com>
…hen the proof is valid and empty (request was complete)

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
@garyschulte garyschulte force-pushed the bugfix/snap-empty-storage-ranges branch from d1abab6 to a35239a Compare January 19, 2024 00:25
@garyschulte garyschulte marked this pull request as draft January 19, 2024 17:29
@garyschulte
Copy link
Copy Markdown
Contributor Author

superseded by #6847

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