Skip to content

apollo_consensus_orchestrator: add SNIP-35 fee_proposals sliding window#13817

Open
sirandreww-starkware wants to merge 1 commit into04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_depsfrom
04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window
Open

apollo_consensus_orchestrator: add SNIP-35 fee_proposals sliding window#13817
sirandreww-starkware wants to merge 1 commit into04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_depsfrom
04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window

Conversation

@sirandreww-starkware
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor Author

sirandreww-starkware commented Apr 19, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

@sirandreww-starkware sirandreww-starkware changed the base branch from 04-19-apollo_consensus_orchestrator_add_snip-35_metrics to graphite-base/13817 April 19, 2026 17:43
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch from 69fb04b to f876e52 Compare April 19, 2026 17:43
@sirandreww-starkware sirandreww-starkware changed the base branch from graphite-base/13817 to 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps April 19, 2026 17:43
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch from cf971d9 to ccb5be3 Compare April 23, 2026 11:59
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch from ede28f9 to 67ab4b6 Compare April 30, 2026 12:25
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch from 48bdd57 to 3f5a393 Compare April 30, 2026 12:25
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch from 67ab4b6 to eb2132c Compare April 30, 2026 13:49
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch 2 times, most recently from 29624cd to e0a29c8 Compare May 1, 2026 15:11
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch from eb2132c to 496e9f7 Compare May 1, 2026 15:11
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch from e0a29c8 to ec1e517 Compare May 1, 2026 15:44
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch 2 times, most recently from 365c687 to c02232e Compare May 1, 2026 15:59
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch 2 times, most recently from 9c55e10 to cb5b659 Compare May 1, 2026 17:05
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch from c02232e to 500f0ce Compare May 1, 2026 17:05
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch from cb5b659 to 01f8451 Compare May 3, 2026 07:01
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch 2 times, most recently from 16af896 to ac3e7d4 Compare May 3, 2026 12:59
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch from 32331eb to a14e00f Compare May 3, 2026 13:11
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch from ac3e7d4 to 2b0cc53 Compare May 3, 2026 13:11
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 2b0cc53. Configure here.

Comment thread crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs Outdated
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 5 files and all commit messages, and made 4 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on sirandreww-starkware).


crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 940 at r3 (raw file):

                        Err(e) => {
                            // Stop backfilling on the first error (likely `BlockNotFound` for
                            // heights before the chain was SNIP-35-enabled). The remaining window

if a height is before SNIP-35 you should get Ok(block with None fee proposal), not Err


crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 944 at r3 (raw file):

                            // are committed, falling back to `l2_gas_price`.
                            warn!(
                                "SNIP-35 backfill stopped at block {h}: {e:?}. Window has {} / \

stopped -> failed


crates/apollo_consensus_orchestrator/src/test_utils.rs line 328 at r3 (raw file):

    }

    /// Default get_block returns NotFound for all blocks. Used by SNIP-35 backfill on startup.

If you want to simulate real life you should return a regular block here with none proposal fee


crates/apollo_consensus_orchestrator/src/snip35/mod.rs line 27 at r3 (raw file):

pub(crate) const PPT_DENOMINATOR: u128 = 1000;

/// Number of fee_proposal values used to compute fee_actual (SNIP-35).

Add TODO to consider moving this to versioned constants

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.

@matanl-starkware should also review this

@ShahakShama made 1 comment.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on sirandreww-starkware).

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 made 1 comment.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on sirandreww-starkware).


crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 238 at r3 (raw file):

    l1_da_mode: L1DataAvailabilityMode,
    previous_proposal_init: Option<PreviousProposalInitInfo>,
    /// SNIP-35: sliding window of recent fee_proposal values (size from config).

At the moment, it's a const, and Shahak suggested making it a VC.
Either way - not config.

Code quote:

(size from config)

Copy link
Copy Markdown
Contributor Author

@sirandreww-starkware sirandreww-starkware left a comment

Choose a reason for hiding this comment

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

@sirandreww-starkware made 5 comments.
Reviewable status: 2 of 5 files reviewed, 4 unresolved discussions (waiting on ShahakShama).


crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 238 at r3 (raw file):

Previously, matanl-starkware (Matan Lior) wrote…

At the moment, it's a const, and Shahak suggested making it a VC.
Either way - not config.

Done +-


crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 940 at r3 (raw file):

Previously, ShahakShama wrote…

if a height is before SNIP-35 you should get Ok(block with None fee proposal), not Err

Done.


crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 944 at r3 (raw file):

Previously, ShahakShama wrote…

stopped -> failed

Done.


crates/apollo_consensus_orchestrator/src/test_utils.rs line 328 at r3 (raw file):

Previously, ShahakShama wrote…

If you want to simulate real life you should return a regular block here with none proposal fee

Done


crates/apollo_consensus_orchestrator/src/snip35/mod.rs line 27 at r3 (raw file):

Previously, ShahakShama wrote…

Add TODO to consider moving this to versioned constants

Done.

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.

4 participants