Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txHandler: disable canonical hashmap by default #4877

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ func TestLocal_TxFiltering(t *testing.T) {

// ensure the default
require.True(t, cfg.TxFilterRawMsgEnabled())
require.True(t, cfg.TxFilterCanonicalEnabled())
require.False(t, cfg.TxFilterCanonicalEnabled())

cfg.TxIncomingFilteringFlags = 0
require.False(t, cfg.TxFilterRawMsgEnabled())
Expand Down
2 changes: 1 addition & 1 deletion config/localTemplate.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ type Local struct {
// 0x00 - disabled
// 0x01 (txFilterRawMsg) - check for raw tx message duplicates
// 0x02 (txFilterCanonical) - check for canonical tx group duplicates
TxIncomingFilteringFlags uint32 `version[26]:"3"`
TxIncomingFilteringFlags uint32 `version[26]:"1"`
}

// DNSBootstrapArray returns an array of one or more DNS Bootstrap identifiers
Expand Down
2 changes: 1 addition & 1 deletion config/local_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ var defaultLocal = Local{
TelemetryToLog: true,
TransactionSyncDataExchangeRate: 0,
TransactionSyncSignificantMessageThreshold: 0,
TxIncomingFilteringFlags: 3,
TxIncomingFilteringFlags: 1,
TxPoolExponentialIncreaseFactor: 2,
TxPoolSize: 75000,
TxSyncIntervalSeconds: 60,
Expand Down
1 change: 1 addition & 0 deletions data/txHandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@ func TestTxHandlerProcessIncomingCacheTxPoolDrop(t *testing.T) {
const inMem = true
cfg := config.GetDefaultLocal()
cfg.Archival = true
cfg.TxIncomingFilteringFlags = 3 // txFilterRawMsg + txFilterCanonical
ledger, err := LoadLedger(log, ledgerName, inMem, protocol.ConsensusCurrentVersion, genBal, genesisID, genesisHash, nil, cfg)
require.NoError(t, err)

Expand Down
2 changes: 1 addition & 1 deletion installer/config.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"TelemetryToLog": true,
"TransactionSyncDataExchangeRate": 0,
"TransactionSyncSignificantMessageThreshold": 0,
"TxIncomingFilteringFlags": 3,
"TxIncomingFilteringFlags": 1,
"TxPoolExponentialIncreaseFactor": 2,
"TxPoolSize": 75000,
"TxSyncIntervalSeconds": 60,
Expand Down
2 changes: 1 addition & 1 deletion test/testdata/configs/config-v26.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"TelemetryToLog": true,
"TransactionSyncDataExchangeRate": 0,
"TransactionSyncSignificantMessageThreshold": 0,
"TxIncomingFilteringFlags": 3,
"TxIncomingFilteringFlags": 1,
"TxPoolExponentialIncreaseFactor": 2,
"TxPoolSize": 75000,
"TxSyncIntervalSeconds": 60,
Expand Down