This repository contains the reference implementation of the Filecoin VM (specs). It is written in Rust, and intended to be integrated via FFI into non-Rust clients (e.g. Lotus, Fuhon), or directly into Rust clients (e.g. Forest). FFI bindings for Go are provided in-repo, and developers are encouraged to contribute bindings for other languages.
rust-toolchain
(this is picked up by rustup
automatically).$ git clone https://github.com/filecoin-project/ref-fvm.git
$ cd fvm
$ rustup target add wasm32-unknown-unknown
$ make
Here's what you'll find in each directory:
/fvm
Machine
: an instantiation of the machine, anchored at a specific state root and epoch, ready to intake messages to be applied.Executor
: an object to execute messages on a Machine
.CallManager
: tracks and manages the call stack for a given message.Kernel
: the environment attached to an invocation container for external interactions.Syscalls
.Externs
./sdk
/shared
/ipld
/testing/conformance
criterion
Rust library to measure the performance and overhead of ref-fvm across various facets.VECTOR=test-vectors/corpus/specs_actors_v6/REST_OF_TEST_VECTOR.json cargo test -- conformance --nocapture
VECTOR=test-vectors/corpus/specs_actors_v6/REST_OF_TEST_VECTOR.json cargo bench -- conformance --nocapture
VECTOR=test-vectors/corpus/specs_actors_v6/REST_OF_TEST_VECTOR.json cargo bench -- overhead --nocapture
. Note that the vector choice doesn't matter much, because the Machine initialization procedure is identicall for all vectors.CARGO_PROFILE_BENCH_DEBUG=true VECTOR=testing/conformance/test-vectors/corpus/specs_actors_v6/REST_OF_TEST_VECTOR.json cargo flamegraph --bench bench_conformance -- --nocapture
. The output SVG will be in flamegraph.svg
.bench_init_only
: measure the overhead of running the benchmark itself, it doesn't send any messages to the FVM to process.bench_500_simple_state_access
: measures the overhead of calling the pubkey_address
method on an account actor 500 times, this is the most lightweight message possible to send that actually executes actor logic (unlike a bare send).Dual-licensed: MIT, Apache Software License v2, by way of the Permissive License Stack.
actors and vm forked from ChainSafe/forest
commit: 73e8f95a108902c6bef44ee359a8478663844e5b
Version | Tag | Published |
---|---|---|
0.4.2 | 14d ago | |
0.4.1 | 2mos ago | |
0.4.0 | 3mos ago | |
0.3.0 | 3mos ago |