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(consensus): send BlockInfo from proposer #3908

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

asmaastarkware
Copy link
Contributor

@asmaastarkware asmaastarkware commented Feb 3, 2025

Ayelet is working on removing NonzerGasPrice, a lot of things gonna change..
so these changes are temporary.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Contributor Author

asmaastarkware commented Feb 3, 2025

@asmaastarkware asmaastarkware marked this pull request as ready for review February 3, 2025 10:23
@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/send_blockinfo_from_proposer branch 4 times, most recently from 8b81636 to b9f0b1e Compare February 3, 2025 14:02
@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/impl_default_for_blockinfo branch from 4792985 to d5289ea Compare February 4, 2025 08:49
@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/send_blockinfo_from_proposer branch 2 times, most recently from 3909f1d to 3eedbda Compare February 4, 2025 09:09
@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/impl_default_for_blockinfo branch from d5289ea to b8738c4 Compare February 4, 2025 09:09
@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/send_blockinfo_from_proposer branch from 3eedbda to 5762acc Compare February 4, 2025 09:13
@asmaastarkware asmaastarkware changed the base branch from asmaa/block_info/impl_default_for_blockinfo to graphite-base/3908 February 4, 2025 09:25
@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/send_blockinfo_from_proposer branch from 5762acc to 62967aa Compare February 4, 2025 09:25
@asmaastarkware asmaastarkware changed the base branch from graphite-base/3908 to asmaa/block_info/add_to_proposalpart February 4, 2025 09:25
Copy link
Contributor

@guy-starkware guy-starkware 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 r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @asmaastarkware)


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 403 at r1 (raw file):

        self.cende_ambassador
            .prepare_blob_for_next_height(BlobParameters {
                // TODO(dvir): use the real `BlockInfo` when consensus will save it.

Maybe we can remove this TODO?

@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/add_to_proposalpart branch from 309289d to 87cbbc9 Compare February 4, 2025 09:47
@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/send_blockinfo_from_proposer branch from 62967aa to e76616d Compare February 4, 2025 09:47
Base automatically changed from asmaa/block_info/add_to_proposalpart to main February 4, 2025 13:03
@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/send_blockinfo_from_proposer branch from e76616d to 7b45f1b Compare February 4, 2025 13:32
Copy link
Contributor Author

@asmaastarkware asmaastarkware 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 8 files reviewed, 1 unresolved discussion (waiting on @guy-starkware and @matan-starkware)


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 403 at r1 (raw file):

Previously, guy-starkware wrote…

Maybe we can remove this TODO?

@matan-starkware WDYT about storing last_block_info when building/validating the block?

Copy link
Contributor

@matan-starkware matan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 8 files at r2, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @asmaastarkware and @guy-starkware)


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 403 at r1 (raw file):

Previously, asmaastarkware (asmaa-starkware) wrote…

@matan-starkware WDYT about storing last_block_info when building/validating the block?

Good catch, do this in another PR


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 596 at r2 (raw file):

        timestamp: now.timestamp().try_into().expect("Failed to convert timestamp"),
        builder: proposal_init.proposer,
        l1_da_mode: L1DataAvailabilityMode::Blob,

Confirming you plan to make this part of the config

Code quote:

        l1_da_mode: L1DataAvailabilityMode::Blob,

crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 610 at r2 (raw file):

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

crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 847 at r2 (raw file):

        Some(ProposalPart::BlockInfo(_)) => {
            // TODO(Asmaa): Validate the block info.
            HandledProposalPart::Continue

We should make sure to receive this before we enter this loop. Inside of handle part this is like receiving Init (invalid proposal)

Code quote:

            // TODO(Asmaa): Validate the block info.
            HandledProposalPart::Continue

crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 874 at r2 (raw file):

        }
        // TODO(Asmaa): Handle invalid proposal part by aborting the proposal, not the node.
        _ => panic!("Invalid proposal part: {:?}", proposal_part),

Suggestion:

 HandledProposalPart::Failed

@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/send_blockinfo_from_proposer branch from 7b45f1b to e6c0105 Compare February 5, 2025 14:10
Copy link
Contributor Author

@asmaastarkware asmaastarkware 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: all files reviewed, 5 unresolved discussions (waiting on @guy-starkware and @matan-starkware)


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 403 at r1 (raw file):

Previously, matan-starkware wrote…

Good catch, do this in another PR

👍


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 596 at r2 (raw file):

Previously, matan-starkware wrote…

Confirming you plan to make this part of the config

next PR


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 847 at r2 (raw file):

Previously, matan-starkware wrote…

We should make sure to receive this before we enter this loop. Inside of handle part this is like receiving Init (invalid proposal)

yes, handled correctly next PR


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 610 at r2 (raw file):

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

Done.


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 874 at r2 (raw file):

        }
        // TODO(Asmaa): Handle invalid proposal part by aborting the proposal, not the node.
        _ => panic!("Invalid proposal part: {:?}", proposal_part),

Done.

Copy link

github-actions bot commented Feb 5, 2025

Artifacts upload workflows:

Copy link
Contributor

@matan-starkware matan-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 8 files at r3, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @asmaastarkware and @guy-starkware)


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 610 at r2 (raw file):

Previously, asmaastarkware (asmaa-starkware) wrote…

Done.

I don't see any change

Copy link
Contributor Author

@asmaastarkware asmaastarkware 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: all files reviewed, 2 unresolved discussions (waiting on @guy-starkware and @matan-starkware)


crates/starknet_consensus_orchestrator/src/sequencer_consensus_context.rs line 610 at r2 (raw file):

Previously, matan-starkware wrote…

I don't see any change

Done.

@asmaastarkware asmaastarkware force-pushed the asmaa/block_info/send_blockinfo_from_proposer branch from e6c0105 to 335dd41 Compare February 6, 2025 08:07
@matan-starkware matan-starkware self-requested a review February 6, 2025 11:47
Copy link
Contributor

@matan-starkware matan-starkware 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 r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @guy-starkware)

Copy link
Contributor

@guy-starkware guy-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @asmaastarkware)

@asmaastarkware asmaastarkware added this pull request to the merge queue Feb 6, 2025
Copy link
Contributor

@guy-starkware guy-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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @asmaastarkware)

Merged via the queue into main with commit ce69f8a Feb 6, 2025
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 8, 2025
@asmaastarkware asmaastarkware deleted the asmaa/block_info/send_blockinfo_from_proposer branch February 13, 2025 11:13
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.

4 participants