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] Lower bound the batch proposal production time #3193

Merged
merged 10 commits into from
Apr 3, 2024

Conversation

raychu86
Copy link
Contributor

Motivation

This PR lower bounds the production and signing of batch proposals. Previously this was unguarded, so blocks could be produced as fast as validators could find subdags to commit. This could lead to much shorter block times, especially if malicious validators decide to keep proposals empty to bring down block times.

This is important, because lowering the block time increases the number of blocks produced, which in turn advances the amount of block rewards paid out. The fix is to enforce that the difference in time between an author's proposals must be at least MAX_BATCH_DELAY_IN_SECS.

Test Plan

Existing tests have been updated to reflect the rule change for a minimum elapsed time between batch proposals.
New tests have also been added to enforce that batch proposals that are created too quickly are not signed.

node/bft/src/lib.rs Outdated Show resolved Hide resolved
@howardwu howardwu merged commit e26c608 into mainnet-staging Apr 3, 2024
24 checks passed
@howardwu howardwu deleted the min-proposal-time branch April 3, 2024 21:34
@howardwu howardwu changed the title Lower bound the batch proposal production time [Fix] Lower bound the batch proposal production time Apr 12, 2024
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