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

chore(starknet_batcher): add block info to block proposal input #2237

Conversation

ArniStarkware
Copy link
Contributor

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

Artifacts upload triggered. View details here

Copy link

codecov bot commented Nov 24, 2024

Codecov Report

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

Project coverage is 18.17%. Comparing base (e3165c4) to head (51b84b7).
Report is 650 commits behind head on main.

Files with missing lines Patch % Lines
crates/starknet_api/src/block.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2237       +/-   ##
===========================================
- Coverage   40.10%   18.17%   -21.93%     
===========================================
  Files          26      190      +164     
  Lines        1895    24163    +22268     
  Branches     1895    24163    +22268     
===========================================
+ Hits          760     4392     +3632     
- Misses       1100    19393    +18293     
- Partials       35      378      +343     

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

Copy link
Contributor

@Yael-Starkware Yael-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @alonh5, @ArniStarkware, and @dafnamatsry)


crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 119 at r1 (raw file):

            }),
            // TODO: Fill thin block info.
            thin_block_info: Default::default(),

I think the code will be simpler if consensus passed the entire block_info and we check on our side that the height of the block_info equals the height we are currently working on.

Code quote:

thin_block_info

Copy link
Collaborator

@dafnamatsry dafnamatsry left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @alonh5 and @Yael-Starkware)


crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 119 at r1 (raw file):

Previously, Yael-Starkware (YaelD) wrote…

I think the code will be simpler if consensus passed the entire block_info and we check on our side that the height of the block_info equals the height we are currently working on.

+1

Copy link
Collaborator

@alonh5 alonh5 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @dafnamatsry and @Yael-Starkware)


crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 119 at r1 (raw file):

Previously, dafnamatsry wrote…

+1

👍

@ArniStarkware
Copy link
Contributor Author

crates/starknet_batcher_types/src/batcher_types.rs line 40 at r1 (raw file):

    // TODO: Should we get the gas price here?
    // TODO: add proposer address.
    // TODO: add whether the kzg mechanism is used for DA.

@yair-starkware This is where the next_block_info is first created, later to be used in the batcher's block builder factory. See this discussion: https://reviewable.io/reviews/starkware-libs/sequencer/2238#-OCSG6aO--m1mxj5ypZi

Code quote:

    // TODO: Should we get the gas price here?
    // TODO: add proposer address.
    // TODO: add whether the kzg mechanism is used for DA.

Copy link
Contributor Author

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @alonh5, @dafnamatsry, and @Yael-Starkware)


crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 119 at r1 (raw file):

Previously, alonh5 (Alon Haramati) wrote…

👍

Done.

Copy link
Collaborator

@alonh5 alonh5 left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @ArniStarkware, @dafnamatsry, and @Yael-Starkware)


crates/starknet_batcher_types/src/batcher_types.rs line 38 at r2 (raw file):

    pub deadline: chrono::DateTime<Utc>,
    pub retrospective_block_hash: Option<BlockHashAndNumber>,
    // TODO: Fill block info.

One TODO in the consensus is enough, you can remove these two.

Code quote:

// TODO: Fill block info.

crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 177 at r2 (raw file):

                hash: BlockHash::default(),
            }),
            // TODO: Fill thin block info.

Suggestion:

// TODO: Fill block info.

@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 66a6242 to 5a70511 Compare November 25, 2024 07:47
@ArniStarkware ArniStarkware requested a review from alonh5 November 25, 2024 07:48
Copy link
Contributor Author

@ArniStarkware ArniStarkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 of 5 files reviewed, 3 unresolved discussions (waiting on @alonh5, @dafnamatsry, and @Yael-Starkware)


crates/starknet_batcher_types/src/batcher_types.rs line 38 at r2 (raw file):

Previously, alonh5 (Alon Haramati) wrote…

One TODO in the consensus is enough, you can remove these two.

Done.


crates/sequencing/papyrus_consensus_orchestrator/src/sequencer_consensus_context.rs line 177 at r2 (raw file):

                hash: BlockHash::default(),
            }),
            // TODO: Fill thin block info.

Done.

@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 5a70511 to 90e2c47 Compare November 25, 2024 08:22
@ArniStarkware ArniStarkware force-pushed the arni/block_info/move_to_snapi branch from 2c6304f to ce229f2 Compare November 28, 2024 09:41
@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 91a3cc1 to a3b6c09 Compare November 28, 2024 09:41
@ArniStarkware ArniStarkware force-pushed the arni/block_info/move_to_snapi branch from ce229f2 to a60e8f1 Compare November 28, 2024 09:57
@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from a3b6c09 to 21891ba Compare November 28, 2024 09:58
@ArniStarkware ArniStarkware force-pushed the arni/block_info/move_to_snapi branch 2 times, most recently from f991001 to 41313e7 Compare November 28, 2024 10:18
@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 21891ba to 5540771 Compare November 28, 2024 10:19
@ArniStarkware ArniStarkware changed the base branch from arni/block_info/move_to_snapi to graphite-base/2237 November 28, 2024 10:43
@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 5540771 to a90de83 Compare November 28, 2024 10:43
@ArniStarkware ArniStarkware changed the base branch from graphite-base/2237 to main November 28, 2024 10:44
@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch 2 times, most recently from 263c815 to e1a8da8 Compare November 28, 2024 12:49
@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from e1a8da8 to f632fef Compare November 28, 2024 15:34
Copy link

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [35.036 ms 35.529 ms 36.105 ms]
change: [+1.1281% +2.4986% +4.2442%] (p = 0.00 < 0.05)
Performance has regressed.
Found 10 outliers among 100 measurements (10.00%)
10 (10.00%) high severe

Copy link
Collaborator

@alonh5 alonh5 left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r7, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dafnamatsry)

@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from f632fef to 9d77f07 Compare December 1, 2024 12:31
@ArniStarkware ArniStarkware changed the title chore(batcher): add block info to block proposal input chore(starknet_batcher): add block info to block proposal input Dec 1, 2024
@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 9d77f07 to 2377c06 Compare December 2, 2024 09:23
@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 2377c06 to 51b84b7 Compare December 2, 2024 12:58
Copy link
Collaborator

@alonh5 alonh5 left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r9, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dafnamatsry)

@ArniStarkware ArniStarkware merged commit 0bf74a9 into main Dec 2, 2024
19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants