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

go/consensus/cometbft/roothash: Publish the last block on subscribe #6083

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

peternose
Copy link
Contributor

Replaying the latest block with a hook was not ideal because if the broker still had blocks in the queue while adding a new subscription, it could result in an unexpected block order and potentially cause the last block to be replayed twice.

Solution with monotonically increasing order solved this problem, but there is a simpler one where we use broker's option to publish the last block on subscription.

These changes ensure the latest block is correctly replayed,
eliminating the need to enforce monotonically increasing blocks.
Copy link

netlify bot commented Feb 25, 2025

Deploy Preview for oasisprotocol-oasis-core canceled.

Name Link
🔨 Latest commit d3b09e3
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-oasis-core/deploys/67bd9e2932319b0008ea70d7

Copy link

codecov bot commented Feb 25, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 65.26%. Comparing base (90ff4c1) to head (d3b09e3).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
go/consensus/cometbft/roothash/roothash.go 57.14% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6083      +/-   ##
==========================================
+ Coverage   64.86%   65.26%   +0.40%     
==========================================
  Files         636      636              
  Lines       64641    64621      -20     
==========================================
+ Hits        41929    42178     +249     
+ Misses      17823    17535     -288     
- Partials     4889     4908      +19     

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

@peternose peternose marked this pull request as ready for review February 25, 2025 12:02
Copy link
Member

@kostko kostko left a comment

Choose a reason for hiding this comment

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

🤣

@peternose peternose merged commit fe4d632 into master Feb 25, 2025
6 of 7 checks passed
@peternose peternose deleted the peternose/trivial/simplify-roothash-watch-blocks branch February 25, 2025 15:14
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