Skip to content

apollo_node_config,apollo_deployments: assert cross-component equality for formerly-pointer-resolved fields#14650

Open
nimrod-starkware wants to merge 1 commit into
nimrod/jsonnet/delete-base-app-configsfrom
nimrod/jsonnet/validate-cross-component-equality
Open

apollo_node_config,apollo_deployments: assert cross-component equality for formerly-pointer-resolved fields#14650
nimrod-starkware wants to merge 1 commit into
nimrod/jsonnet/delete-base-app-configsfrom
nimrod/jsonnet/validate-cross-component-equality

Conversation

@nimrod-starkware

Copy link
Copy Markdown
Contributor

CONFIG_POINTERS copies one source value into N component fields at load. Before that
resolution is deleted, add a present-only validator::Validate check (in
cross_member_validations) asserting those fields are equal across PRESENT components, so
hand-edited/test/non-jsonnet configs can't silently carry divergent values. 10 equality
groups derived from CONFIG_POINTERS (chain_id; eth/strk fee tokens incl. the
*_fee_token_address vs *_fee_contract_address name asymmetry; recorder_url;
native_classes_whitelist; validate_resource_bounds; max_cpu_time; behavior_mode;
versioned_constants_overrides; revert_config), plus validation_only: a single-target
pointer whose target (the batcher's copy, which drives batcher behavior) is checked
against the always-present top-level source field. Skips starknet_url (String vs Url) and
validator_id (lone target with no independent source). New all_present_equal helper
compares present Option<&T>.

Enforce the invariant in CI: build_*_deserializes_into_node_config now calls
validate_node_config() on the build() output for every layout (not just deserializes), so
a jsonnet change that breaks a pointer group fails CI instead of only at prod boot.
Component urls are deploy-time placeholders (in-cluster DNS that won't resolve), so the
test rewrites them to localhost before validating, reaching the cross-component checks.

Verified the build() native config passes the check for all layouts (no regression);
negative tests prove the guard fires (incl. validation_only). Raw
SequencerNodeConfig::default() is cross-target inconsistent (only pointer resolution
reconciled it), so tests reconcile via a normalize_pointer_groups helper. apollo_node_config
35/35, apollo_deployments 8/8 green.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

nimrod-starkware commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from a4eefa9 to ec8f72b Compare June 28, 2026 10:14
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from 5257d79 to e1fdf85 Compare June 28, 2026 10:14
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from ec8f72b to 9ecf4fe Compare June 28, 2026 10:30
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from e1fdf85 to 614e204 Compare June 28, 2026 10:30
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from 9ecf4fe to e84d1fc Compare June 28, 2026 14:04
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from 614e204 to b42f836 Compare June 28, 2026 14:04
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from f33eb63 to ef69144 Compare July 12, 2026 10:04
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from 2a8ec63 to c989925 Compare July 12, 2026 10:04
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from ef69144 to edeecca Compare July 12, 2026 10:51
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch 2 times, most recently from 5d3c070 to 4d51a5e Compare July 12, 2026 13:24
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch 2 times, most recently from 25b5bce to d5c97d6 Compare July 13, 2026 10:07
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch 2 times, most recently from b02379b to ffec769 Compare July 13, 2026 11:00
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from d5c97d6 to 9ce32ef Compare July 13, 2026 11:00
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from ffec769 to 32b8ead Compare July 13, 2026 11:47
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from 9ce32ef to 15cc302 Compare July 13, 2026 11:47
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from 32b8ead to adc0cd3 Compare July 14, 2026 06:16
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch 2 times, most recently from 4ce5b6e to c119a6f Compare July 14, 2026 09:16
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from 51cc7f3 to e7b7224 Compare July 14, 2026 13:48
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch 2 times, most recently from 36fd208 to f5d717f Compare July 14, 2026 13:56
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch 2 times, most recently from d621349 to c14d6f7 Compare July 14, 2026 14:59
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from f5d717f to 55ede14 Compare July 14, 2026 14:59
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from c14d6f7 to 700dfc5 Compare July 14, 2026 16:05
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from 55ede14 to 4414834 Compare July 14, 2026 16:05
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from 700dfc5 to bc88670 Compare July 15, 2026 11:10
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from 4414834 to 153fd1a Compare July 15, 2026 11:10
…y of pointer-resolved fields

CONFIG_POINTERS copies one source value into N component fields at load. Before that
resolution is deleted, add a present-only validator::Validate check (in
cross_member_validations) asserting those fields are equal across PRESENT components, so
hand-edited/test/non-jsonnet configs can't silently carry divergent values. 10 equality
groups derived from CONFIG_POINTERS (chain_id; eth/strk fee tokens incl. the
*_fee_token_address vs *_fee_contract_address name asymmetry; recorder_url;
native_classes_whitelist; validate_resource_bounds; max_cpu_time; behavior_mode;
versioned_constants_overrides; revert_config), plus validation_only: a single-target
pointer whose target (the batcher's copy, which drives batcher behavior) is checked
against the always-present top-level source field. Skips starknet_url (String vs Url) and
validator_id (lone target with no independent source). New all_present_equal helper
compares present Option<&T>.

Enforce the invariant in CI: build_*_deserializes_into_node_config now calls
validate_node_config() on the build() output for every layout (not just deserializes), so
a jsonnet change that breaks a pointer group fails CI instead of only at prod boot.
Component urls are deploy-time placeholders (in-cluster DNS that won't resolve), so the
test rewrites them to localhost before validating, reaching the cross-component checks.

Verified the build() native config passes the check for all layouts (no regression);
negative tests prove the guard fires (incl. validation_only). Raw
SequencerNodeConfig::default() is cross-target inconsistent (only pointer resolution
reconciled it), so tests reconcile via a normalize_pointer_groups helper. apollo_node_config
35/35, apollo_deployments 8/8 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/delete-base-app-configs branch from bc88670 to 9a22761 Compare July 15, 2026 11:26
@nimrod-starkware
nimrod-starkware force-pushed the nimrod/jsonnet/validate-cross-component-equality branch from 153fd1a to 788b0ba Compare July 15, 2026 11:26
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