apollo_l1_gas_price_config,apollo_node: add strk_to_usd_oracle_config#14157
Conversation
PR SummaryMedium Risk Overview Deployment and test harness JSON gain matching public overrides ( Reviewed by Cursor Bugbot for commit 74a40a0. Bugbot is set up for automated code reviews on this repo. Configure here. |
e33b1ff to
b274ca6
Compare
85d5809 to
bfd0e2c
Compare
b274ca6 to
d6dfb69
Compare
bfd0e2c to
9fb9c0b
Compare
d6dfb69 to
1afda6d
Compare
bb29293 to
03a775e
Compare
matanl-starkware
left a comment
There was a problem hiding this comment.
@matanl-starkware reviewed 7 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on ShahakShama).
crates/apollo_node/resources/config_schema.json line 3318 at r4 (raw file):
}, "l1_gas_price_provider_config.strk_to_usd_oracle_config.lag_interval_seconds": { "description": "The size of the interval (seconds) that the eth to strk rate is taken on. The lag refers to the fact that the interval `[T, T+k)` contains the conversion rate for queries in the interval `[T+k, T+2k)`. Should be configured in alignment with relevant query parameters in `url_header_list`, if required.",
copy-paste error
Code quote:
eth to strkcrates/apollo_node/resources/config_schema.json line 3328 at r4 (raw file):
}, "l1_gas_price_provider_config.strk_to_usd_oracle_config.query_timeout_sec": { "description": "The timeout (seconds) for the query to the eth to strk oracle.",
ditto
Code quote:
eth to strkcrates/apollo_node/resources/config_schema.json line 3333 at r4 (raw file):
}, "l1_gas_price_provider_config.strk_to_usd_oracle_config.url_header_list": { "description": "A list of Url+HTTP headers for the eth to strk oracle. The url is followed by a comma and then headers as key^value pairs, separated by commas. For example: `https://api.example.com/api,key1^value1,key2^value2`. Each URL+headers is separated by a pipe `|` character. The `timestamp` parameter is appended dynamically when making requests, in order to have a stable mapping from block timestamp to conversion rate. ",
Same
Code quote:
eth to strkGoal: relocate the STRK/USD oracle currently wired ad-hoc into SequencerConsensusContext to live inside L1GasPriceProvider alongside the existing eth_to_strk oracle. This commit is PR 1 of a 6-PR Graphite stack; later PRs construct the oracle client in the provider, expose it on the client trait, switch the orchestrator to call it, and remove the dead wiring in apollo_consensus_manager. Change summary: adds `strk_to_usd_oracle_config: ExchangeRateOracleConfig` to `L1GasPriceProviderConfig` next to `eth_to_strk_oracle_config`, extends `Default`, dumps it as a nested sub-config, and registers the four new entries in `config_schema.json`. Pure additive; the field is unused. Decision points: - Kept the existing "eth to strk" wording in `ExchangeRateOracleConfig::dump` rather than generalizing to "exchange rate oracle". Generalizing would churn the eth-to-strk schema entries and force a regeneration of config_secrets_schema.json. Doing it here would balloon the diff; punting to a separate cosmetic PR. Action required after merge: run cargo run --bin update_apollo_node_config_schema to regenerate config_secrets_schema.json (sandbox cannot access it). The new private parameter `strk_to_usd_oracle_config.url_header_list` needs a matching schema entry, otherwise the `default_config_file_is_up_to_date` test will fail. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
03a775e to
0c03914
Compare
… JSONs Add the same three non-secret overrides (lag_interval_seconds=900, max_cache_size=100, query_timeout_sec=10) for strk_to_usd_oracle_config that already exist for eth_to_strk_oracle_config, in both the base and replacer L1GasPriceProvider deployment JSONs. The new strk_to_usd_oracle_config field on L1GasPriceProviderConfig (added earlier in this PR) needs these production-default overrides to behave consistently with the existing eth_to_strk oracle. The url_header_list belongs in the secrets files (testing_secrets.json, config_secrets_schema.json) — those are harness-blocked from this sandbox; regenerate locally with `cargo run --bin deployment_generator` and `cargo run --bin update_apollo_node_config_schema`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0c03914 to
74a40a0
Compare
ShahakShama
left a comment
There was a problem hiding this comment.
@ShahakShama made 3 comments.
Reviewable status: 0 of 7 files reviewed, 3 unresolved discussions (waiting on matanl-starkware).
crates/apollo_node/resources/config_schema.json line 3318 at r4 (raw file):
Previously, matanl-starkware (Matan Lior) wrote…
copy-paste error
It needs to be identical in both of them because it's the same config struct. Reworded to be more generic
crates/apollo_node/resources/config_schema.json line 3328 at r4 (raw file):
Previously, matanl-starkware (Matan Lior) wrote…
ditto
Done.
crates/apollo_node/resources/config_schema.json line 3333 at r4 (raw file):
Previously, matanl-starkware (Matan Lior) wrote…
Same
Done.
matanl-starkware
left a comment
There was a problem hiding this comment.
@matanl-starkware reviewed 7 files and all commit messages, and resolved 3 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on ShahakShama).

apollo_l1_gas_price_config,apollo_node: add strk_to_usd_oracle_config
Goal: relocate the STRK/USD oracle currently wired ad-hoc into
SequencerConsensusContext to live inside L1GasPriceProvider alongside
the existing eth_to_strk oracle. This commit is PR 1 of a 6-PR
Graphite stack; later PRs construct the oracle client in the
provider, expose it on the client trait, switch the orchestrator to
call it, and remove the dead wiring in apollo_consensus_manager.
Change summary: adds
strk_to_usd_oracle_config: ExchangeRateOracleConfigto
L1GasPriceProviderConfignext toeth_to_strk_oracle_config,extends
Default, dumps it as a nested sub-config, and registers thefour new entries in
config_schema.json. Pure additive; the field isunused.
Decision points:
ExchangeRateOracleConfig::dumprather than generalizing to "exchange rate oracle". Generalizing would
churn the eth-to-strk schema entries and force a regeneration of
config_secrets_schema.json. Doing it here would balloon the diff;
punting to a separate cosmetic PR.
Action required after merge: run
cargo run --bin update_apollo_node_config_schema
to regenerate config_secrets_schema.json (sandbox cannot access it).
The new private parameter
strk_to_usd_oracle_config.url_header_listneeds a matching schema entry, otherwise the
default_config_file_is_up_to_datetest will fail.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
apollo_deployments: add strk_to_usd_oracle_config entries to provider JSONs
Add the same three non-secret overrides (lag_interval_seconds=900,
max_cache_size=100, query_timeout_sec=10) for strk_to_usd_oracle_config
that already exist for eth_to_strk_oracle_config, in both the base
and replacer L1GasPriceProvider deployment JSONs. The new
strk_to_usd_oracle_config field on L1GasPriceProviderConfig (added
earlier in this PR) needs these production-default overrides to
behave consistently with the existing eth_to_strk oracle.
The url_header_list belongs in the secrets files (testing_secrets.json,
config_secrets_schema.json) — those are harness-blocked from this
sandbox; regenerate locally with
cargo run --bin deployment_generatorand
cargo run --bin update_apollo_node_config_schema.Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com