For more information on the motivation and importance of having a compatibility test suite, see https://notes.ethereum.org/@yoav/unified-erc-4337-mempool
For the formal schema EIP-4337 bundler RPC API spec, see https://github.com/eth-infinitism/bundler-spec
The spec test for previous releases
Python version 3.8+ PDM - python package and dependency manager version 2.2.1+
Run pdm install && pdm run update-deps
Assuming you already have an Ethereum node running, EntryPoint deployed and your bundler running and ready for requests, you can run the test suite with:
pdm testWith the following parameters:
- --url the bundler to test (defaults to http://localhost:3000)
- --entry-point (defaults to
0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108) - --ethereum-node (defaults to http://localhost:8545)
- --launcher-script (See below)
- -k <regex>, (or any other pytest param)
You can provide a launcher script by adding the option --launcher-script to the command line.
Your launcher script will be invoked by the shell with:
<launcher-script-file> {start|stop|restart}where:
startshould start an Ethereum node, deploy an EntryPoint contract and start your bundler.stopshould terminate both the Ethereum node and your bundler processes, and cleanup if necessary.restartshould stop and start atomically.
See https://github.com/eth-infinitism/bundler-test-executor, for the test executor to run the test suite against all registered bundler implementations.