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 snapsync issue with forest #5776

Merged
merged 4 commits into from
Aug 21, 2023

Conversation

matkt
Copy link
Contributor

@matkt matkt commented Aug 21, 2023

PR description

Fixing an issue during snapsync with forest related to the heal step

the step checking whether the node existed or not during the healing process could lead to a null pointer exception due to the null nodeHash, which was only utilized within the context of forest.

Fixed Issue(s)

@github-actions
Copy link

github-actions bot commented Aug 21, 2023

  • 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

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

matkt commented Aug 21, 2023

Tests done

Scenario/StorageFormat BONSAI  FOREST
Initial Snapsync

@matkt matkt marked this pull request as ready for review August 21, 2023 12:25
Copy link
Contributor

@fab-10 fab-10 left a comment

Choose a reason for hiding this comment

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

LGTM this fix the sync on the Sepolia instance, just a style suggestion.

Comment on lines 82 to 84
public Optional<Bytes> getUnSafeTrieNode(final Bytes key) {
return keyValueStorage.get(key.toArrayUnsafe()).map(Bytes::wrap);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

a style suggestion, rename method to getTrieNodeUnsafe to uniform with other unsafe methods like toArrayUnsafe

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
@matkt matkt enabled auto-merge (squash) August 21, 2023 13:44
@matkt matkt merged commit 2bced4e into hyperledger:main Aug 21, 2023
8 checks passed
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Aug 28, 2023
Fixing an issue during snapsync with forest related to the heal step

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Aug 28, 2023
Fixing an issue during snapsync with forest related to the heal step

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Aug 28, 2023
Fixing an issue during snapsync with forest related to the heal step

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Fixing an issue during snapsync with forest related to the heal step

Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
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