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

Add helper function to derive the reward cycle from NakamotoBlock to which the block belongs #5671

Open
jferrant opened this issue Jan 8, 2025 · 0 comments

Comments

@jferrant
Copy link
Collaborator

jferrant commented Jan 8, 2025

Signers trust that the reward cycle listed in a BlockProposal is the valid reward cycle of the block being proposed. It will cause them to store it in their signerdb against this reward cycle. I do not think we should explicitly trust this value as a malicious miner could bypass reward cycle checks in the signer by simply overwriting this value. The wrong signers could inadvertently sign a block proposal and then enter into an infinite loop attempting to broadcast it to the node when its actually invalid.

Signers should use this helper function when storing the Block inside their signerdb instead of the one listed in the block proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

1 participant