-
Notifications
You must be signed in to change notification settings - Fork 11
Aida VM
Aida-VM is a tool for simulating the blockchain virtual machine using substate -- a smallest fragment of world state to execute/validate a transaction. It offers an off-the-chain execution environment which allows execution of transactions in an isolation.
- System Under Test
- Virtual Machine
- Functional Tests
- Detect VM errors
- Compare transaction receipt against recorded result
- Non-functional Tests
- Performance
- Data set (offline)
- Mainnet
- Testnet
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-vm
application, run make aida-vm
.
The build process downloads all the needed modules and libraries, you don't need to install these manually.
The aida-vm
executable application will be created in /build
folder.
To use Aida VM, execute the compiled binary with the command and flags for the desired operation.
./build/aida-vm [command options] [arguments...]
Executes full state transitions and check output consistency.
./build/aida-vm replay --aida-db /path/to/aida_db --vm-impl <geth, lfvm> --validate-tx <blockNumFirst> <blockNumLast>
The aida-vm replay command requires two arguments:
<blockNumFirst> <blockNumLast>
<blockNumFirst>
and <blockNumLast>
are the first and
last block of the inclusive range of blocks to replay transactions.
replay:
--aida-db value set substate, updateset and deleted accounts directory
--workers value Number of worker threads that execute in parallel (default: 4)
--vm-impl value select VM implementation (default: "geth")
--validate-tx enables validation after transaction processing (default: false)
--chainid value ChainID for replayer (default: 0)
--buffer-size value set a buffer size for profiling channel (default: 100000)
--cpu-profile value enables CPU profiling
--diagnostic-port value enable hosting of a realtime diagnostic server by providing a port (default: 0)
--log value, -l value Level of the logging of the app action ("critical", "error", "warning", "notice", "info", "debug"; default: INFO) (default: "info")
--err-logging value defines path to error-log-file where any PROCESSING error is recorded
--db-impl value select state DB implementation ("memory" or "off-the-chain")
--db-logging value sets path to file for db-logging output
--help, -h show help