diff --git a/config/config.go b/config/config.go index 4204aaddf1..a180a9a479 100644 --- a/config/config.go +++ b/config/config.go @@ -77,6 +77,10 @@ const ParticipationRegistryFilename = "partregistry.sqlite" // built-in supported consensus protocols. const ConfigurableConsensusProtocolsFilename = "consensus.json" +// The default gossip fanout setting when configured as a relay (here, as we +// do not expose in normal config so it is not in code generated local_defaults.go +const defaultRelayGossipFanout = 8 + // LoadConfigFromDisk returns a Local config structure based on merging the defaults // with settings loaded from the config file from the custom dir. If the custom file // cannot be loaded, the default config is returned (with the error from loading the @@ -124,6 +128,12 @@ func mergeConfigFromFile(configpath string, source Local) (Local, error) { source.Archival = true source.EnableLedgerService = true source.EnableBlockService = true + + // If gossip fanout has not been explicitly overridden, use defaultRelayGossipFanout + // rather then the default gossip fanout setting from defaultLocal + if source.GossipFanout == defaultLocal.GossipFanout { + source.GossipFanout = defaultRelayGossipFanout + } } return source, err diff --git a/config/localTemplate.go b/config/localTemplate.go index 4be9e300fe..a1779e086f 100644 --- a/config/localTemplate.go +++ b/config/localTemplate.go @@ -459,13 +459,13 @@ type Local struct { MaxAPIResourcesPerAccount uint64 `version[21]:"100000"` // AgreementIncomingVotesQueueLength sets the size of the buffer holding incoming votes. - AgreementIncomingVotesQueueLength uint64 `version[21]:"10000"` + AgreementIncomingVotesQueueLength uint64 `version[21]:"10000" version[27]:"20000"` // AgreementIncomingProposalsQueueLength sets the size of the buffer holding incoming proposals. - AgreementIncomingProposalsQueueLength uint64 `version[21]:"25"` + AgreementIncomingProposalsQueueLength uint64 `version[21]:"25" version[27]:"50"` // AgreementIncomingBundlesQueueLength sets the size of the buffer holding incoming bundles. - AgreementIncomingBundlesQueueLength uint64 `version[21]:"7"` + AgreementIncomingBundlesQueueLength uint64 `version[21]:"7" version[27]:"15"` // MaxAcctLookback sets the maximum lookback range for account states, // i.e. the ledger can answer account states questions for the range Latest-MaxAcctLookback...Latest diff --git a/config/local_defaults.go b/config/local_defaults.go index b9a993631f..7066a30fca 100644 --- a/config/local_defaults.go +++ b/config/local_defaults.go @@ -23,9 +23,9 @@ var defaultLocal = Local{ Version: 27, AccountUpdatesStatsInterval: 5000000000, AccountsRebuildSynchronousMode: 1, - AgreementIncomingBundlesQueueLength: 7, - AgreementIncomingProposalsQueueLength: 25, - AgreementIncomingVotesQueueLength: 10000, + AgreementIncomingBundlesQueueLength: 15, + AgreementIncomingProposalsQueueLength: 50, + AgreementIncomingVotesQueueLength: 20000, AnnounceParticipationKey: true, Archival: false, BaseLoggerDebugLevel: 4, diff --git a/installer/config.json.example b/installer/config.json.example index 59150b031b..997f3412c4 100644 --- a/installer/config.json.example +++ b/installer/config.json.example @@ -2,9 +2,9 @@ "Version": 27, "AccountUpdatesStatsInterval": 5000000000, "AccountsRebuildSynchronousMode": 1, - "AgreementIncomingBundlesQueueLength": 7, - "AgreementIncomingProposalsQueueLength": 25, - "AgreementIncomingVotesQueueLength": 10000, + "AgreementIncomingBundlesQueueLength": 15, + "AgreementIncomingProposalsQueueLength": 50, + "AgreementIncomingVotesQueueLength": 20000, "AnnounceParticipationKey": true, "Archival": false, "BaseLoggerDebugLevel": 4, diff --git a/test/testdata/configs/config-v27.json b/test/testdata/configs/config-v27.json index 375c6f8712..997f3412c4 100644 --- a/test/testdata/configs/config-v27.json +++ b/test/testdata/configs/config-v27.json @@ -2,9 +2,9 @@ "Version": 27, "AccountUpdatesStatsInterval": 5000000000, "AccountsRebuildSynchronousMode": 1, - "AgreementIncomingBundlesQueueLength": 7, - "AgreementIncomingProposalsQueueLength": 25, - "AgreementIncomingVotesQueueLength": 10000, + "AgreementIncomingBundlesQueueLength": 15, + "AgreementIncomingProposalsQueueLength": 50, + "AgreementIncomingVotesQueueLength": 20000, "AnnounceParticipationKey": true, "Archival": false, "BaseLoggerDebugLevel": 4, @@ -51,7 +51,6 @@ "EnableRuntimeMetrics": false, "EnableTopAccountsReporting": false, "EnableTxBacklogRateLimiting": false, - "TxBacklogSize": 26000, "EnableUsageLog": false, "EnableVerbosedTransactionSyncLogging": false, "EndpointAddress": "127.0.0.1:0", @@ -68,9 +67,9 @@ "LogArchiveMaxAge": "", "LogArchiveName": "node.archive.log", "LogSizeLimit": 1073741824, - "MaxAcctLookback": 4, "MaxAPIBoxPerApplication": 100000, "MaxAPIResourcesPerAccount": 100000, + "MaxAcctLookback": 4, "MaxCatchpointDownloadDuration": 7200000000000, "MaxConnectionsPerIP": 30, "MinCatchpointFileDownloadBytesPerSecond": 20480, @@ -97,13 +96,14 @@ "RunHosted": false, "SuggestedFeeBlockHistory": 3, "SuggestedFeeSlidingWindowSize": 50, - "TelemetryToLog": true, "TLSCertFile": "", "TLSKeyFile": "", + "TelemetryToLog": true, "TransactionSyncDataExchangeRate": 0, "TransactionSyncSignificantMessageThreshold": 0, - "TxBacklogServiceRateWindowSeconds": 10, "TxBacklogReservedCapacityPerPeer": 20, + "TxBacklogServiceRateWindowSeconds": 10, + "TxBacklogSize": 26000, "TxIncomingFilteringFlags": 1, "TxPoolExponentialIncreaseFactor": 2, "TxPoolSize": 75000,