Skip to content

apollo_consensus_manager: wire STRK/USD oracle into consensus manager#13820

Open
sirandreww-starkware wants to merge 1 commit into04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validationfrom
04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager
Open

apollo_consensus_manager: wire STRK/USD oracle into consensus manager#13820
sirandreww-starkware wants to merge 1 commit into04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validationfrom
04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager

Conversation

@sirandreww-starkware
Copy link
Copy Markdown
Contributor

No description provided.

This was referenced Apr 19, 2026
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 force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from 6bd60bb to 8020f60 Compare April 19, 2026 17:43
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from cfa6f7a to 10c280c Compare April 19, 2026 17:43
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from 8020f60 to c410076 Compare April 23, 2026 11:59
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from 10c280c to 209889b Compare April 23, 2026 11:59
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch 2 times, most recently from 79105cf to d756021 Compare April 27, 2026 12:39
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch 2 times, most recently from bb0cb82 to cec2942 Compare April 27, 2026 12:54
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from 397780c to def2345 Compare April 28, 2026 07:38
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch 3 times, most recently from 9d8504e to befb7bc Compare April 28, 2026 08:30
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from 04360da to abc579f Compare April 28, 2026 08:30
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from befb7bc to 0bff93b Compare April 28, 2026 11:29
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from abc579f to 040849d 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:29
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 28, 2026

PR Summary

Medium Risk
Enables SNIP-35 fee proposal logic to call an external STRK/USD oracle by default, which can affect gas pricing behavior and adds runtime dependency on correct oracle configuration.

Overview
Wires the STRK/USD exchange-rate oracle into apollo_consensus_manager by instantiating an ExchangeRateOracleClient and passing it into SequencerConsensusContextDeps (instead of None), enabling SNIP-35 dynamic fee_proposal computation.

Adds apollo_l1_gas_price and apollo_l1_gas_price_config dependencies, and documents that deployments must override the default ExchangeRateOracleConfig.url_header_list (default points to a placeholder) to avoid the oracle failing and fee_proposal freezing at fee_actual.

Reviewed by Cursor Bugbot for commit 74f5e86. 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 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 0bff93b. Configure here.

// (safe but static).
strk_exchange_rate_oracle: Some(Arc::new(ExchangeRateOracleClient::new(
apollo_l1_gas_price_config::config::ExchangeRateOracleConfig::default(),
))),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Always-failing oracle floods shared ETH_TO_STRK error metrics

Medium Severity

The new ExchangeRateOracleClient with the placeholder api.example.com URL will continuously fail, and each failure increments the global ETH_TO_STRK_ERROR_COUNT metric inside spawn_query. With lag_interval_seconds: 1 generating unique quantized timestamps, a new failing query is spawned on every block proposal (~every 3 seconds), producing ~1200 error increments per hour. The existing get_eth_to_strk_error_count_alert in alert_definitions.rs fires at a threshold of 10 per hour, so this will trigger constant false alerts and obscure genuine ETH/STRK oracle failures.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 0bff93b. Configure here.

@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from 0bff93b to 7d37870 Compare April 30, 2026 11:45
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from 040849d to 522bb06 Compare April 30, 2026 11:45
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from 7d37870 to b15f099 Compare April 30, 2026 12:25
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from 522bb06 to 0948acf Compare April 30, 2026 12:25
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from b15f099 to c693f3d Compare April 30, 2026 13:49
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from 0948acf to ab23186 Compare April 30, 2026 13:49
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from c693f3d to 7280b48 Compare May 1, 2026 15:11
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from ab23186 to 41b964d Compare May 1, 2026 15:11
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from 7280b48 to 641991e Compare May 1, 2026 15:44
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from 41b964d to 5896df2 Compare May 1, 2026 15:44
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from 641991e to f802115 Compare May 1, 2026 15:59
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from 5896df2 to ef7e93b Compare May 1, 2026 15:59
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation branch from ef7e93b to a965ac1 Compare May 1, 2026 17:05
@sirandreww-starkware sirandreww-starkware force-pushed the 04-19-apollo_consensus_manager_wire_strk_usd_oracle_into_consensus_manager branch from f802115 to 74f5e86 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