-
Notifications
You must be signed in to change notification settings - Fork 11
Aida RPC ADb
Aida RPC ADby 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. Any unmatched results are logged and if not specifically turned off with --continue-on-failure
flag, it will shut down the replay since any inconsistency in data needs to be investigated immediately.
ShadowDb can be used with RPC ADb - see ShadowDb documentation for more details
As off right now, these are the supported methods for both eth
and ftm
namespaces:
- getBalance
- getTransactionCount
- call
- getCode
- getStorageAt
TODO
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.
TODO
To build the aida-rpc-adb
application, run make aida-rpc-adb
.
The build process downloads all the needed modules and libraries, you don't need to install these manually.
The aida-rpc-adb
executable application will be created in /build
folder.
./build/aida-rpc-adb --api-recording path/to/api-recording --db-src path/to/statedb/with/archive --substate-db path/to/substate <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:
--api-recording path to file with recordings
--shadow-db enable shadowDb
--continue-on-failure does not stop the program when results do not match.
--db-src path to StateDB with archive
--db-logging add detailed logging of db
--log level of the logging of the app action ("critical", "error", "warning", "notice", "info", "debug"; default: INFO)
--log-to-file enables logging any data mismatch into a file
--log-file-dir sets dir where log file is going to be saved; default: /var/opera/Aida/logs
--vm-impl select VM implementation
--workers number of worker threads that execute in parallel (default: 4)
--trace enable tracing
--trace-debug enable debug output for tracing
--trace-file set storage trace's output directory