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 2 times, most recently from e66e303 to a9db847 Compare April 27, 2026 12:54
@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 884a9c9 to efce945 Compare April 28, 2026 07:38
@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 835f655 to 0bf0c98 Compare April 28, 2026 07:51
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch from efce945 to 0bae0ef Compare April 28, 2026 07:51
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch from 0bf0c98 to 829aac8 Compare April 28, 2026 08:30
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch from 0bae0ef to 719f5eb Compare April 28, 2026 08:30
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposals_sliding_window branch from 829aac8 to cb40bde Compare April 28, 2026 11:29
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_strk_price_oracle_field_to_deps branch from 719f5eb to b217380 Compare April 28, 2026 11:29
@sirandreww-starkware sirandreww-starkware self-assigned this Apr 28, 2026
@sirandreww-starkware sirandreww-starkware marked this pull request as ready for review April 28, 2026 12:28
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 28, 2026

PR Summary

Medium Risk
Medium risk because it changes consensus-context state initialization and adds additional state-sync get_block calls (including a startup backfill loop), which could affect restart/sync behavior and performance if expectations or errors aren’t handled correctly.

Overview
Adds SNIP-35 fee tracking to the consensus context by maintaining a fixed-size FIFO window (VecDeque) of recently committed fee_proposal_fri values.

The window is updated when a block is committed (decision_reached) and when syncing a block (try_sync), and on first height it attempts to backfill the window by querying recent blocks from state sync to enable immediate fee_actual computation.

Test utilities were updated to provide a default state_sync_client.get_block expectation (returning BlockNotFound) and to allow building a context with a custom ContextConfig; an existing gas-price sync test was adjusted to register its specific get_block expectation before the new default.

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

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 2 potential issues.

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 cb40bde. Configure here.

Comment thread crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs Outdated
@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 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 from ec1e517 to 9c55e10 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 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
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.

2 participants