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): Introduce the optimistic block struct #12730

Merged

Conversation

VanBarbascu
Copy link
Contributor

@VanBarbascu VanBarbascu commented Jan 13, 2025

This PR introduces the shape of the optimistic block described in #10584.
Along with it I have added the functions to create and sign it. In the next PR,
I will link this in the path of the block production.

@VanBarbascu VanBarbascu force-pushed the optimistic_block/optimistic_block_struct branch from 070942e to e3eea28 Compare January 17, 2025 09:49
@VanBarbascu VanBarbascu changed the title [WIP] Optimistic block feat(optimistic_block): Introduce the optimistic block struct Jan 17, 2025
@VanBarbascu VanBarbascu marked this pull request as ready for review January 17, 2025 09:49
@VanBarbascu VanBarbascu requested a review from a team as a code owner January 17, 2025 09:49
@VanBarbascu VanBarbascu requested review from akhi3030 and Longarithm and removed request for akhi3030 January 17, 2025 09:49
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.

The structure makes sense but now I see that we need to follow some patterns to ensure that structure can be hashed and verified nicely.

core/primitives/src/optimistic_block.rs Outdated Show resolved Hide resolved
core/primitives/src/optimistic_block.rs Show resolved Hide resolved
core/primitives/src/optimistic_block.rs Outdated Show resolved Hide resolved
core/primitives/src/optimistic_block.rs Outdated Show resolved Hide resolved
core/primitives/src/optimistic_block.rs Outdated Show resolved Hide resolved
core/primitives/src/optimistic_block.rs Outdated Show resolved Hide resolved
core/primitives/src/optimistic_block.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 0% with 40 lines in your changes missing coverage. Please review.

Project coverage is 70.70%. Comparing base (da97178) to head (702fae6).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
core/primitives/src/optimistic_block.rs 0.00% 40 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12730      +/-   ##
==========================================
- Coverage   70.72%   70.70%   -0.03%     
==========================================
  Files         849      850       +1     
  Lines      174681   174721      +40     
  Branches   174681   174721      +40     
==========================================
- Hits       123544   123531      -13     
- Misses      45959    46011      +52     
- Partials     5178     5179       +1     
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.17% <0.00%> (-0.02%) ⬇️
linux-nightly 70.30% <0.00%> (-0.02%) ⬇️
pytests 1.64% <0.00%> (-0.01%) ⬇️
sanity-checks 1.46% <0.00%> (-0.01%) ⬇️
unittests 70.53% <0.00%> (-0.03%) ⬇️
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/optimistic_block_struct branch from fda077c to af24d4c Compare January 17, 2025 17:05
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.

Approving but please look at the comments.

core/primitives/src/optimistic_block.rs Outdated Show resolved Hide resolved
core/primitives/src/optimistic_block.rs Outdated Show resolved Hide resolved
core/primitives/src/optimistic_block.rs Outdated Show resolved Hide resolved
core/primitives/src/stateless_validation/mod.rs Outdated Show resolved Hide resolved
@VanBarbascu VanBarbascu force-pushed the optimistic_block/optimistic_block_struct branch from fc86073 to 374183e Compare January 20, 2025 12:55
This PR introduces the shape of the optimistic block described in near#10584.
Along with it I have added the functions to create and sign it. In the next PR,
I will link this in the path of the block production.
@VanBarbascu VanBarbascu force-pushed the optimistic_block/optimistic_block_struct branch from 374183e to ec2482f Compare January 20, 2025 13:05
@VanBarbascu VanBarbascu force-pushed the optimistic_block/optimistic_block_struct branch from ec2482f to 702fae6 Compare January 20, 2025 13:28
@VanBarbascu VanBarbascu added this pull request to the merge queue Jan 20, 2025
Merged via the queue into near:master with commit 9b626a7 Jan 20, 2025
26 of 28 checks passed
@VanBarbascu VanBarbascu deleted the optimistic_block/optimistic_block_struct branch January 20, 2025 15:42
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