Skip to content

apollo_integration_tests,apollo_deployments: prime strk_to_usd_oracle overlays#14160

Merged
ShahakShama merged 2 commits into
mainfrom
shahak/strk_usd_oracle_04_integration_overlays
May 27, 2026
Merged

apollo_integration_tests,apollo_deployments: prime strk_to_usd_oracle overlays#14160
ShahakShama merged 2 commits into
mainfrom
shahak/strk_usd_oracle_04_integration_overlays

Conversation

@ShahakShama

Copy link
Copy Markdown
Collaborator

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

@cursor

cursor Bot commented May 24, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Test and deployment configuration only; no production runtime logic changes in the shown diff.

Overview
Prepares integration tests and deployment overlays for STRK/USD inside L1GasPriceProvider before orchestrator behavior switches to that feed.

create_node_config now takes strk_to_usd_oracle_config and sets it on L1GasPriceProviderConfig next to the existing ETH→STRK oracle. Flow and integration test setup build both configs; STRK/USD reuses the same local dummy oracle URL as ETH→STRK (constant-rate handler, one port).

Deployment-side (same stack): SecretsConfigOverride and generated testing_secrets.json add strk_to_usd_oracle_config.url_header_list; L1 gas price app-config presets mirror lag/cache/timeout for STRK/USD like eth_to_strk.

Post-merge: regenerate config secrets schema and deployment secrets per PR notes.

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

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

ShahakShama commented May 24, 2026

Copy link
Copy Markdown
Collaborator Author

@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from 722a966 to 7def26d Compare May 25, 2026 06:19
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch from f88ac27 to 74796ad Compare May 25, 2026 06:19
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from 7def26d to c291368 Compare May 25, 2026 07:56
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch 2 times, most recently from 9be64f7 to ebb9c8e Compare May 25, 2026 08:18
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch 2 times, most recently from 570d530 to a42b523 Compare May 25, 2026 08:53
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch 2 times, most recently from bf76248 to f533d86 Compare May 25, 2026 11:03
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from a42b523 to e413e9a Compare May 25, 2026 11:03
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch from f533d86 to 6a5c326 Compare May 25, 2026 11:04
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from e413e9a to 403c127 Compare May 25, 2026 11:04

@matanl-starkware matanl-starkware left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@matanl-starkware reviewed 3 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ShahakShama).

@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from 403c127 to 8b42533 Compare May 25, 2026 14:42
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch 2 times, most recently from d6f65ca to 76e550e Compare May 25, 2026 14:52
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from 8b42533 to 1262c18 Compare May 25, 2026 14:52
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from 1262c18 to cfcbbde Compare May 26, 2026 10:01
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch from 76e550e to 355e1b6 Compare May 26, 2026 10:01
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from cfcbbde to 61d4412 Compare May 26, 2026 11:24
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch 2 times, most recently from 911b2ee to 753bdfc Compare May 26, 2026 13:30
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from 266f09d to f988b4e Compare May 26, 2026 14:24
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch 2 times, most recently from 7b8b3a6 to cb7f91e Compare May 26, 2026 15:00
@ShahakShama ShahakShama force-pushed the shahak/strk_usd_oracle_03_client_trait branch from f988b4e to 330b3a9 Compare May 26, 2026 15:00
@sirandreww-starkware sirandreww-starkware force-pushed the shahak/strk_usd_oracle_03_client_trait branch from 330b3a9 to d3da13d Compare May 27, 2026 07:19
@sirandreww-starkware sirandreww-starkware force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch from cb7f91e to 62290e1 Compare May 27, 2026 07:19
ShahakShama and others added 2 commits May 27, 2026 10:35
…_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>
… 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>
@sirandreww-starkware sirandreww-starkware force-pushed the shahak/strk_usd_oracle_04_integration_overlays branch from 62290e1 to bcd87e3 Compare May 27, 2026 07:35
@sirandreww-starkware sirandreww-starkware force-pushed the shahak/strk_usd_oracle_03_client_trait branch from d3da13d to a64cf51 Compare May 27, 2026 07:35
@ShahakShama ShahakShama changed the base branch from shahak/strk_usd_oracle_03_client_trait to main May 27, 2026 08:41

@sirandreww-starkware sirandreww-starkware left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@sirandreww-starkware reviewed 6 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on ShahakShama).

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.

4 participants