go-ethereum/cmd/workload
rjl493456442 6978ab48aa
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Keeper Build (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled
cmd/workload, eth/tracers/native: introduce state proof tests (#32247)
This pull request introduces a new workload command, providing the
features
for `eth_getProof` endpoint test generation and execution.
2025-12-15 08:35:02 +01:00
..
queries cmd/workload: rework tracegen to run tracing at block level (#32092) 2025-07-02 13:39:44 +02:00
client.go cmd/workload: introduce transaction-trace test (#31288) 2025-06-09 16:36:24 +02:00
filtertest.go cmd/workload: filter fuzzer test (#31613) 2025-10-13 19:21:01 +02:00
filtertestfuzz.go cmd/workload: filter fuzzer test (#31613) 2025-10-13 19:21:01 +02:00
filtertestgen.go cmd/workload: filter fuzzer test (#31613) 2025-10-13 19:21:01 +02:00
filtertestperf.go cmd: fix typo in comment (#32501) 2025-08-26 13:50:19 +02:00
historytest.go cmd/workload: rework tracegen to run tracing at block level (#32092) 2025-07-02 13:39:44 +02:00
historytestgen.go cmd/workload: rework tracegen to run tracing at block level (#32092) 2025-07-02 13:39:44 +02:00
main.go cmd/workload, eth/tracers/native: introduce state proof tests (#32247) 2025-12-15 08:35:02 +01:00
prooftest.go cmd/workload, eth/tracers/native: introduce state proof tests (#32247) 2025-12-15 08:35:02 +01:00
prooftestgen.go cmd/workload, eth/tracers/native: introduce state proof tests (#32247) 2025-12-15 08:35:02 +01:00
README.md cmd/workload, eth/tracers/native: introduce state proof tests (#32247) 2025-12-15 08:35:02 +01:00
testsuite.go cmd/workload, eth/tracers/native: introduce state proof tests (#32247) 2025-12-15 08:35:02 +01:00
tracetest.go cmd/workload: rework tracegen to run tracing at block level (#32092) 2025-07-02 13:39:44 +02:00
tracetestgen.go cmd/workload: rework tracegen to run tracing at block level (#32092) 2025-07-02 13:39:44 +02:00

Workload Testing Tool

This tool performs RPC calls against a live node. It has tests for the Sepolia testnet and Mainnet. Note the tests require a fully synced node.

To run the tests against a Sepolia node, use:

> ./workload test --sepolia http://host:8545

To run a specific test, use the --run flag to filter the test cases. Filtering works similar to the go test command. For example, to run only tests for eth_getBlockByHash and eth_getBlockByNumber, use this command:

> ./workload test --sepolia --run History/getBlockBy http://host:8545

Notably, trace tests require archive which keeps all the historical states for tracing. The additional flag is required to activate the trace tests.

> ./workload test --sepolia --archive --run Trace/Block http://host:8545

Regenerating tests

There is a facility for updating the tests from the chain. This can also be used to generate the tests for a new network. As an example, to recreate tests for mainnet, run the following commands (in this directory) against a synced mainnet node:

> go run . filtergen --queries queries/filter_queries_mainnet.json http://host:8545
> go run . historygen --history-tests queries/history_mainnet.json http://host:8545
> go run . tracegen --trace-tests queries/trace_mainnet.json --trace-start 4000000 --trace-end 4000100 http://host:8545
> go run . proofgen --proof-tests queries/proof_mainnet.json --proof-states 3000 http://host:8545