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

Invalid field in notify_block_metadata for geyser #33829

Closed
RequescoS opened this issue Oct 24, 2023 · 0 comments · Fixed by #33873
Closed

Invalid field in notify_block_metadata for geyser #33829

RequescoS opened this issue Oct 24, 2023 · 0 comments · Fixed by #33873

Comments

@RequescoS
Copy link

RequescoS commented Oct 24, 2023

Here bank.parent_hash() used as parent_blockhash for notify_block_metadata() func and futher send as parent_blockhash field into GeyserPlugin notify_block_metadata():
https://github.com/solana-labs/solana/blob/421b1d4f88148064f5f91eaf24d2481caea1ea3a/core/src/replay_stage.rs#L2844C25-L2844C57
This field in fact incorrect, because parent_blockhash must represent blockhash, but not a hash of parent block
I propose to add here
https://github.com/solana-labs/solana/blob/667bc163426aa075e127d7e58e06ffb11f9e20a2/runtime/src/bank.rs#L1561C15-L1561C15
not only parent_hash, but also parent_blockhash field and build it as parent_blockhash: parent.last_blockhash()
And futher use this field instead of parent_hash for notify_block_metadata

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 a pull request may close this issue.

1 participant