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

feat(optimistic_block): produce #12761

Merged
merged 15 commits into from
Jan 23, 2025

Conversation

VanBarbascu
Copy link
Contributor

@VanBarbascu VanBarbascu commented Jan 20, 2025

We continue the implementation of Optimistic block #10584, by adding the logic to produce the block as soon as the previous block is done.

If available, the optimistic block will be used in the production of the block to use the same timestamp.

@VanBarbascu VanBarbascu requested a review from a team as a code owner January 20, 2025 14:09
@VanBarbascu VanBarbascu changed the title DOptimistic block/create feat(optimistic_block): produce Jan 20, 2025
@VanBarbascu VanBarbascu requested review from Longarithm and removed request for saketh-are January 20, 2025 14:10
@VanBarbascu VanBarbascu marked this pull request as draft January 20, 2025 14:10
Copy link
Member

@Longarithm Longarithm left a comment

Choose a reason for hiding this comment

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

Very nice! I think it can be merged after merging with master. Leaving mostly nits.

We can start thinking if something can already be unit-tested here. Maybe just run produce_optimistic, then produce and check that timestamps match. But it can be done later, and if setup is too hard, we'd have to make it simple first.

chain/client/src/client.rs Outdated Show resolved Hide resolved
chain/client/src/client.rs Outdated Show resolved Hide resolved
chain/client/src/client.rs Show resolved Hide resolved
chain/client/src/client.rs Outdated Show resolved Hide resolved
chain/client/src/client_actor.rs Outdated Show resolved Hide resolved
core/primitives/src/block.rs Outdated Show resolved Hide resolved
chain/client/src/client_actor.rs Outdated Show resolved Hide resolved
chain/client/src/client.rs Outdated Show resolved Hide resolved
@VanBarbascu VanBarbascu force-pushed the optimistic_block/create branch from 492e6e3 to 66b73c5 Compare January 20, 2025 16:02
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 82.58929% with 39 lines in your changes missing coverage. Please review.

Project coverage is 70.52%. Comparing base (59627f6) to head (cbbb0f9).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
chain/client/src/client.rs 76.37% 19 Missing and 11 partials ⚠️
chain/client/src/client_actor.rs 84.00% 2 Missing and 6 partials ⚠️
core/primitives-core/src/version.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #12761    +/-   ##
========================================
  Coverage   70.51%   70.52%            
========================================
  Files         846      846            
  Lines      174633   174782   +149     
  Branches   174633   174782   +149     
========================================
+ Hits       123149   123262   +113     
- Misses      46254    46276    +22     
- Partials     5230     5244    +14     
Flag Coverage Δ
backward-compatibility 0.16% <0.00%> (-0.01%) ⬇️
db-migration 0.16% <0.00%> (-0.01%) ⬇️
genesis-check 1.35% <0.00%> (-0.01%) ⬇️
linux 69.10% <43.43%> (+0.20%) ⬆️
linux-nightly 70.13% <83.33%> (+0.02%) ⬆️
pytests 1.64% <0.00%> (-0.01%) ⬇️
sanity-checks 1.46% <0.00%> (-0.01%) ⬇️
unittests 70.36% <82.58%> (+<0.01%) ⬆️
upgradability 0.20% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@VanBarbascu VanBarbascu force-pushed the optimistic_block/create branch 3 times, most recently from 64000a7 to 1c75f16 Compare January 23, 2025 14:23
@VanBarbascu VanBarbascu marked this pull request as ready for review January 23, 2025 14:24
Copy link
Member

@Longarithm Longarithm left a comment

Choose a reason for hiding this comment

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

LGTM

chain/client/src/client_actor.rs Outdated Show resolved Hide resolved
@VanBarbascu VanBarbascu enabled auto-merge January 23, 2025 19:30
@VanBarbascu VanBarbascu force-pushed the optimistic_block/create branch from 619074f to 276b198 Compare January 23, 2025 19:30
@VanBarbascu VanBarbascu added this pull request to the merge queue Jan 23, 2025
Merged via the queue into near:master with commit 81538fc Jan 23, 2025
23 of 24 checks passed
@VanBarbascu VanBarbascu deleted the optimistic_block/create branch January 23, 2025 20:17
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