-
Notifications
You must be signed in to change notification settings - Fork 68
apollo_consensus_manager: wire STRK/USD oracle into consensus manager #13820
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
base: 04-19-apollo_consensus_orchestrator_add_snip-35_fee_proposal_validation
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ use apollo_consensus_orchestrator::sequencer_consensus_context::{ | |
| }; | ||
| use apollo_infra::component_definitions::ComponentStarter; | ||
| use apollo_infra_utils::type_name::short_type_name; | ||
| use apollo_l1_gas_price::exchange_rate_oracle::ExchangeRateOracleClient; | ||
| use apollo_l1_gas_price_types::L1GasPriceProviderClient; | ||
| use apollo_network::gossipsub_impl::Topic; | ||
| use apollo_network::metrics::{ | ||
|
|
@@ -304,7 +305,15 @@ impl ConsensusManager { | |
| outbound_proposal_sender: outbound_internal_sender, | ||
| vote_broadcast_client: votes_broadcast_channels.broadcast_topic_client.clone(), | ||
| config_manager_client: Some(Arc::clone(&config_manager_client)), | ||
| strk_to_usd_oracle: None, | ||
| // TODO(SNIP-35): consider threading `ExchangeRateOracleConfig` through | ||
| // `ConsensusManagerConfig` so it can be configured per-deployment. For now we | ||
| // instantiate the default, whose `url_header_list` points at a placeholder URL; | ||
| // **deployments must override `url_header_list` via their config overlay** or the | ||
| // oracle will fail every request and `fee_proposal` will freeze at `fee_actual` | ||
| // (safe but static). | ||
| strk_to_usd_oracle: Some(Arc::new(ExchangeRateOracleClient::new( | ||
| apollo_l1_gas_price_config::config::ExchangeRateOracleConfig::default(), | ||
| ))), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. STRK/USD oracle pollutes shared ETH/STRK global metricsMedium Severity The new STRK/USD oracle reuses Reviewed by Cursor Bugbot for commit fbcc234. Configure here. |
||
| }, | ||
| ) | ||
| } | ||
|
|
||


There was a problem hiding this comment.
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
ExchangeRateOracleClientwith the placeholderapi.example.comURL will continuously fail, and each failure increments the globalETH_TO_STRK_ERROR_COUNTmetric insidespawn_query. Withlag_interval_seconds: 1generating unique quantized timestamps, a new failing query is spawned on every block proposal (~every 3 seconds), producing ~1200 error increments per hour. The existingget_eth_to_strk_error_count_alertinalert_definitions.rsfires at a threshold of 10 per hour, so this will trigger constant false alerts and obscure genuine ETH/STRK oracle failures.Reviewed by Cursor Bugbot for commit 0bff93b. Configure here.