feat(config): wire startup through resolveConfig#23409
Open
spypsy wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires the
aztec startstartup path throughresolveConfig, replacing the legacyprocess.env-as-merged-blob path now that the resolver and adapters from A-989/A-990 exist.Summary
cli/env/networklayers in the action handler and callresolveConfig.cliToTyped→resolveConfig.--networkpre-parse and remote-network env enrichment inbin/index.ts; removeenrichEnvironmentWithNetworkConfig,enrichEnvironmentWithChainName,enrichVar.getConfigEnvVars()+extractRelevantOptions()merges instart_node,start_prover_broker,start_prover_agent,start_bot,start_p2p_bootstrapwith per-componentresolveConfig(mappings, namespace).OwnLocalNetworkConfig+localNetworkConfigMappingsinto a lightlocal-network/config.tsand auto-generate--localNetwork.*flags viagetOptions('localNetwork', localNetworkCliConfigMappings). Genesis state config (testAccounts,sponsoredFPC,prefundAddresses) is exposed there since it only matters during fresh-chain init.resolvedToConfig<T>foundation helper and putConfigLayerName.DEFAULTdirectly intoORDERED_CONFIG_LAYERSso layer extraction is uniform.getConfigFromMappings→buildConfigFromEnveverywhere; it now reflects what it actually does (env + mapping defaults, no CLI / no network).Notable change
process.env; remoteNetworkConfigis passed throughnetworkConfigToTypedas an explicit NETWORK layer.Fixes A-991
Test plan
aztec_start_options.test.ts,config_resolver.test.ts,cli/src/config/network_config.test.ts, foundationconfig.test.ts.aztec start --local-networkand node startup.