From 9dba1e479909f1e4f9a6252ae91a9124680304ec Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Fri, 27 Oct 2023 08:52:16 -0500 Subject: [PATCH] core: log a warning when deprecated P2P.V1 config is set in TOML (#11073) * core: log a warning when deprecated P2P.V1 config is set in TOML * change default P2P from V1 to V2 * bump operator ui (cherry picked from commit 5808e734cf024a5e8c5450e939e1f2d5b3cba546) --- .../evm/config/mocks/chain_scoped_config.go | 6 +- core/cmd/shell_local.go | 5 +- core/config/app_config.go | 2 +- core/config/docs/core.toml | 7 +- core/scripts/chaincli/handler/handler.go | 4 +- .../common/vrf/docker/toml-config/base.toml | 1 - core/scripts/ocr2vrf/util.go | 13 +- core/services/chainlink/config.go | 44 +++ core/services/chainlink/config_general.go | 14 +- core/services/chainlink/config_p2p_test.go | 7 +- core/services/chainlink/config_test.go | 39 ++- .../chainlink/mocks/general_config.go | 6 +- .../testdata/config-empty-effective.toml | 4 +- .../chainlink/testdata/config-full.toml | 4 +- .../config-multi-chain-effective.toml | 4 +- .../ocr2/plugins/mercury/helpers_test.go | 4 - core/utils/config/validate.go | 14 + .../testdata/config-empty-effective.toml | 4 +- core/web/resolver/testdata/config-full.toml | 4 +- .../config-multi-chain-effective.toml | 4 +- docs/CHANGELOG.md | 10 +- docs/CONFIG.md | 12 +- integration-tests/benchmark/keeper_test.go | 1 - .../chaos/automation_chaos_test.go | 1 - integration-tests/config/config.go | 6 +- integration-tests/performance/ocr_test.go | 4 + .../reorg/automation_reorg_test.go | 6 +- integration-tests/smoke/automation_test.go | 1 - integration-tests/smoke/keeper_test.go | 2 +- integration-tests/types/config/node/core.go | 11 +- .../types/config/node/defaults/sample.toml | 1 - testdata/scripts/node/validate/default.txtar | 4 +- .../disk-based-logging-disabled.txtar | 4 +- .../validate/disk-based-logging-no-dir.txtar | 4 +- .../node/validate/disk-based-logging.txtar | 4 +- testdata/scripts/node/validate/invalid.txtar | 4 +- testdata/scripts/node/validate/valid.txtar | 4 +- testdata/scripts/node/validate/warnings.txtar | 279 ++++++++++++++++++ 38 files changed, 463 insertions(+), 85 deletions(-) create mode 100644 testdata/scripts/node/validate/warnings.txtar diff --git a/core/chains/evm/config/mocks/chain_scoped_config.go b/core/chains/evm/config/mocks/chain_scoped_config.go index 0854b82165a..cb18282f495 100644 --- a/core/chains/evm/config/mocks/chain_scoped_config.go +++ b/core/chains/evm/config/mocks/chain_scoped_config.go @@ -252,9 +252,9 @@ func (_m *ChainScopedConfig) Log() coreconfig.Log { return r0 } -// LogConfiguration provides a mock function with given fields: log -func (_m *ChainScopedConfig) LogConfiguration(log coreconfig.LogfFn) { - _m.Called(log) +// LogConfiguration provides a mock function with given fields: log, warn +func (_m *ChainScopedConfig) LogConfiguration(log coreconfig.LogfFn, warn coreconfig.LogfFn) { + _m.Called(log, warn) } // Mercury provides a mock function with given fields: diff --git a/core/cmd/shell_local.go b/core/cmd/shell_local.go index f578604db33..401375238d8 100644 --- a/core/cmd/shell_local.go +++ b/core/cmd/shell_local.go @@ -290,7 +290,7 @@ func (s *Shell) runNode(c *cli.Context) error { s.Config.SetPasswords(pwd, vrfpwd) - s.Config.LogConfiguration(lggr.Debugf) + s.Config.LogConfiguration(lggr.Debugf, lggr.Warnf) if err := s.Config.Validate(); err != nil { return errors.Wrap(err, "config validation failed") @@ -689,7 +689,8 @@ var errDBURLMissing = errors.New("You must set CL_DATABASE_URL env variable or p // ConfigValidate validate the client configuration and pretty-prints results func (s *Shell) ConfigFileValidate(_ *cli.Context) error { - s.Config.LogConfiguration(func(f string, params ...any) { fmt.Printf(f, params...) }) + fn := func(f string, params ...any) { fmt.Printf(f, params...) } + s.Config.LogConfiguration(fn, fn) if err := s.configExitErr(s.Config.Validate); err != nil { return err } diff --git a/core/config/app_config.go b/core/config/app_config.go index ab8d9559673..648939b871b 100644 --- a/core/config/app_config.go +++ b/core/config/app_config.go @@ -28,7 +28,7 @@ type AppConfig interface { Validate() error ValidateDB() error - LogConfiguration(log LogfFn) + LogConfiguration(log, warn LogfFn) SetLogLevel(lvl zapcore.Level) error SetLogSQL(logSQL bool) SetPasswords(keystore, vrf *string) diff --git a/core/config/docs/core.toml b/core/config/docs/core.toml index 18f5810adcc..1ca4c656a7f 100644 --- a/core/config/docs/core.toml +++ b/core/config/docs/core.toml @@ -359,6 +359,8 @@ TraceLogging = false # Default # automatically fall back to V1. If V2 starts working again later, it will automatically be preferred again. This is useful # for migrating networks without downtime. Note that the two networking stacks _must not_ be configured to bind to the same IP/port. # +# Note: P2P.V1 is deprecated will be removed in the future. +# # All nodes in the OCR network should share the same networking stack. [P2P] # IncomingMessageBufferSize is the per-remote number of incoming @@ -377,9 +379,10 @@ PeerID = '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw' # Example # TraceLogging enables trace level logging. TraceLogging = false # Default +# P2P.V1 is deprecated and will be removed in a future version. [P2P.V1] # Enabled enables P2P V1. -Enabled = true # Default +Enabled = false # Default # AnnounceIP should be set as the externally reachable IP address of the Chainlink node. AnnounceIP = '1.2.3.4' # Example # AnnouncePort should be set as the externally reachable port of the Chainlink node. @@ -423,7 +426,7 @@ PeerstoreWriteInterval = '5m' # Default [P2P.V2] # Enabled enables P2P V2. # Note: V1.Enabled is true by default, so it must be set false in order to run V2 only. -Enabled = false # Default +Enabled = true # Default # AnnounceAddresses is the addresses the peer will advertise on the network in `host:port` form as accepted by the TCP version of Go’s `net.Dial`. # The addresses should be reachable by other nodes on the network. When attempting to connect to another node, # a node will attempt to dial all of the other node’s AnnounceAddresses in round-robin fashion. diff --git a/core/scripts/chaincli/handler/handler.go b/core/scripts/chaincli/handler/handler.go index c51792f9adc..f72e94605d4 100644 --- a/core/scripts/chaincli/handler/handler.go +++ b/core/scripts/chaincli/handler/handler.go @@ -64,9 +64,7 @@ HTTPSPort = 0 LogPoller = true [OCR2] Enabled = true -[P2P] -[P2P.V2] -Enabled = true + [Keeper] TurnLookBack = 0 [[EVM]] diff --git a/core/scripts/common/vrf/docker/toml-config/base.toml b/core/scripts/common/vrf/docker/toml-config/base.toml index 0bb83beb94a..39aab2e63ab 100644 --- a/core/scripts/common/vrf/docker/toml-config/base.toml +++ b/core/scripts/common/vrf/docker/toml-config/base.toml @@ -26,6 +26,5 @@ HTTPSPort = 0 [P2P] [P2P.V2] -Enabled = true AnnounceAddresses = ['0.0.0.0:6690'] ListenAddresses = ['0.0.0.0:6690'] diff --git a/core/scripts/ocr2vrf/util.go b/core/scripts/ocr2vrf/util.go index f8d104a5f3e..a2ff55524d3 100644 --- a/core/scripts/ocr2vrf/util.go +++ b/core/scripts/ocr2vrf/util.go @@ -14,16 +14,17 @@ import ( "github.com/ethereum/go-ethereum/common" gethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" + "github.com/urfave/cli" + "go.dedis.ch/kyber/v3" + "go.dedis.ch/kyber/v3/group/edwards25519" + "go.dedis.ch/kyber/v3/pairing" + "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" "github.com/smartcontractkit/ocr2vrf/altbn_128" "github.com/smartcontractkit/ocr2vrf/dkg" "github.com/smartcontractkit/ocr2vrf/ocr2vrf" ocr2vrftypes "github.com/smartcontractkit/ocr2vrf/types" - "github.com/urfave/cli" - "go.dedis.ch/kyber/v3" - "go.dedis.ch/kyber/v3/group/edwards25519" - "go.dedis.ch/kyber/v3/pairing" "github.com/smartcontractkit/chainlink/v2/core/cmd" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/authorized_forwarder" @@ -43,11 +44,7 @@ var ( g1 = suite.G1() g2 = suite.G2() tomlConfigTemplate = ` - [P2P.V1] - Enabled = false - [P2P.V2] - Enabled = true ListenAddresses = ["127.0.0.1:8000"] [Feature] diff --git a/core/services/chainlink/config.go b/core/services/chainlink/config.go index 62be789f859..26e2d539bac 100644 --- a/core/services/chainlink/config.go +++ b/core/services/chainlink/config.go @@ -52,6 +52,50 @@ func (c *Config) TOMLString() (string, error) { return string(b), nil } +// deprecationWarnings returns an error if the Config contains deprecated fields. +// This is typically used before defaults have been applied, with input from the user. +func (c *Config) deprecationWarnings() (err error) { + if c.P2P.V1 != (toml.P2PV1{}) { + err = multierr.Append(err, config.ErrDeprecated{Name: "P2P.V1"}) + var err2 error + if c.P2P.V1.AnnounceIP != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "AnnounceIP"}) + } + if c.P2P.V1.AnnouncePort != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "AnnouncePort"}) + } + if c.P2P.V1.BootstrapCheckInterval != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "BootstrapCheckInterval"}) + } + if c.P2P.V1.DefaultBootstrapPeers != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "DefaultBootstrapPeers"}) + } + if c.P2P.V1.DHTAnnouncementCounterUserPrefix != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "DHTAnnouncementCounterUserPrefix"}) + } + if c.P2P.V1.DHTLookupInterval != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "DHTLookupInterval"}) + } + if c.P2P.V1.ListenIP != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "ListenIP"}) + } + if c.P2P.V1.ListenPort != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "ListenPort"}) + } + if c.P2P.V1.NewStreamTimeout != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "NewStreamTimeout"}) + } + if c.P2P.V1.PeerstoreWriteInterval != nil { + err2 = multierr.Append(err2, config.ErrDeprecated{Name: "PeerstoreWriteInterval"}) + } + err2 = config.NamedMultiErrorList(err2, "P2P.V1") + err = multierr.Append(err, err2) + } + return +} + +// Validate returns an error if the Config is not valid for use, as-is. +// This is typically used after defaults have been applied. func (c *Config) Validate() error { if err := config.Validate(c); err != nil { return fmt.Errorf("invalid configuration: %w", err) diff --git a/core/services/chainlink/config_general.go b/core/services/chainlink/config_general.go index 8e3dc100a44..6243146e91e 100644 --- a/core/services/chainlink/config_general.go +++ b/core/services/chainlink/config_general.go @@ -35,11 +35,13 @@ import ( type generalConfig struct { inputTOML string // user input, normalized via de/re-serialization effectiveTOML string // with default values included - secretsTOML string // with env overdies includes, redacted + secretsTOML string // with env overrides includes, redacted c *Config // all fields non-nil (unless the legacy method signature return a pointer) secrets *Secrets + warning error // warnings about inputTOML, e.g. deprecated fields + logLevelDefault zapcore.Level appIDOnce sync.Once @@ -123,7 +125,7 @@ func (o *GeneralConfigOpts) parseSecrets(secrets string) error { return nil } -// New returns a coreconfig.GeneralConfig for the given options. +// New returns a GeneralConfig for the given options. func (o GeneralConfigOpts) New() (GeneralConfig, error) { err := o.parse() if err != nil { @@ -135,6 +137,8 @@ func (o GeneralConfigOpts) New() (GeneralConfig, error) { return nil, err } + _, warning := utils.MultiErrorList(o.Config.deprecationWarnings()) + o.Config.setDefaults() if !o.SkipEnv { err = o.Secrets.setEnv() @@ -163,6 +167,7 @@ func (o GeneralConfigOpts) New() (GeneralConfig, error) { secretsTOML: secrets, c: &o.Config, secrets: &o.Secrets, + warning: warning, } if lvl := o.Config.Log.Level; lvl != nil { cfg.logLevelDefault = zapcore.Level(*lvl) @@ -253,10 +258,13 @@ func validateEnv() (err error) { return } -func (g *generalConfig) LogConfiguration(log coreconfig.LogfFn) { +func (g *generalConfig) LogConfiguration(log, warn coreconfig.LogfFn) { log("# Secrets:\n%s\n", g.secretsTOML) log("# Input Configuration:\n%s\n", g.inputTOML) log("# Effective Configuration, with defaults applied:\n%s\n", g.effectiveTOML) + if g.warning != nil { + warn("# Configuration warning:\n%s\n", g.warning) + } } // ConfigTOML implements chainlink.ConfigV2 diff --git a/core/services/chainlink/config_p2p_test.go b/core/services/chainlink/config_p2p_test.go index d6adfe7051c..21ce8f17e48 100644 --- a/core/services/chainlink/config_p2p_test.go +++ b/core/services/chainlink/config_p2p_test.go @@ -4,9 +4,10 @@ import ( "testing" "time" - "github.com/smartcontractkit/libocr/commontypes" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/libocr/commontypes" ) func TestP2PConfig(t *testing.T) { @@ -23,7 +24,7 @@ func TestP2PConfig(t *testing.T) { assert.True(t, p2p.TraceLogging()) v1 := p2p.V1() - assert.False(t, v1.Enabled()) + assert.True(t, v1.Enabled()) assert.Equal(t, "1.2.3.4", v1.AnnounceIP().String()) assert.Equal(t, uint16(1234), v1.AnnouncePort()) assert.Equal(t, time.Minute, v1.BootstrapCheckInterval()) @@ -38,7 +39,7 @@ func TestP2PConfig(t *testing.T) { assert.Equal(t, time.Minute, v1.PeerstoreWriteInterval()) v2 := p2p.V2() - assert.True(t, v2.Enabled()) + assert.False(t, v2.Enabled()) assert.Equal(t, []string{"a", "b", "c"}, v2.AnnounceAddresses()) assert.ElementsMatch( t, diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index d811dd8209d..597dab6ba1c 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -389,7 +389,7 @@ func TestConfig_Marshal(t *testing.T) { PeerID: mustPeerID("12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw"), TraceLogging: ptr(true), V1: toml.P2PV1{ - Enabled: ptr(false), + Enabled: ptr(true), AnnounceIP: mustIP("1.2.3.4"), AnnouncePort: ptr[uint16](1234), BootstrapCheckInterval: models.MustNewDuration(time.Minute), @@ -402,7 +402,7 @@ func TestConfig_Marshal(t *testing.T) { PeerstoreWriteInterval: models.MustNewDuration(time.Minute), }, V2: toml.P2PV2{ - Enabled: ptr(true), + Enabled: ptr(false), AnnounceAddresses: &[]string{"a", "b", "c"}, DefaultBootstrappers: &[]ocrcommontypes.BootstrapperLocator{ {PeerID: "12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw", Addrs: []string{"foo:42", "bar:10"}}, @@ -820,7 +820,7 @@ PeerID = '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw' TraceLogging = true [P2P.V1] -Enabled = false +Enabled = true AnnounceIP = '1.2.3.4' AnnouncePort = 1234 BootstrapCheckInterval = '1m0s' @@ -833,7 +833,7 @@ NewStreamTimeout = '1s' PeerstoreWriteInterval = '1m0s' [P2P.V2] -Enabled = true +Enabled = false AnnounceAddresses = ['a', 'b', 'c'] DefaultBootstrappers = ['12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@foo:42/bar:10', '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@test:99'] DeltaDial = '1m0s' @@ -1248,6 +1248,21 @@ func Test_generalConfig_LogConfiguration(t *testing.T) { secrets = "# Secrets:\n" input = "# Input Configuration:\n" effective = "# Effective Configuration, with defaults applied:\n" + warning = "# Configuration warning:\n" + + deprecated = `2 errors: + - P2P.V1: is deprecated and will be removed in a future version + - P2P.V1: 10 errors: + - AnnounceIP: is deprecated and will be removed in a future version + - AnnouncePort: is deprecated and will be removed in a future version + - BootstrapCheckInterval: is deprecated and will be removed in a future version + - DefaultBootstrapPeers: is deprecated and will be removed in a future version + - DHTAnnouncementCounterUserPrefix: is deprecated and will be removed in a future version + - DHTLookupInterval: is deprecated and will be removed in a future version + - ListenIP: is deprecated and will be removed in a future version + - ListenPort: is deprecated and will be removed in a future version + - NewStreamTimeout: is deprecated and will be removed in a future version + - PeerstoreWriteInterval: is deprecated and will be removed in a future version` ) tests := []struct { name string @@ -1257,10 +1272,11 @@ func Test_generalConfig_LogConfiguration(t *testing.T) { wantConfig string wantEffective string wantSecrets string + wantWarning string }{ {name: "empty", wantEffective: emptyEffectiveTOML, wantSecrets: emptyEffectiveSecretsTOML}, {name: "full", inputSecrets: secretsFullTOML, inputConfig: fullTOML, - wantConfig: fullTOML, wantEffective: fullTOML, wantSecrets: secretsFullRedactedTOML}, + wantConfig: fullTOML, wantEffective: fullTOML, wantSecrets: secretsFullRedactedTOML, wantWarning: deprecated}, {name: "multi-chain", inputSecrets: secretsMultiTOML, inputConfig: multiChainTOML, wantConfig: multiChainTOML, wantEffective: multiChainEffectiveTOML, wantSecrets: secretsMultiRedactedTOML}, } @@ -1274,10 +1290,11 @@ func Test_generalConfig_LogConfiguration(t *testing.T) { } c, err := opts.New() require.NoError(t, err) - c.LogConfiguration(lggr.Infof) + c.LogConfiguration(lggr.Infof, lggr.Warnf) inputLogs := observed.FilterMessageSnippet(secrets).All() if assert.Len(t, inputLogs, 1) { + assert.Equal(t, zapcore.InfoLevel, inputLogs[0].Level) got := strings.TrimPrefix(inputLogs[0].Message, secrets) got = strings.TrimSuffix(got, "\n") assert.Equal(t, tt.wantSecrets, got) @@ -1285,6 +1302,7 @@ func Test_generalConfig_LogConfiguration(t *testing.T) { inputLogs = observed.FilterMessageSnippet(input).All() if assert.Len(t, inputLogs, 1) { + assert.Equal(t, zapcore.InfoLevel, inputLogs[0].Level) got := strings.TrimPrefix(inputLogs[0].Message, input) got = strings.TrimSuffix(got, "\n") assert.Equal(t, tt.wantConfig, got) @@ -1292,10 +1310,19 @@ func Test_generalConfig_LogConfiguration(t *testing.T) { inputLogs = observed.FilterMessageSnippet(effective).All() if assert.Len(t, inputLogs, 1) { + assert.Equal(t, zapcore.InfoLevel, inputLogs[0].Level) got := strings.TrimPrefix(inputLogs[0].Message, effective) got = strings.TrimSuffix(got, "\n") assert.Equal(t, tt.wantEffective, got) } + + inputLogs = observed.FilterMessageSnippet(warning).All() + if tt.wantWarning != "" && assert.Len(t, inputLogs, 1) { + assert.Equal(t, zapcore.WarnLevel, inputLogs[0].Level) + got := strings.TrimPrefix(inputLogs[0].Message, warning) + got = strings.TrimSuffix(got, "\n") + assert.Equal(t, tt.wantWarning, got) + } }) } } diff --git a/core/services/chainlink/mocks/general_config.go b/core/services/chainlink/mocks/general_config.go index 8098b9634f5..0bc51ea4310 100644 --- a/core/services/chainlink/mocks/general_config.go +++ b/core/services/chainlink/mocks/general_config.go @@ -298,9 +298,9 @@ func (_m *GeneralConfig) Log() config.Log { return r0 } -// LogConfiguration provides a mock function with given fields: log -func (_m *GeneralConfig) LogConfiguration(log config.LogfFn) { - _m.Called(log) +// LogConfiguration provides a mock function with given fields: log, warn +func (_m *GeneralConfig) LogConfiguration(log config.LogfFn, warn config.LogfFn) { + _m.Called(log, warn) } // Mercury provides a mock function with given fields: diff --git a/core/services/chainlink/testdata/config-empty-effective.toml b/core/services/chainlink/testdata/config-empty-effective.toml index e746d66777d..48d432138a8 100644 --- a/core/services/chainlink/testdata/config-empty-effective.toml +++ b/core/services/chainlink/testdata/config-empty-effective.toml @@ -142,7 +142,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -155,7 +155,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/core/services/chainlink/testdata/config-full.toml b/core/services/chainlink/testdata/config-full.toml index 3bd422f8923..1534a411dc1 100644 --- a/core/services/chainlink/testdata/config-full.toml +++ b/core/services/chainlink/testdata/config-full.toml @@ -148,7 +148,7 @@ PeerID = '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw' TraceLogging = true [P2P.V1] -Enabled = false +Enabled = true AnnounceIP = '1.2.3.4' AnnouncePort = 1234 BootstrapCheckInterval = '1m0s' @@ -161,7 +161,7 @@ NewStreamTimeout = '1s' PeerstoreWriteInterval = '1m0s' [P2P.V2] -Enabled = true +Enabled = false AnnounceAddresses = ['a', 'b', 'c'] DefaultBootstrappers = ['12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@foo:42/bar:10', '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@test:99'] DeltaDial = '1m0s' diff --git a/core/services/chainlink/testdata/config-multi-chain-effective.toml b/core/services/chainlink/testdata/config-multi-chain-effective.toml index 89b034169c6..1dcbfe3a830 100644 --- a/core/services/chainlink/testdata/config-multi-chain-effective.toml +++ b/core/services/chainlink/testdata/config-multi-chain-effective.toml @@ -142,7 +142,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -155,7 +155,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/core/services/ocr2/plugins/mercury/helpers_test.go b/core/services/ocr2/plugins/mercury/helpers_test.go index ce4e0895164..60904b58139 100644 --- a/core/services/ocr2/plugins/mercury/helpers_test.go +++ b/core/services/ocr2/plugins/mercury/helpers_test.go @@ -190,10 +190,6 @@ func setupNode( c.P2P.PeerID = ptr(p2pKey.PeerID()) c.P2P.TraceLogging = ptr(true) - // [P2P.V1] - // Enabled = false - c.P2P.V1.Enabled = ptr(false) - // [P2P.V2] // Enabled = true // AnnounceAddresses = ['$EXT_IP:17775'] diff --git a/core/utils/config/validate.go b/core/utils/config/validate.go index 3ed0ffbabba..32cb94b5205 100644 --- a/core/utils/config/validate.go +++ b/core/utils/config/validate.go @@ -6,6 +6,7 @@ import ( "strconv" "strings" + "github.com/Masterminds/semver/v3" "go.uber.org/multierr" "github.com/smartcontractkit/chainlink-relay/pkg/config" @@ -146,3 +147,16 @@ type ErrOverride struct { func (e ErrOverride) Error() string { return fmt.Sprintf("%s: overrides (duplicate keys or list elements) are not allowed for multiple secrets files", e.Name) } + +type ErrDeprecated struct { + Name string + Version semver.Version +} + +func (e ErrDeprecated) Error() string { + when := "a future version" + if e.Version != (semver.Version{}) { + when = fmt.Sprintf("version %s", e.Version) + } + return fmt.Sprintf("%s: is deprecated and will be removed in %s", e.Name, when) +} diff --git a/core/web/resolver/testdata/config-empty-effective.toml b/core/web/resolver/testdata/config-empty-effective.toml index e746d66777d..48d432138a8 100644 --- a/core/web/resolver/testdata/config-empty-effective.toml +++ b/core/web/resolver/testdata/config-empty-effective.toml @@ -142,7 +142,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -155,7 +155,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/core/web/resolver/testdata/config-full.toml b/core/web/resolver/testdata/config-full.toml index 5a815b2e012..4b53396b94c 100644 --- a/core/web/resolver/testdata/config-full.toml +++ b/core/web/resolver/testdata/config-full.toml @@ -148,7 +148,7 @@ PeerID = '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw' TraceLogging = true [P2P.V1] -Enabled = false +Enabled = true AnnounceIP = '1.2.3.4' AnnouncePort = 1234 BootstrapCheckInterval = '1m0s' @@ -161,7 +161,7 @@ NewStreamTimeout = '1s' PeerstoreWriteInterval = '1m0s' [P2P.V2] -Enabled = true +Enabled = false AnnounceAddresses = ['a', 'b', 'c'] DefaultBootstrappers = ['12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@foo:42/bar:10', '12D3KooWMoejJznyDuEk5aX6GvbjaG12UzeornPCBNzMRqdwrFJw@test:99'] DeltaDial = '1m0s' diff --git a/core/web/resolver/testdata/config-multi-chain-effective.toml b/core/web/resolver/testdata/config-multi-chain-effective.toml index 89b034169c6..1dcbfe3a830 100644 --- a/core/web/resolver/testdata/config-multi-chain-effective.toml +++ b/core/web/resolver/testdata/config-multi-chain-effective.toml @@ -142,7 +142,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -155,7 +155,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 44d018769ec..daeddf2ce66 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -29,9 +29,15 @@ These will eventually replace `TelemetryIngress.URL` and `TelemetryIngress.Serve - LogPoller will now use finality tags to dynamically determine finality on evm chains if `UseFinalityTags=true`, rather than the fixed `FinalityDepth` specified in toml config -### Upcoming Required Configuration Change +### Changed + +- `P2P.V1` is now disabled (`Enabled = false`) by default. It must be explicitly enabled with `true` to be used. However, it is deprecated and will be removed in the future. +- `P2P.V2` is now enabled (`Enabled = true`) by default. -- Starting in 2.9.0, chainlink nodes will no longer allow `TelemetryIngress.URL` and `TelemetryIngress.ServerPubKey`. Any TOML configuration that sets this fields will prevent the node from booting. These fields will be replaced by `[[TelemetryIngress.Endpoints]]` +### Upcoming Required Configuration Changes +Starting in `v2.9.0`: +- `TelemetryIngress.URL` and `TelemetryIngress.ServerPubKey` will no longer be allowed. Any TOML configuration that sets this fields will prevent the node from booting. These fields will be replaced by `[[TelemetryIngress.Endpoints]]` +- `P2P.V1` will no longer be supported and must not be set in TOML configuration in order to boot. Use `P2P.V2` instead. If you are using both, `V1` can simply be removed. ### Removed diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 9582a940c32..d97cbabd233 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -981,6 +981,8 @@ If both are configured, then for each link with another peer, V2 networking will automatically fall back to V1. If V2 starts working again later, it will automatically be preferred again. This is useful for migrating networks without downtime. Note that the two networking stacks _must not_ be configured to bind to the same IP/port. +Note: P2P.V1 is deprecated will be removed in the future. + All nodes in the OCR network should share the same networking stack. ### IncomingMessageBufferSize @@ -1017,7 +1019,7 @@ TraceLogging enables trace level logging. ## P2P.V1 ```toml [P2P.V1] -Enabled = true # Default +Enabled = false # Default AnnounceIP = '1.2.3.4' # Example AnnouncePort = 1337 # Example BootstrapCheckInterval = '20s' # Default @@ -1029,11 +1031,11 @@ ListenPort = 1337 # Example NewStreamTimeout = '10s' # Default PeerstoreWriteInterval = '5m' # Default ``` - +P2P.V1 is deprecated and will be removed in a future version. ### Enabled ```toml -Enabled = true # Default +Enabled = false # Default ``` Enabled enables P2P V1. @@ -1119,7 +1121,7 @@ PeerstoreWriteInterval controls how often the peerstore for the OCR V1 networkin ## P2P.V2 ```toml [P2P.V2] -Enabled = false # Default +Enabled = true # Default AnnounceAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example DefaultBootstrappers = ['12D3KooWMHMRLQkgPbFSYHwD3NBuwtS1AmxhvKVUrcfyaGDASR4U@1.2.3.4:9999', '12D3KooWM55u5Swtpw9r8aFLQHEtw7HR4t44GdNs654ej5gRs2Dh@example.com:1234'] # Example DeltaDial = '15s' # Default @@ -1130,7 +1132,7 @@ ListenAddresses = ['1.2.3.4:9999', '[a52d:0:a88:1274::abcd]:1337'] # Example ### Enabled ```toml -Enabled = false # Default +Enabled = true # Default ``` Enabled enables P2P V2. Note: V1.Enabled is true by default, so it must be set false in order to run V2 only. diff --git a/integration-tests/benchmark/keeper_test.go b/integration-tests/benchmark/keeper_test.go index 7178ab854ea..a3db60f3b30 100644 --- a/integration-tests/benchmark/keeper_test.go +++ b/integration-tests/benchmark/keeper_test.go @@ -37,7 +37,6 @@ Enabled = true [P2P] [P2P.V2] -Enabled = true AnnounceAddresses = ["0.0.0.0:6690"] ListenAddresses = ["0.0.0.0:6690"] [Keeper] diff --git a/integration-tests/chaos/automation_chaos_test.go b/integration-tests/chaos/automation_chaos_test.go index 244f6c36ea9..6f2cacdb03e 100644 --- a/integration-tests/chaos/automation_chaos_test.go +++ b/integration-tests/chaos/automation_chaos_test.go @@ -37,7 +37,6 @@ Enabled = true [P2P] [P2P.V2] -Enabled = true AnnounceAddresses = ["0.0.0.0:6690"] ListenAddresses = ["0.0.0.0:6690"]` diff --git a/integration-tests/config/config.go b/integration-tests/config/config.go index cd3f5983a28..44c108b0d7f 100644 --- a/integration-tests/config/config.go +++ b/integration-tests/config/config.go @@ -4,6 +4,10 @@ var ( BaseOCRP2PV1Config = `[OCR] Enabled = true +[P2P] +[P2P.V2] +Enabled = false + [P2P] [P2P.V1] Enabled = true @@ -18,7 +22,6 @@ Enabled = true [P2P] [P2P.V2] -Enabled = true AnnounceAddresses = ["0.0.0.0:6690"] ListenAddresses = ["0.0.0.0:6690"]` @@ -67,7 +70,6 @@ CaptureEATelemetry = true [P2P] [P2P.V2] -Enabled = true ListenAddresses = ['0.0.0.0:6690']` TelemetryIngressConfig = `[TelemetryIngress] diff --git a/integration-tests/performance/ocr_test.go b/integration-tests/performance/ocr_test.go index b18d7f1f791..f468a0e0370 100644 --- a/integration-tests/performance/ocr_test.go +++ b/integration-tests/performance/ocr_test.go @@ -102,6 +102,10 @@ func setupOCRTest(t *testing.T) (testEnvironment *environment.Environment, testN baseTOML := `[OCR] Enabled = true +[P2P] +[P2P.V2] +Enabled = false + [P2P] [P2P.V1] Enabled = true diff --git a/integration-tests/reorg/automation_reorg_test.go b/integration-tests/reorg/automation_reorg_test.go index e94e5c28538..660d9c48e12 100644 --- a/integration-tests/reorg/automation_reorg_test.go +++ b/integration-tests/reorg/automation_reorg_test.go @@ -9,6 +9,9 @@ import ( "time" "github.com/onsi/gomega" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-env/environment" "github.com/smartcontractkit/chainlink-env/pkg/cdk8s/blockscout" "github.com/smartcontractkit/chainlink-env/pkg/helm/chainlink" @@ -17,8 +20,6 @@ import ( "github.com/smartcontractkit/chainlink-testing-framework/logging" "github.com/smartcontractkit/chainlink-testing-framework/networks" "github.com/smartcontractkit/chainlink-testing-framework/utils" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" "github.com/smartcontractkit/chainlink/integration-tests/actions" "github.com/smartcontractkit/chainlink/integration-tests/client" @@ -35,7 +36,6 @@ Enabled = true [P2P] [P2P.V2] -Enabled = true AnnounceAddresses = ["0.0.0.0:6690"] ListenAddresses = ["0.0.0.0:6690"]` networkTOML = `Enabled = true diff --git a/integration-tests/smoke/automation_test.go b/integration-tests/smoke/automation_test.go index 834de5ce481..9b79e1bea40 100644 --- a/integration-tests/smoke/automation_test.go +++ b/integration-tests/smoke/automation_test.go @@ -1038,7 +1038,6 @@ func setupAutomationTestDocker( clNodeConfig.Keeper.TurnLookBack = it_utils.Ptr[int64](int64(0)) clNodeConfig.Keeper.Registry.SyncInterval = &syncInterval clNodeConfig.Keeper.Registry.PerformGasOverhead = it_utils.Ptr[uint32](uint32(150000)) - clNodeConfig.P2P.V2.Enabled = it_utils.Ptr[bool](true) clNodeConfig.P2P.V2.AnnounceAddresses = &[]string{"0.0.0.0:6690"} clNodeConfig.P2P.V2.ListenAddresses = &[]string{"0.0.0.0:6690"} diff --git a/integration-tests/smoke/keeper_test.go b/integration-tests/smoke/keeper_test.go index 21dbeb8753c..d42944fd558 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -1098,7 +1098,7 @@ func setupKeeperTest(t *testing.T) ( contracts.LinkToken, *test_env.CLClusterTestEnv, ) { - clNodeConfig := node.NewConfig(node.NewBaseConfig()) + clNodeConfig := node.NewConfig(node.NewBaseConfig(), node.WithP2Pv1()) turnLookBack := int64(0) syncInterval := models.MustMakeDuration(5 * time.Second) performGasOverhead := uint32(150000) diff --git a/integration-tests/types/config/node/core.go b/integration-tests/types/config/node/core.go index 966e270e518..37047cdb667 100644 --- a/integration-tests/types/config/node/core.go +++ b/integration-tests/types/config/node/core.go @@ -115,13 +115,14 @@ func WithP2Pv1() NodeConfigOpt { ListenIP: utils2.MustIP("0.0.0.0"), ListenPort: utils2.Ptr[uint16](6690), } + // disabled default + c.P2P.V2 = toml.P2PV2{Enabled: utils2.Ptr(false)} } } func WithP2Pv2() NodeConfigOpt { return func(c *chainlink.Config) { c.P2P.V2 = toml.P2PV2{ - Enabled: utils2.Ptr(true), ListenAddresses: &[]string{"0.0.0.0:6690"}, } } @@ -130,14 +131,14 @@ func WithP2Pv2() NodeConfigOpt { func WithTracing() NodeConfigOpt { return func(c *chainlink.Config) { c.Tracing = toml.Tracing{ - Enabled: utils2.Ptr(true), + Enabled: utils2.Ptr(true), CollectorTarget: utils2.Ptr("otel-collector:4317"), // ksortable unique id - NodeID: utils2.Ptr(ksuid.New().String()), - Attributes: map[string]string{ + NodeID: utils2.Ptr(ksuid.New().String()), + Attributes: map[string]string{ "env": "smoke", }, - SamplingRatio: utils2.Ptr(1.0), + SamplingRatio: utils2.Ptr(1.0), } } } diff --git a/integration-tests/types/config/node/defaults/sample.toml b/integration-tests/types/config/node/defaults/sample.toml index 3663998003c..b0e1bc2a07d 100644 --- a/integration-tests/types/config/node/defaults/sample.toml +++ b/integration-tests/types/config/node/defaults/sample.toml @@ -15,7 +15,6 @@ DefaultTransactionQueueDepth = 0 [P2P] [P2P.V2] -Enabled = true ListenAddresses = ['0.0.0.0:6690'] AnnounceAddresses = ['0.0.0.0:6690'] DeltaDial = '500ms' diff --git a/testdata/scripts/node/validate/default.txtar b/testdata/scripts/node/validate/default.txtar index 06a623c9ca5..189476bfa84 100644 --- a/testdata/scripts/node/validate/default.txtar +++ b/testdata/scripts/node/validate/default.txtar @@ -154,7 +154,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -167,7 +167,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/testdata/scripts/node/validate/disk-based-logging-disabled.txtar b/testdata/scripts/node/validate/disk-based-logging-disabled.txtar index 1c0956b10d8..593aa0b21d0 100644 --- a/testdata/scripts/node/validate/disk-based-logging-disabled.txtar +++ b/testdata/scripts/node/validate/disk-based-logging-disabled.txtar @@ -198,7 +198,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -211,7 +211,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar b/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar index 19e180e0cff..7b8aa5e3836 100644 --- a/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar +++ b/testdata/scripts/node/validate/disk-based-logging-no-dir.txtar @@ -198,7 +198,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -211,7 +211,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/testdata/scripts/node/validate/disk-based-logging.txtar b/testdata/scripts/node/validate/disk-based-logging.txtar index 062a21b1967..ef6548619e1 100644 --- a/testdata/scripts/node/validate/disk-based-logging.txtar +++ b/testdata/scripts/node/validate/disk-based-logging.txtar @@ -198,7 +198,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -211,7 +211,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/testdata/scripts/node/validate/invalid.txtar b/testdata/scripts/node/validate/invalid.txtar index 0fa16473812..87b877bc882 100644 --- a/testdata/scripts/node/validate/invalid.txtar +++ b/testdata/scripts/node/validate/invalid.txtar @@ -188,7 +188,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -201,7 +201,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/testdata/scripts/node/validate/valid.txtar b/testdata/scripts/node/validate/valid.txtar index 002c249fb7c..c607da10644 100644 --- a/testdata/scripts/node/validate/valid.txtar +++ b/testdata/scripts/node/validate/valid.txtar @@ -195,7 +195,7 @@ PeerID = '' TraceLogging = false [P2P.V1] -Enabled = true +Enabled = false AnnounceIP = '' AnnouncePort = 0 BootstrapCheckInterval = '20s' @@ -208,7 +208,7 @@ NewStreamTimeout = '10s' PeerstoreWriteInterval = '5m0s' [P2P.V2] -Enabled = false +Enabled = true AnnounceAddresses = [] DefaultBootstrappers = [] DeltaDial = '15s' diff --git a/testdata/scripts/node/validate/warnings.txtar b/testdata/scripts/node/validate/warnings.txtar new file mode 100644 index 00000000000..ee7926f8f5f --- /dev/null +++ b/testdata/scripts/node/validate/warnings.txtar @@ -0,0 +1,279 @@ +exec chainlink node -c config.toml -s secrets.toml validate +cmp stdout out.txt + +-- config.toml -- +[P2P.V1] +Enabled = true +AnnounceIP = '' +AnnouncePort = 0 +BootstrapCheckInterval = '20s' +DefaultBootstrapPeers = [] +DHTAnnouncementCounterUserPrefix = 0 +DHTLookupInterval = 10 +ListenIP = '0.0.0.0' +ListenPort = 0 +NewStreamTimeout = '10s' +PeerstoreWriteInterval = '5m0s' + +-- secrets.toml -- +[Database] +URL = 'postgresql://user:pass1234567890abcd@localhost:5432/dbname?sslmode=disable' + +[Password] +Keystore = 'keystore_pass' + +-- out.txt -- +# Secrets: +[Database] +URL = 'xxxxx' +AllowSimplePasswords = false + +[Password] +Keystore = 'xxxxx' + +# Input Configuration: +[P2P] +[P2P.V1] +Enabled = true +AnnounceIP = '' +AnnouncePort = 0 +BootstrapCheckInterval = '20s' +DefaultBootstrapPeers = [] +DHTAnnouncementCounterUserPrefix = 0 +DHTLookupInterval = 10 +ListenIP = '0.0.0.0' +ListenPort = 0 +NewStreamTimeout = '10s' +PeerstoreWriteInterval = '5m0s' + +# Effective Configuration, with defaults applied: +InsecureFastScrypt = false +RootDir = '~/.chainlink' +ShutdownGracePeriod = '5s' + +[Feature] +FeedsManager = true +LogPoller = false +UICSAKeys = false + +[Database] +DefaultIdleInTxSessionTimeout = '1h0m0s' +DefaultLockTimeout = '15s' +DefaultQueryTimeout = '10s' +LogQueries = false +MaxIdleConns = 10 +MaxOpenConns = 20 +MigrateOnStartup = true + +[Database.Backup] +Dir = '' +Frequency = '1h0m0s' +Mode = 'none' +OnVersionUpgrade = true + +[Database.Listener] +MaxReconnectDuration = '10m0s' +MinReconnectInterval = '1m0s' +FallbackPollInterval = '30s' + +[Database.Lock] +Enabled = true +LeaseDuration = '10s' +LeaseRefreshInterval = '1s' + +[TelemetryIngress] +UniConn = true +Logging = false +BufferSize = 100 +MaxBatchSize = 50 +SendInterval = '500ms' +SendTimeout = '10s' +UseBatchSend = true +URL = '' +ServerPubKey = '' + +[AuditLogger] +Enabled = false +ForwardToUrl = '' +JsonWrapperKey = '' +Headers = [] + +[Log] +Level = 'info' +JSONConsole = false +UnixTS = false + +[Log.File] +Dir = '' +MaxSize = '5.12gb' +MaxAgeDays = 0 +MaxBackups = 1 + +[WebServer] +AllowOrigins = 'http://localhost:3000,http://localhost:6688' +BridgeResponseURL = '' +BridgeCacheTTL = '0s' +HTTPWriteTimeout = '10s' +HTTPPort = 6688 +SecureCookies = true +SessionTimeout = '15m0s' +SessionReaperExpiration = '240h0m0s' +HTTPMaxSize = '32.77kb' +StartTimeout = '15s' +ListenIP = '0.0.0.0' + +[WebServer.MFA] +RPID = '' +RPOrigin = '' + +[WebServer.RateLimit] +Authenticated = 1000 +AuthenticatedPeriod = '1m0s' +Unauthenticated = 5 +UnauthenticatedPeriod = '20s' + +[WebServer.TLS] +CertPath = '' +ForceRedirect = false +Host = '' +HTTPSPort = 6689 +KeyPath = '' +ListenIP = '0.0.0.0' + +[JobPipeline] +ExternalInitiatorsEnabled = false +MaxRunDuration = '10m0s' +MaxSuccessfulRuns = 10000 +ReaperInterval = '1h0m0s' +ReaperThreshold = '24h0m0s' +ResultWriteQueueDepth = 100 + +[JobPipeline.HTTPRequest] +DefaultTimeout = '15s' +MaxSize = '32.77kb' + +[FluxMonitor] +DefaultTransactionQueueDepth = 1 +SimulateTransactions = false + +[OCR2] +Enabled = false +ContractConfirmations = 3 +BlockchainTimeout = '20s' +ContractPollInterval = '1m0s' +ContractSubscribeInterval = '2m0s' +ContractTransmitterTransmitTimeout = '10s' +DatabaseTimeout = '10s' +KeyBundleID = '0000000000000000000000000000000000000000000000000000000000000000' +CaptureEATelemetry = false +CaptureAutomationCustomTelemetry = false +DefaultTransactionQueueDepth = 1 +SimulateTransactions = false +TraceLogging = false + +[OCR] +Enabled = false +ObservationTimeout = '5s' +BlockchainTimeout = '20s' +ContractPollInterval = '1m0s' +ContractSubscribeInterval = '2m0s' +DefaultTransactionQueueDepth = 1 +KeyBundleID = '0000000000000000000000000000000000000000000000000000000000000000' +SimulateTransactions = false +TransmitterAddress = '' +CaptureEATelemetry = false +TraceLogging = false + +[P2P] +IncomingMessageBufferSize = 10 +OutgoingMessageBufferSize = 10 +PeerID = '' +TraceLogging = false + +[P2P.V1] +Enabled = true +AnnounceIP = '' +AnnouncePort = 0 +BootstrapCheckInterval = '20s' +DefaultBootstrapPeers = [] +DHTAnnouncementCounterUserPrefix = 0 +DHTLookupInterval = 10 +ListenIP = '0.0.0.0' +ListenPort = 0 +NewStreamTimeout = '10s' +PeerstoreWriteInterval = '5m0s' + +[P2P.V2] +Enabled = true +AnnounceAddresses = [] +DefaultBootstrappers = [] +DeltaDial = '15s' +DeltaReconcile = '1m0s' +ListenAddresses = [] + +[Keeper] +DefaultTransactionQueueDepth = 1 +GasPriceBufferPercent = 20 +GasTipCapBufferPercent = 20 +BaseFeeBufferPercent = 20 +MaxGracePeriod = 100 +TurnLookBack = 1000 + +[Keeper.Registry] +CheckGasOverhead = 200000 +PerformGasOverhead = 300000 +MaxPerformDataSize = 5000 +SyncInterval = '30m0s' +SyncUpkeepQueueSize = 10 + +[AutoPprof] +Enabled = false +ProfileRoot = '' +PollInterval = '10s' +GatherDuration = '10s' +GatherTraceDuration = '5s' +MaxProfileSize = '100.00mb' +CPUProfileRate = 1 +MemProfileRate = 1 +BlockProfileRate = 1 +MutexProfileFraction = 1 +MemThreshold = '4.00gb' +GoroutineThreshold = 5000 + +[Pyroscope] +ServerAddress = '' +Environment = 'mainnet' + +[Sentry] +Debug = false +DSN = '' +Environment = '' +Release = '' + +[Insecure] +DevWebServer = false +OCRDevelopmentMode = false +InfiniteDepthQueries = false +DisableRateLimiting = false + +[Tracing] +Enabled = false +CollectorTarget = '' +NodeID = '' +SamplingRatio = 0.0 + +# Configuration warning: +2 errors: + - P2P.V1: is deprecated and will be removed in a future version + - P2P.V1: 10 errors: + - AnnounceIP: is deprecated and will be removed in a future version + - AnnouncePort: is deprecated and will be removed in a future version + - BootstrapCheckInterval: is deprecated and will be removed in a future version + - DefaultBootstrapPeers: is deprecated and will be removed in a future version + - DHTAnnouncementCounterUserPrefix: is deprecated and will be removed in a future version + - DHTLookupInterval: is deprecated and will be removed in a future version + - ListenIP: is deprecated and will be removed in a future version + - ListenPort: is deprecated and will be removed in a future version + - NewStreamTimeout: is deprecated and will be removed in a future version + - PeerstoreWriteInterval: is deprecated and will be removed in a future version +Valid configuration.