Skip to content
This repository was archived by the owner on May 30, 2025. It is now read-only.
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 docker/chain/genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"nonce": "0x0",
"timestamp": "0x0",
"extraData": "0x",
"gasLimit": "0x1c9c380",
"gasLimit": "0x1c9c38000",
"difficulty": "0x0",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
Expand Down
8 changes: 7 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
21 changes: 16 additions & 5 deletions execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
}
}
}

Expand Down
Loading