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(batcher): add block info to block proposal input #2237

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.37%. Comparing base (e3165c4) to head (f632fef).
Report is 633 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.37%   -21.74%     
===========================================
  Files          26      190      +164     
  Lines        1895    24158    +22263     
  Branches     1895    24158    +22263     
===========================================
+ Hits          760     4439     +3679     
- Misses       1100    19337    +18237     
- Partials       35      382      +347     

☔ 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
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/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 2823617 to 0326d0b Compare November 28, 2024 07:06
@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 0326d0b to 071c684 Compare November 28, 2024 07:56
Copy link

Benchmark movements:
tree_computation_flow performance regressed!
tree_computation_flow time: [34.803 ms 35.285 ms 35.842 ms]
change: [+1.2508% +2.6521% +3.9754%] (p = 0.00 < 0.05)
Performance has regressed.
Found 14 outliers among 100 measurements (14.00%)
3 (3.00%) high mild
11 (11.00%) high severe

@ArniStarkware ArniStarkware force-pushed the arni/batcher/block_builder_factory/proposal_block_input/add_thin_block_info branch from 071c684 to 91a3cc1 Compare November 28, 2024 09:18
@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/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)

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.

5 participants