Skip to main content

Module engine_test

Module engine_test 

Source
Expand description

Test runner for blockchain tests in the engine format.

Each fixture gets a fresh temporary database with its genesis, and the engine stack a node builds on it: the engine tree with BasicEngineValidator and its persistence service, and the [EngineApi] handler. The fixture’s parameters go, unchanged, through the handler’s JSON-RPC method table for engine_newPayloadV<n> and engine_forkchoiceUpdatedV<n> at the versions the fixture names, so the handler’s own parameter decoding and version checks run. No node, RPC server or network is started.

Functions§

run_fixtures
Runs every fixture in the JSON files on workers threads and passes one result per fixture to on_result as it completes. A file that fails to load is reported as an error, without creating a fixture result. Each datadir is created in the temporary directory (TMPDIR), where a tmpfs avoids disk syncs, and its genesis is written with storage_settings. Returns an error if the fixture engines cannot be cleaned up completely.