-
Notifications
You must be signed in to change notification settings - Fork 3
Aida RPC
Aida RPC is a command for testing RPC interface inside StateDB. It tests the correctness of the historic data in StateDB, communication between StateDB and VM and the RPC interface itself.
It replays RPC requests into the StateDB and compares the result with response in record.
ShadowDb can be used with RPC - see ShadowDb documentation for more details
As off right now, these are the supported methods from the eth namespace:
- getBalance
- getTransactionCount
- call
- getCode
- getStorageAt

- System Under Test
- VM and Archive
- Configurable Functional Tests
- Check results of StateDB RPC requests
- Non-Functional Tests
- Memory-Consumption
- Disk-Space
- Runtime of operations
- Data set (offline)
- Mainnet
You need a configured Go language environment to build the CLI application. Please check the Go documentation for the details of installing the language compiler on your system. You will also need a RPC Recording file.
To build the aida-rpc application, run make aida-rpc.
The build process downloads all the needed modules and libraries, you don't need to install these manually.
The aida-rpc executable application will be created in /build folder.
./build/aida-rpc --api-recording path/to/api-recording --db-src path/to/statedb/with/archive --aida-db /path/to/aida-db <blockNumFirst> <blockNumLast>
executes recorded requests into StateDB with block range between blockNumFirst-blockNumLast and compares its results with recorded responses.
Requests need to be in block range of given StateDB otherwise they will not be executed.
GLOBAL:
--rpc-recording value, -r value Path to source file with recorded API data
--workers value, -w value determines number of workers (default: 4)
--vm-impl value select VM implementation (default: "geth")
--log value, -l value Level of the logging of the app action ("critical", "error", "warning", "notice", "info", "debug"; default: INFO) (default: "info")
--chainid value ChainID for replayer (default: 0)
--continue-on-failure continue execute after validation failure detected (default: false)
--validate enables all validations (default: false)
--no-heartbeat-logging disables heartbeat logging (default: false)
--err-logging value defines path to error-log-file where any PROCESSING error is recorded
--track-progress enables track progress logging (default: false)
--register-run value When enabled, register results/metadata to an external service.
--overwrite-run-id value Use provided run id instead of auto-generating run id
--shadow-db use this flag when using an existing ShadowDb (default: false)
--db-src value sets the directory contains source state DB data
--db-logging value sets path to file for db-logging output
--trace enable tracing (default: false)
--trace-file value set storage trace's output directory (default: "./")
--trace-debug enable debug output for tracing (default: false)
--cpu-profile value enables CPU profiling
--memory-profile value enables memory allocation profiling
--profile enable profiling (default: false)
--profile-file value output file containing profiling data