Skip to content

apollo_consensus_orchestrator: include fee_proposal_fri in proposal commitment hash#13949

Merged
sirandreww-starkware merged 1 commit into
mainfrom
05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash
May 25, 2026
Merged

apollo_consensus_orchestrator: include fee_proposal_fri in proposal commitment hash#13949
sirandreww-starkware merged 1 commit into
mainfrom
05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash

Conversation

@sirandreww-starkware
Copy link
Copy Markdown
Contributor

No description provided.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@sirandreww-starkware sirandreww-starkware self-assigned this May 3, 2026
@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch from 1550bb9 to 938efa4 Compare May 3, 2026 13:11
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_wire_snip-35_fee_proposal_into_build_proposal branch 2 times, most recently from 5492f1a to 99f41f5 Compare May 3, 2026 14:34
@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch from 938efa4 to 61da281 Compare May 3, 2026 14:34
@sirandreww-starkware sirandreww-starkware marked this pull request as ready for review May 4, 2026 06:07
@cursor
Copy link
Copy Markdown

cursor Bot commented May 4, 2026

PR Summary

High Risk
Changes the consensus commitment identity validators and reproposals depend on; a mismatch on fee_proposal between proposer and validator would reject otherwise valid blocks.

Overview
SNIP-35 proposal commitments now mix in the proposer’s fee_proposal_fri instead of using only the batcher’s partial block hash. A shared helper proposal_commitment_from in snip35 returns the legacy hash when fee_proposal is None (pre-V0_14_3) and Poseidon(partial, fee_proposal_fri) when it is set, so consensus cannot agree on one fee in ProposalInit and another in the signed commitment.

Build, validate, and stored proposals all use the same rule: the proposer passes its computed fee; the validator uses init.fee_proposal_fri when finishing validation; BuiltProposals::insert_proposal hashes with the init’s fee. Cende blob wiring maps parent commitments through the same helper (parent fee still None with a TODO). Tests and proposal_init / send_proposal_to_validator_context were updated so default expectations use 8 gwei and the matching Poseidon commitment.

Reviewed by Cursor Bugbot for commit b5155ff. Bugbot is set up for automated code reviews on this repo. Configure here.

@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch from 61da281 to b64fa48 Compare May 4, 2026 07:11
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_wire_snip-35_fee_proposal_into_build_proposal branch from 99f41f5 to a2dc0e3 Compare May 4, 2026 07:11
@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch from b64fa48 to 4ddafee Compare May 4, 2026 11:14
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_wire_snip-35_fee_proposal_into_build_proposal branch from a2dc0e3 to 592c2d8 Compare May 4, 2026 11:14
@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch from 4ddafee to 433b30d Compare May 4, 2026 13:20
@sirandreww-starkware sirandreww-starkware force-pushed the 05-06-apollo_starknet_client_read_fee_proposal_fri_from_feeder_gateway branch from 0cb7e63 to ff3ce91 Compare May 20, 2026 08:55
@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch from ddfa623 to 5da3ec4 Compare May 20, 2026 08:55
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5da3ec4. Configure here.

Comment thread crates/apollo_consensus_orchestrator/src/snip35/mod.rs
@sirandreww-starkware sirandreww-starkware force-pushed the 05-06-apollo_starknet_client_read_fee_proposal_fri_from_feeder_gateway branch from ff3ce91 to d2c3508 Compare May 20, 2026 09:08
@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch 2 times, most recently from 4554fa7 to 9059e1a Compare May 20, 2026 09:22
@sirandreww-starkware sirandreww-starkware force-pushed the 05-06-apollo_starknet_client_read_fee_proposal_fri_from_feeder_gateway branch 2 times, most recently from 9f77b84 to f12b4e1 Compare May 20, 2026 10:41
@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch from 9059e1a to e4d040f Compare May 20, 2026 10:41
@sirandreww-starkware sirandreww-starkware force-pushed the 05-06-apollo_starknet_client_read_fee_proposal_fri_from_feeder_gateway branch from f12b4e1 to 5452c0f Compare May 20, 2026 10:55
@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch from e4d040f to 3bf5190 Compare May 20, 2026 10:55
@sirandreww-starkware sirandreww-starkware force-pushed the 05-06-apollo_starknet_client_read_fee_proposal_fri_from_feeder_gateway branch from 5452c0f to 1ce455d Compare May 20, 2026 11:21
@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch 2 times, most recently from 09ac68f to 84d4186 Compare May 20, 2026 11:35
@sirandreww-starkware sirandreww-starkware force-pushed the 05-06-apollo_starknet_client_read_fee_proposal_fri_from_feeder_gateway branch from 1ce455d to 1fc740a Compare May 20, 2026 11:35
Copy link
Copy Markdown
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

:lgtm:

@ShahakShama reviewed 8 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on matanl-starkware and sirandreww-starkware).


a discussion (no related file):
@matanl-starkware should review as well


crates/apollo_consensus_orchestrator/src/test_utils.rs line 434 at r4 (raw file):

        // helper to fabricate an init that matches what the proposer emits, so proposer and
        // validator agree on the proposal commitment hash.
        fee_proposal_fri: Some(GasPrice(8_000_000_000)),

Extract 8000000000 to a constant

@sirandreww-starkware sirandreww-starkware force-pushed the 05-03-apollo_consensus_orchestrator_include_fee_proposal_fri_in_proposal_commitment_hash branch from 84d4186 to be9ae02 Compare May 20, 2026 13:45
@sirandreww-starkware sirandreww-starkware force-pushed the 05-06-apollo_starknet_client_read_fee_proposal_fri_from_feeder_gateway branch 2 times, most recently from 14f935a to 67d7df4 Compare May 20, 2026 17:31
Copy link
Copy Markdown
Collaborator

@matanl-starkware matanl-starkware left a comment

Choose a reason for hiding this comment

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

@matanl-starkware reviewed 8 files and all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on sirandreww-starkware).

Copy link
Copy Markdown
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

@ShahakShama reviewed 3 files and all commit messages, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on sirandreww-starkware).

Copy link
Copy Markdown
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

@ShahakShama resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on sirandreww-starkware).

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