ethereum / retesteth

testeth via RPC. Test run, generation by t8ntool protocol
http://retesteth.ethdevops.io/
GNU General Public License v3.0
116 stars 76 forks source link

London fork is requiered in config file #141

Closed strauss-m closed 3 years ago

strauss-m commented 3 years ago

I stubbled on an issue while testing v0.1.1-eip1559 against a client that doesn't support the London fork.

From my understanding, the config "forks" section lists the supported fork versions of the client under testing. When "London" is not present, launching retesteth ends up with the following error:

➜  retesteth ./dretesteth.sh -t BlockchainTests/ValidBlocks/bcGasPricerTest --  --testpath ~/tools/retesteth/tests --datadir /tests/config --verbosity 6 --singletest RPC_API_Test --nodes redacted.client.address --clients besu --singlenet Istanbul

Running 1 test case...
Running tests using path: /tests
Active client configurations: 'besu '
Checking test filler hashes for BlockchainTests/ValidBlocks/bcGasPricerTest
Filter: 'RPC_API_Test Istanbul'
Running tests for config 'Hyperledger Besu on TCP' 2
Test Case "bcGasPricerTest":
100%
Run new connection session for `8525014079904741544`
addr: 192.168.65.2:8546
New instance started
Running RPC_API_Test: (8525014079904741544)
Parse test
Parse test done
Running RPC_API_Test_Istanbul
Finishing retesteth run
/retesteth/retesteth/TestOutputHelper.cpp(208): error: in "BlockchainTests/ValidBlocks/bcGasPricerTest":
*** Total Tests Run: 0

Error: Fork name `London` not found in current config! (bcGasPricerTest/RPC_API_Test_Istanbul, fork: Istanbul, block: 0)

--------
TestOutputHelper detected 1 errors during test execution!

*** 1 failure is detected in the test module "Master Test Suite"

Error: Fork name `London` not found in current config! (bcGasPricerTest/RPC_API_Test_Istanbul, fork: Istanbul, block: 0)

even when explicitely specifying a version with --singlenet.

How to reproduce:

Expected behaviour:

Observed behaviour:

winsvega commented 3 years ago

yes. even if one fork is selected. test is parsed for all present forks. make sure the London config exist for client besu in your data folder.

in config/besu/config file

"forks" : [
        "Frontier",
        "Homestead",
        "EIP150",
        "EIP158",
        "Byzantium",
        "Constantinople",
        "ConstantinopleFix",
        "Istanbul",
        "Berlin",
        "London"
    ],

in config/besu/genesis/London.json


{
    "params" : {
       "homesteadForkBlock" : "0x00",
       "EIP150ForkBlock" : "0x00",
       "EIP158ForkBlock" : "0x00",
       "byzantiumForkBlock" : "0x00",
       "constantinopleForkBlock" : "0x00",
       "constantinopleFixForkBlock" : "0x00",
       "istanbulForkBlock" : "0x00",
       "berlinForkBlock" : "0x00",
       "londonForkBlock" : "0x00",
       "chainID" : "0x01"
    },
    "accounts" : {
    }
}

in config/besu/genesis/correctMiningReward.json

{
    "//comment" : "State Tests does not calculate mining reward in post conditions, so when filling a blockchain test out of it, the mining reward must be set",
    "Frontier":          "5000000000000000000",
    "Homestead":         "5000000000000000000",
    "EIP150":            "5000000000000000000",
    "EIP158":            "5000000000000000000",
    "Byzantium":         "3000000000000000000",
    "Constantinople":    "2000000000000000000",
    "ConstantinopleFix": "2000000000000000000",
    "Istanbul":          "2000000000000000000",
    "Berlin" :           "2000000000000000000",
    "London" :           "2000000000000000000"
}
winsvega commented 3 years ago

the latest retesteth develop or spdataobj branch have the London config for besu by default