Commit c014cd2
apollo_integration_tests,apollo_deployments: prime strk_to_usd_oracle overlays (#14160)
* apollo_l1_gas_price_types,apollo_l1_gas_price: expose get_strk_to_usd_rate
Goal: PR 3 of 6 in the stack moving the STRK/USD oracle into
L1GasPriceProvider. Surfaces the inherent method added in PR 2 on
the client trait so cross-process callers (notably the consensus
orchestrator in PR 5) can request a STRK/USD rate without holding
their own oracle.
Change summary:
- New `L1GasPriceRequest::GetStrkToUsdRate(u64)` variant.
- New `L1GasPriceResponse::GetStrkToUsdRate(L1GasPriceProviderResult<u128>)`
variant.
- New `L1GasPriceProviderClient::get_strk_to_usd_rate` trait method,
implemented on the blanket impl mirroring `get_rate`.
- Server-side dispatch arm in `apollo_l1_gas_price::communication`
routes to `L1GasPriceProvider::strk_to_usd_rate`.
Decision points:
- Did not rename the existing `get_rate` (which dispatches to
`GetEthToFriRate`) for symmetry; out of scope per the stack plan
and would churn unrelated call sites in consensus orchestrator.
The trait now has slightly asymmetric naming: `get_rate` (ETH/FRI)
vs `get_strk_to_usd_rate`. Renaming is a separate cleanup if
desired.
- `MockL1GasPriceProviderClient` is automock-generated and picks up
the new method automatically.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* apollo_integration_tests,apollo_deployments: prime strk_to_usd_oracle overlays
Goal: PR 4 of 6 in the stack moving the STRK/USD oracle into
L1GasPriceProvider. Lands BEFORE the orchestrator behavior flip
(PR 5) so that every test and deployment overlay already points
the new `strk_to_usd_oracle_config.url_header_list` at a working
endpoint. When PR 5 lands, integration runs immediately exercise
the new path with realistic data instead of silently freezing
fee_proposal at fee_actual.
Change summary:
- `create_node_config` takes a new `strk_to_usd_oracle_config:
ExchangeRateOracleConfig` argument and plumbs it into
`L1GasPriceProviderConfig`.
- Callers in `flow_test_setup.rs` and `integration_test_manager.rs`
reuse the same dummy `spawn_local_eth_to_strk_oracle` URL for both
oracles (the handler returns a constant rate, so semantically
equivalent).
- `SecretsConfigOverride` in `apollo_deployments::test_utils` gains
a `strk_to_usd_oracle_config.url_header_list` field so the
generated secrets file covers the new private parameter.
- Deployment app-config presets
(`l1_gas_price_provider_config.json`,
`replacer_l1_gas_price_provider_config.json`) gain the same three
per-oracle overrides (`lag_interval_seconds=900`, `max_cache_size=100`,
`query_timeout_sec=10`) for STRK/USD, mirroring eth_to_strk.
Decision points:
- One dummy oracle process serving both feeds instead of spawning two.
The fake handler is rate-agnostic — same response shape, single port
allocation, same join handle. If we ever need rate-specific dummy
values, splitting into two processes is a localized change.
Action required after merge (cannot run from this sandbox):
- `cargo run --bin update_apollo_node_config_schema` to regenerate
`config_secrets_schema.json` (it gains a new private parameter
from PR 1's earlier addition).
- `cargo run --bin deployment_generator` to regenerate
`testing_secrets.json` with the new strk_to_usd entry from
`SecretsConfigOverride`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b54fd9c commit c014cd2
3 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
281 | 286 | | |
282 | 287 | | |
283 | 288 | | |
| |||
309 | 314 | | |
310 | 315 | | |
311 | 316 | | |
| 317 | + | |
312 | 318 | | |
313 | 319 | | |
314 | 320 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1367 | 1367 | | |
1368 | 1368 | | |
1369 | 1369 | | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
1370 | 1375 | | |
1371 | 1376 | | |
1372 | 1377 | | |
| |||
1397 | 1402 | | |
1398 | 1403 | | |
1399 | 1404 | | |
| 1405 | + | |
1400 | 1406 | | |
1401 | 1407 | | |
1402 | 1408 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| 270 | + | |
270 | 271 | | |
271 | 272 | | |
272 | 273 | | |
| |||
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| 317 | + | |
316 | 318 | | |
317 | 319 | | |
318 | 320 | | |
| |||
0 commit comments