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

Assert height to hash in contains block #19136

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

almogdepaz
Copy link
Contributor

@almogdepaz almogdepaz commented Jan 14, 2025

Purpose:

use the height to hash when checking for "contains_block" block that way we always get the relevant block for the fork
and create better separation between Augmentedblockchain and the underlining blockchain.

Current Behavior:

we call contains block that checks the block_record cache, this will return true if the block is in the cache regardless if is relevant to the chain

New Behavior:

contains_block will check the height_to_hash, the AugmentedBlockchain will return true for blocks that are in the fork and the underlining will return true only for blocks that are in the current chain

Testing Notes:

@almogdepaz almogdepaz added full_node sync Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog full_node sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant