From bfdc14c4013ca45227d9dafc07eb25c6db13ffd1 Mon Sep 17 00:00:00 2001 From: ocnc2 <169075746+ocnc2@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:00:54 -0400 Subject: [PATCH] fix(cli): payload builder attributes (#1415) --- mod/node-core/pkg/config/config.go | 27 ++++++++++++++++--------- mod/node-core/pkg/config/flags/flags.go | 7 +++++-- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/mod/node-core/pkg/config/config.go b/mod/node-core/pkg/config/config.go index b5ebf84ef7..6671826c66 100644 --- a/mod/node-core/pkg/config/config.go +++ b/mod/node-core/pkg/config/config.go @@ -109,8 +109,10 @@ func ReadConfigFromAppOpts(opts servertypes.AppOptions) (*Config, error) { func AddBeaconKitFlags(startCmd *cobra.Command) { defaultCfg := DefaultConfig() startCmd.Flags().String( - flags.JWTSecretPath, defaultCfg.Engine.JWTSecretPath, - "path to the execution client secret") + flags.JWTSecretPath, + defaultCfg.Engine.JWTSecretPath, + "path to the execution client secret", + ) startCmd.Flags().String( flags.RPCDialURL, defaultCfg.Engine.RPCDialURL.String(), "rpc dial url") startCmd.Flags().Uint64( @@ -120,21 +122,28 @@ func AddBeaconKitFlags(startCmd *cobra.Command) { startCmd.Flags().Duration( flags.RPCStartupCheckInterval, defaultCfg.Engine.RPCStartupCheckInterval, - "rpc startup check interval") - startCmd.Flags().Duration(flags.RPCJWTRefreshInterval, + "rpc startup check interval", + ) + startCmd.Flags().Duration( + flags.RPCJWTRefreshInterval, defaultCfg.Engine.RPCJWTRefreshInterval, - "rpc jwt refresh interval") - startCmd.Flags().String(flags.SuggestedFeeRecipient, + "rpc jwt refresh interval", + ) + startCmd.Flags().String( + flags.SuggestedFeeRecipient, defaultCfg.PayloadBuilder.SuggestedFeeRecipient.Hex(), "suggested fee recipient", ) - startCmd.Flags().String(flags.KZGTrustedSetupPath, + startCmd.Flags().String( + flags.KZGTrustedSetupPath, defaultCfg.KZG.TrustedSetupPath, "kzg trusted setup path", ) - startCmd.Flags().String(flags.KZGImplementation, + startCmd.Flags().String( + flags.KZGImplementation, defaultCfg.KZG.Implementation, - "kzg implementation") + "kzg implementation", + ) } // AddToSFlag adds the terms of service flag to the given command. diff --git a/mod/node-core/pkg/config/flags/flags.go b/mod/node-core/pkg/config/flags/flags.go index 2a8668fb54..dd09b7daf7 100644 --- a/mod/node-core/pkg/config/flags/flags.go +++ b/mod/node-core/pkg/config/flags/flags.go @@ -26,12 +26,15 @@ const ( BeaconKitAcceptTos = beaconKitRoot + "accept-tos" // Builder Config. - builderRoot = beaconKitRoot + "builder." + builderRoot = beaconKitRoot + "payload-builder." SuggestedFeeRecipient = builderRoot + "suggested-fee-recipient" - Graffiti = builderRoot + "graffiti" LocalBuilderEnabled = builderRoot + "local-builder-enabled" LocalBuildPayloadTimeout = builderRoot + "local-build-payload-timeout" + // Validator Config. + validatorRoot = beaconKitRoot + "validator." + Graffiti = validatorRoot + "graffiti" + // Engine Config. engineRoot = beaconKitRoot + "engine." RPCDialURL = engineRoot + "rpc-dial-url"