Skip to content

feat(config): wire startup through resolveConfig#23409

Open
spypsy wants to merge 6 commits into
spy/resolve-configfrom
spy/config-resolution-wiring
Open

feat(config): wire startup through resolveConfig#23409
spypsy wants to merge 6 commits into
spy/resolve-configfrom
spy/config-resolution-wiring

Conversation

@spypsy
Copy link
Copy Markdown
Member

@spypsy spypsy commented May 19, 2026

Wires the aztec start startup path through resolveConfig, replacing the legacy process.env-as-merged-blob path now that the resolver and adapters from A-989/A-990 exist.

Summary

  • Build cli / env / network layers in the action handler and call resolveConfig.
  • Stop registering Commander defaults from env/mappings at registration time; argv → cliToTypedresolveConfig.
  • Drop the manual --network pre-parse and remote-network env enrichment in bin/index.ts; remove enrichEnvironmentWithNetworkConfig, enrichEnvironmentWithChainName, enrichVar.
  • Replace getConfigEnvVars() + extractRelevantOptions() merges in start_node, start_prover_broker, start_prover_agent, start_bot, start_p2p_bootstrap with per-component resolveConfig(mappings, namespace).
  • Extract OwnLocalNetworkConfig + localNetworkConfigMappings into a light local-network/config.ts and auto-generate --localNetwork.* flags via getOptions('localNetwork', localNetworkCliConfigMappings). Genesis state config (testAccounts, sponsoredFPC, prefundAddresses) is exposed there since it only matters during fresh-chain init.
  • Add resolvedToConfig<T> foundation helper and put ConfigLayerName.DEFAULT directly into ORDERED_CONFIG_LAYERS so layer extraction is uniform.
  • Rename getConfigFromMappingsbuildConfigFromEnv everywhere; it now reflects what it actually does (env + mapping defaults, no CLI / no network).

Notable change

  • Network config is no longer mutated into process.env; remote NetworkConfig is passed through networkConfigToTyped as an explicit NETWORK layer.

Fixes A-991

Test plan

  • Unit tests in aztec_start_options.test.ts, config_resolver.test.ts, cli/src/config/network_config.test.ts, foundation config.test.ts.
  • CI: e2e suites exercise aztec start --local-network and node startup.

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​types/​lodash.kebabcase@​4.1.91001005780100
Addednpm/​lodash.kebabcase@​4.1.11001007575100

View full report

@AztecBot
Copy link
Copy Markdown
Collaborator

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/13c451c0afaf4d96�13c451c0afaf4d968;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_p2p/broadcasted_invalid_block_proposal_slash.test.ts (214s) (code: 0) group:e2e-p2p-epoch-flakes

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