This repo contains the code for the on-chain built-in actors that power the Filecoin network starting from network version 16, epoch 1960320 on 2022-07-06.
These actors are written in Rust and are designed to operate inside the Filecoin Virtual Machine. A reference implementation of the latter exists at filecoin-project/ref-fvm.
The build process of this repo compiles every actor into Wasm bytecode and generates an aggregate bundle to be imported by all clients. The structure of this bundle is standardized. Read below for details.
This codebase was canonicalized in FIP-0031. As a result, this actor implementation is the only one recognized by the network from network version 16 onwards.
Actors for the following network versions prior to nv16 are implemented here as well:
The main output of this repo is a CARv1 archive bundling all Wasm bytecode for all actors into a single file, with the following characteristics:
Manifest type (defined below) containing a version
number for the bundle format (currently always 1) and a CID for a
ManifestPayload.ManifestPayload (defined below) is contained within a DAG-CBOR encoded
block and defines a type that associates actor type names with their
corresponding CIDs.# Manifest is encoded as: [version, CID]
type Manifest struct {
version Int
payload &ManifestPayload
} representation tuple
# ManifestPayload is encoded as: [ ["actorkey", CID], ["actorkey", CID], ... ]
#
# It alternatively may be interpreted as:
# type ManifestPayload {String : &ActorBytecode} representation listpairs
# Or simply as a list of tuples.
type ManifestPayload struct {
system &ActorBytecode
init &ActorBytecode
cron &ActorBytecode
account &ActorBytecode
storagepower &ActorBytecode
storageminer &ActorBytecode
storagemarket &ActorBytecode
paymentchannel &ActorBytecode
multisig &ActorBytecode
reward &ActorBytecode
verifiedregistry &ActorBytecode
datacap &ActorBytecode
placeholder &ActorBytecode
evm &ActorBytecode
eam &ActorBytecode
ethaccount &ActorBytecode
} representation listpairs
# RAW block
type ActorBytecode bytes
Precompiled actor bundles are provided as release binaries in this repo. The
fil_builtin_actors_bundle crate on
crates.io will not be updated.
See RELEASE.md for the release process.
There are two options:
Instructions to build from source (option 1):
make bundle from the workspace root.The bundle be written to output/builtin-actors.car.
Both options are compatible with automation via scripts or CI pipelines.
This part is implementation-specific. Options include:
Once the implementation has validated the authenticity of the bundle, it is expected to do the following:
Because every network version may be backed by different actor code, implementations should be ready to load multiple actor bundles and index them by network version.
When instantiating the ref-fvm Machine, both the network version and the corresponding Manifest root CID must be passed.
A fair question is how crate versioning relates to the protocol concept of
ActorVersion. We adopt a policy similar to specs-actors:
ActorVersion.0.Development versions will use qualifiers such as -rc (release candidate).
As an example of application of this policy to a v10 actor version lineage:
This repo supersedes specs-actors, and fulfils two roles:
This codebase was originally forked from the actors v6 implementation of the Forest client, and was adapted to the FVM environment.
See CONTRIBUTING.md for guidelines on how to contribute to this project.
Because this codebase is a common good across all Filecoin client implementations, it serves as a convergence area for all Core Devs regardless of the implementation or project they identify with.
Dual-licensed: MIT, Apache Software License v2, by way of the Permissive License Stack.
Except the EVM precompile test data, which is licensed under the LGPL v3 and not included in crates or build artifacts.
(top 30 of 47)
Rust
98.4%
Solidity
1.4%
This repo contains the code for the on-chain built-in actors that power the Filecoin network starting from network version 16, epoch 1960320 on 2022-07-06.
These actors are written in Rust and are designed to operate inside the Filecoin Virtual Machine. A reference implementation of the latter exists at filecoin-project/ref-fvm.
The build process of this repo compiles every actor into Wasm bytecode and generates an aggregate bundle to be imported by all clients. The structure of this bundle is standardized. Read below for details.
This codebase was canonicalized in FIP-0031. As a result, this actor implementation is the only one recognized by the network from network version 16 onwards.
Actors for the following network versions prior to nv16 are implemented here as well:
The main output of this repo is a CARv1 archive bundling all Wasm bytecode for all actors into a single file, with the following characteristics:
Manifest type (defined below) containing a version
number for the bundle format (currently always 1) and a CID for a
ManifestPayload.ManifestPayload (defined below) is contained within a DAG-CBOR encoded
block and defines a type that associates actor type names with their
corresponding CIDs.# Manifest is encoded as: [version, CID]
type Manifest struct {
version Int
payload &ManifestPayload
} representation tuple
# ManifestPayload is encoded as: [ ["actorkey", CID], ["actorkey", CID], ... ]
#
# It alternatively may be interpreted as:
# type ManifestPayload {String : &ActorBytecode} representation listpairs
# Or simply as a list of tuples.
type ManifestPayload struct {
system &ActorBytecode
init &ActorBytecode
cron &ActorBytecode
account &ActorBytecode
storagepower &ActorBytecode
storageminer &ActorBytecode
storagemarket &ActorBytecode
paymentchannel &ActorBytecode
multisig &ActorBytecode
reward &ActorBytecode
verifiedregistry &ActorBytecode
datacap &ActorBytecode
placeholder &ActorBytecode
evm &ActorBytecode
eam &ActorBytecode
ethaccount &ActorBytecode
} representation listpairs
# RAW block
type ActorBytecode bytes
Precompiled actor bundles are provided as release binaries in this repo. The
fil_builtin_actors_bundle crate on
crates.io will not be updated.
See RELEASE.md for the release process.
There are two options:
Instructions to build from source (option 1):
make bundle from the workspace root.The bundle be written to output/builtin-actors.car.
Both options are compatible with automation via scripts or CI pipelines.
This part is implementation-specific. Options include:
Once the implementation has validated the authenticity of the bundle, it is expected to do the following:
Because every network version may be backed by different actor code, implementations should be ready to load multiple actor bundles and index them by network version.
When instantiating the ref-fvm Machine, both the network version and the corresponding Manifest root CID must be passed.
A fair question is how crate versioning relates to the protocol concept of
ActorVersion. We adopt a policy similar to specs-actors:
ActorVersion.0.Development versions will use qualifiers such as -rc (release candidate).
As an example of application of this policy to a v10 actor version lineage:
This repo supersedes specs-actors, and fulfils two roles:
This codebase was originally forked from the actors v6 implementation of the Forest client, and was adapted to the FVM environment.
See CONTRIBUTING.md for guidelines on how to contribute to this project.
Because this codebase is a common good across all Filecoin client implementations, it serves as a convergence area for all Core Devs regardless of the implementation or project they identify with.
Dual-licensed: MIT, Apache Software License v2, by way of the Permissive License Stack.
Except the EVM precompile test data, which is licensed under the LGPL v3 and not included in crates or build artifacts.
(top 30 of 47)
Rust
98.4%
Solidity
1.4%