Skip to content

feature: implement proposer interface for consensus #2873

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

Merged
merged 17 commits into from
Jun 12, 2025

Conversation

rianhughes
Copy link
Contributor

@rianhughes rianhughes commented Jun 10, 2025

This PR implements the Proposer interface for the consensus layer. The proposer is responsible for generating block proposals, handling both empty and non-empty blocks depending on whether the mempool receives transactions within a given time window.

Notes:
Proposal timing: The caller is responsible for deciding:
* When to stop waiting for transactions and proceed with an empty block.
* When to stop executing transactions (in the non-empty block flow) and continue with proposal finalisation.

Gas strategy: This implementation reuses gas values from the previous block. Dynamic gas fee computation is out of scope of this PR, and probably requires SNs input.

Code reuse: Some logic is shared with the Validator PR. Either PR can be merged first without conflict.

closes #2887

Copy link

codecov bot commented Jun 10, 2025

Codecov Report

Attention: Patch coverage is 82.67717% with 22 lines in your changes missing coverage. Please review.

Project coverage is 74.49%. Comparing base (97d4c84) to head (e2d1ee3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
consensus/proposer/proposer.go 80.55% 15 Missing and 6 partials ⚠️
builder/builder.go 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2873      +/-   ##
==========================================
+ Coverage   74.40%   74.49%   +0.08%     
==========================================
  Files         229      230       +1     
  Lines       24867    24983     +116     
==========================================
+ Hits        18503    18610     +107     
- Misses       5134     5140       +6     
- Partials     1230     1233       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@rodrigo-pino rodrigo-pino left a comment

Choose a reason for hiding this comment

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

Looks good overall, will give a deeper check later. I appreciate the mindfulness of how input and output parameters are used by reference/value. Thank you!

Co-authored-by: Dat Duong <[email protected]>
Signed-off-by: Rian Hughes <[email protected]>
@NethermindEth NethermindEth deleted a comment from Omor12-2 Jun 11, 2025
@rodrigo-pino rodrigo-pino merged commit a1be202 into main Jun 12, 2025
20 checks passed
@rodrigo-pino rodrigo-pino deleted the rianhughes/tendermint-block-proposer-2 branch June 12, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MVP Tendermint Consensus algorithm [Tendermint] Implement Logic to Proposer Blocks (Builder Side)
3 participants