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

Snap sync client handle empty final account storage ranges #6295

Conversation

garyschulte
Copy link
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)

Copy link

  • 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
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
@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
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