Skip to content

apollo_deployments: jsonnet applicative config#14479

Open
nimrod-starkware wants to merge 1 commit into
mainfrom
nimrod/jsonnet/applicative-jsonnet
Open

apollo_deployments: jsonnet applicative config#14479
nimrod-starkware wants to merge 1 commit into
mainfrom
nimrod/jsonnet/applicative-jsonnet

Conversation

@nimrod-starkware

Copy link
Copy Markdown
Contributor

No description provided.

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/applicative-jsonnet branch 2 times, most recently from 9e1729b to 5a15200 Compare June 14, 2026 14:38
@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/applicative-jsonnet branch from 5a15200 to 9fe115f Compare June 15, 2026 07:25
@nimrod-starkware nimrod-starkware self-assigned this Jun 16, 2026
@nimrod-starkware nimrod-starkware marked this pull request as ready for review June 16, 2026 12:08
@cursor

cursor Bot commented Jun 16, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Large declarative surface area for consensus, gateway validation, and batcher limits—incorrect defaults or missing overrides could misconfigure live deployments, though this is additive Jsonnet with no runtime code changes.

Overview
Introduces a centralized Jsonnet module that builds per-component Apollo applicative configs from an overrides object, mixing fixed deployment defaults with environment-specific values.

applicative_config.libsonnet documents the pattern: each field is either a concrete default or wired from overrides.* (chain/fee tokens, recorder URL, P2P multiaddrs, consensus committee/timeouts, gateway limits, state sync RPC ports, etc.). Shared knobs like validate_resource_bounds, revert behavior, and behavior_mode: 'starknet' are set once and reused across batcher, gateway, and mempool. State sync optional sub-configs use optionalStateSyncSubConfig to merge overrides into defaults or stay null when disabled.

Adds constants.libsonnet with DEFAULT_VALIDATION_ONLY (used for batcher validation_only via std.get).

Placeholder URLs remain for L1/oracle endpoints (e.g. Infura template, api.example.com); deployers must supply real overrides for production-sensitive fields.

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

@nimrod-starkware nimrod-starkware force-pushed the nimrod/jsonnet/applicative-jsonnet branch from 9fe115f to f4a4329 Compare June 16, 2026 12:10
Comment thread crates/apollo_deployments/jsonnet/lib/applicative_config.libsonnet
Comment thread crates/apollo_deployments/jsonnet/lib/applicative_config.libsonnet Outdated
local recorderUrl = overrides.recorder_url;
local nativeClassesWhitelist = overrides.native_classes_whitelist;
local starknetUrl = overrides.starknet_url;
local versionedConstantsOverrides = overrides.versioned_constants_overrides;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Versioned constants incomplete

Medium Severity

versioned_constants_overrides is wired only from overrides.versioned_constants_overrides, without embedding the fixed limits that used to live in general_config.json (invoke_tx_max_n_steps, max_recursion_depth, validate_max_n_steps, etc.). Only max_n_events is per-environment in KEYS_TO_BE_REPLACED, so sparse overrides can omit the other fields and change execution limits from the prior deployment defaults.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f93d240. Configure here.

lag_interval_seconds: 900,
max_cache_size: 100,
query_timeout_sec: 10,
url_header_list: 'https://api.example.com/api',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

L1 oracle URLs hardcoded

Medium Severity

l1_gas_price_provider_config sets eth_to_strk_oracle_config.url_header_list and strk_to_usd_oracle_config.url_header_list to fixed https://api.example.com/api strings. Those endpoints were not in applicative app configs before; they came from deployment secrets. Baking in placeholder URLs can make gas-price oracles call the wrong host if secrets no longer override these fields in the new jsonnet flow.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f93d240. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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.

There are 3 total unresolved issues (including 2 from previous reviews).

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 f92f05c. Configure here.

Comment thread crates/apollo_deployments/jsonnet/lib/applicative_config.libsonnet
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