diff --git a/docker/chain/genesis.json b/docker/chain/genesis.json index aa79bf5..4500d14 100644 --- a/docker/chain/genesis.json +++ b/docker/chain/genesis.json @@ -20,7 +20,7 @@ "nonce": "0x0", "timestamp": "0x0", "extraData": "0x", - "gasLimit": "0x1c9c380", + "gasLimit": "0x1c9c38000", "difficulty": "0x0", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "coinbase": "0x0000000000000000000000000000000000000000", diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index c8d0ad7..d531618 100755 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -47,7 +47,13 @@ services: --http --http.addr 0.0.0.0 --http.port 8545 \ --http.api "eth,net,web3,txpool" \ --disable-discovery \ - -vvvv + --txpool.pending-max-count 200000 \ + --txpool.pending-max-size 200 \ + --txpool.queued-max-count 200000 \ + --txpool.queued-max-size 200 \ + --txpool.max-account-slots 2048 \ + --txpool.max-new-txns 2048 \ + --txpool.additional-validation-tasks 16 volumes: logs: diff --git a/execution_test.go b/execution_test.go index e6a8e3b..338006e 100644 --- a/execution_test.go +++ b/execution_test.go @@ -26,7 +26,7 @@ const ( TEST_ENGINE_URL = "http://localhost:8551" CHAIN_ID = "1234" - GENESIS_HASH = "0x568201e3a763b59f7c646d72bf75a25aafff57f98a82dbd7b50542382c55f372" + GENESIS_HASH = "0x0a962a0d163416829894c89cb604ae422323bcdf02d7ea08b94d68d3e026a380" GENESIS_STATEROOT = "0x362b7d8a31e7671b0f357756221ac385790c25a27ab222dc8cbdd08944f5aea4" TEST_PRIVATE_KEY = "cece4f25ac74deb1468965160c7185e07dff413f23fcadb611b05ca37ab0a52e" TEST_TO_ADDRESS = "0x944fDcD1c868E3cC566C78023CcB38A32cDA836E" @@ -105,7 +105,7 @@ func TestEngineExecution(t *testing.T) { payload, err := executionClient.GetTxs(ctx) require.NoError(tt, err) - require.Len(tt, payload, nTxs+1) + require.Lenf(tt, payload, nTxs+1, "expected %d transactions, got %d", nTxs+1, len(payload)) allPayloads = append(allPayloads, payload) @@ -137,6 +137,10 @@ func TestEngineExecution(t *testing.T) { } }) + if t.Failed() { + return + } + // start new container and try to sync t.Run("Sync chain", func(tt *testing.T) { jwtSecret := setupTestRethEngine(t) @@ -383,9 +387,16 @@ func TestSubmitTransaction(t *testing.T) { lastNonce, err = rpcClient.NonceAt(ctx, address, new(big.Int).SetUint64(height)) require.NoError(t, err) - for i := 0; i < 10; i++ { - tx := getRandomTransaction(t, 22000) - submitTransaction(t, tx) + for s := 0; s < 30; s++ { + startTime := time.Now() + for i := 0; i < 5000; i++ { + tx := getRandomTransaction(t, 22000) + submitTransaction(t, tx) + } + elapsed := time.Since(startTime) + if elapsed < time.Second { + time.Sleep(time.Second - elapsed) + } } }