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

replay: populate block_id and send as part of TowerSync tx #2776

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AshwinSekar
Copy link

@AshwinSekar AshwinSekar commented Aug 28, 2024

Problem

The block_id returned after completing the final fec set checks is unused.

Summary of Changes

Add the block_id to the bank (not yet serialized / deserialized) in order to be populated on the TowerSync vote.
Note that this block_id will be None in the case that the bank is our leader bank. This is because we cannot guarantee the shred will be ready.

We can adjust this approach to hold the vote until the last shred is finished, or to simply resend the vote once the last shred is finished (this would involve messing with the timestamp or deduplication code).

/// The unique identifier for the corresponding block for this bank.
/// None for banks that have not yet completed replay or for leader banks as we cannot populate block_id
/// until bankless leader. Can be computed directly from shreds without needing to execute transactions.
block_id: RwLock<Option<Hash>>,
Copy link
Author

Choose a reason for hiding this comment

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

Haven't yet added this to the serialized format. This will be done as part of bankless leader in order to add block_id to bank_hash (see AshwinSekar@d351d15)

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.

1 participant