diff --git a/execution/gethexec/blockchain.go b/execution/gethexec/blockchain.go index 47436ab173..60740af039 100644 --- a/execution/gethexec/blockchain.go +++ b/execution/gethexec/blockchain.go @@ -96,12 +96,6 @@ var ( InvalidStateSchemeForArchive = errors.New("archive cannot be set when using path as the state-scheme") ) -func DefaultTestCachingConfig() CachingConfig { - c := DefaultCachingConfig - c.StateScheme = rawdb.PathScheme - return c -} - // TODO remove stack from parameters as it is no longer needed here func DefaultCacheConfigFor(stack *node.Node, cachingConfig *CachingConfig) *core.CacheConfig { baseConf := ethconfig.Defaults diff --git a/execution/gethexec/node.go b/execution/gethexec/node.go index 3da9bf4411..74913ae68a 100644 --- a/execution/gethexec/node.go +++ b/execution/gethexec/node.go @@ -115,7 +115,6 @@ func ConfigDefaultNonSequencerTest() *Config { config.Sequencer.Enable = false config.Forwarder = DefaultTestForwarderConfig config.ForwardingTarget = "null" - config.Caching = DefaultTestCachingConfig() _ = config.Validate() @@ -128,7 +127,6 @@ func ConfigDefaultTest() *Config { config.Sequencer = TestSequencerConfig config.ParentChainReader = headerreader.TestConfig config.ForwardingTarget = "null" - config.Caching = DefaultTestCachingConfig() _ = config.Validate() diff --git a/system_tests/das_test.go b/system_tests/das_test.go index 3f63b0d0c9..a2e49d7d2d 100644 --- a/system_tests/das_test.go +++ b/system_tests/das_test.go @@ -131,7 +131,7 @@ func TestDASRekey(t *testing.T) { authorizeDASKeyset(t, ctx, pubkeyA, l1info, l1client) // Setup L2 chain - cachingConfig := gethexec.DefaultTestCachingConfig() + cachingConfig := gethexec.TestCachingConfig _, l2stackA, l2chainDb, l2arbDb, l2blockchain := createL2BlockChainWithStackConfig(t, l2info, nodeDir, chainConfig, initMessage, nil, &cachingConfig) l2info.GenerateAccount("User2") @@ -185,7 +185,7 @@ func TestDASRekey(t *testing.T) { l2arbDb, err := l2stackA.OpenDatabaseWithExtraOptions("arbitrumdata", 0, 0, "arbitrumdata/", false, conf.PersistentConfigDefault.Pebble.ExtraOptions("arbitrumdata")) Require(t, err) - cachingConfig := gethexec.DefaultTestCachingConfig() + cachingConfig := gethexec.TestCachingConfig cacheConfig := gethexec.DefaultCacheConfigFor(nil, &cachingConfig) l2blockchain, err := gethexec.GetBlockChain(l2chainDb, cacheConfig, chainConfig, gethexec.ConfigDefaultTest().TxLookupLimit) Require(t, err) @@ -320,7 +320,7 @@ func TestDASComplexConfigAndRestMirror(t *testing.T) { Require(t, err) // Setup L2 chain - cachingConfig := gethexec.DefaultTestCachingConfig() + cachingConfig := gethexec.TestCachingConfig l2info, l2stackA, l2chainDb, l2arbDb, l2blockchain := createL2BlockChainWithStackConfig(t, nil, "", chainConfig, initMessage, nil, &cachingConfig) l2info.GenerateAccount("User2") diff --git a/system_tests/full_challenge_impl_test.go b/system_tests/full_challenge_impl_test.go index 391e1a9481..a222e9ede8 100644 --- a/system_tests/full_challenge_impl_test.go +++ b/system_tests/full_challenge_impl_test.go @@ -272,7 +272,7 @@ func RunChallengeTest(t *testing.T, asserterIsCorrect bool, useStubs bool, chall conf.BatchPoster.Enable = false conf.InboxReader.CheckDelay = time.Second - cachingConfig := gethexec.DefaultTestCachingConfig() + cachingConfig := gethexec.TestCachingConfig var valStack *node.Node var mockSpawn *mockSpawner if useStubs { diff --git a/system_tests/nodeinterface_test.go b/system_tests/nodeinterface_test.go index 75e42f4456..8c55a5a5b9 100644 --- a/system_tests/nodeinterface_test.go +++ b/system_tests/nodeinterface_test.go @@ -49,7 +49,7 @@ func TestFindBatch(t *testing.T) { rollupAddresses.Bridge = bridgeAddr rollupAddresses.SequencerInbox = seqInboxAddr l2Info := NewArbTestInfo(t, chainConfig.ChainID) - cachingConfig := gethexec.DefaultTestCachingConfig() + cachingConfig := gethexec.TestCachingConfig consensus, _ := createL2Nodes(t, ctx, &cachingConfig, conf, chainConfig, l1Backend, l2Info, rollupAddresses, initMsg, nil, nil, fatalErrChan) err := consensus.Start(ctx) Require(t, err) diff --git a/system_tests/staterecovery_test.go b/system_tests/staterecovery_test.go index 0e3e391b40..60445c2f29 100644 --- a/system_tests/staterecovery_test.go +++ b/system_tests/staterecovery_test.go @@ -55,7 +55,9 @@ func TestRectreateMissingStates(t *testing.T) { chainDb, err := stack.OpenDatabaseWithExtraOptions("l2chaindata", 0, 0, "l2chaindata/", false, conf.PersistentConfigDefault.Pebble.ExtraOptions("l2chaindata")) Require(t, err) defer chainDb.Close() - cacheConfig := gethexec.DefaultCacheConfigFor(stack, &gethexec.TestCachingConfig) + cachingConfig := gethexec.TestCachingConfig + cachingConfig.StateScheme = rawdb.HashScheme + cacheConfig := gethexec.DefaultCacheConfigFor(stack, &cachingConfig) bc, err := gethexec.GetBlockChain(chainDb, cacheConfig, builder.chainConfig, builder.execConfig.TxLookupLimit) Require(t, err) err = staterecovery.RecreateMissingStates(chainDb, bc, cacheConfig, 1)