Runs a Fraktal VM client to host compute
Stand-alone C++20 executable and library used to provide Fraktal VM compute. Fraktal VM is a superset of the EVM, which allows parallelism and concurrency in contract execution. The design is inspired by golang's goroutines & runtime.
make all
NOTE: Dependencies must be compiled & linked into compilation aswell.
fraktal-vm comes with one main command to run :
./bin/fraktal-vm run --stateSnapshot ./path/to/snapshot.json --txPoolSnapshot ./path/to/transactions.csv
- intx : 256-bit (32-byte) unsigned integers
- ethash : Ethereum hash functions
- evm-cpp-utils : EVM state & account types + utils
- proc-evm : EVM execution & Call context
- fraktal-state-db : Fraktal VM nonce-locked state & accounts
This repo contains various tests under ./test/
to make sure things are working.
To run use :
make run-fraktal-vm-test
# After txs run, Ctrl-C to stop VM runtime
Check the diff in ./test/snapshot.json
to see if things processed properly.
Running the Fraktal-VM does the following :
- Load the
FraktalState
from a snapshot - Load the
TxPool
from a snapshot - Create a pool of
EVMThread
objects, making thethreadPool
- Start the
TxPoolServer
in its own thread to accept txs intoTxPool
- Start spinning each thread in the
threadPool
- Wait till Fraktal VM runtime is killed, then snapshot
FraktalState
+TxPool
Each EVMThread
does the following :
- Get transaction from pool, if none available then spin
- Run the transaction using
CallContext
on aFraktalAccount
. - Remove Tx from pool
- Repeat
NOTE: Not currently implemented, but Tx processing will be changed to coroutines processing.
Brandon Roberts @b-j-roberts