Skip to content

Stage C: pure-Go FVM via wazero (remove filecoin-ffi dep #2) #89

Description

@Reiers

Part of #87 (Full Node epic). Research track, multi-month, high risk — not scheduled yet.

Replace the filecoin-ffi FVM (TipSetState / message re-execution) with a pure-Go implementation, removing Rust dependency #2. This is what turns the F3-anchored full node into a trustless re-executing full node in pure Go on a Mac mini.

The tech

  • ref-fvm = a Rust crate embedding wasmtime to run the builtin actors (compiled to WASM).
  • Pure-Go path: wazero (tetratelabs) — a production-grade, CGo-free, pure-Go WASM runtime — runs the actor WASM.

Why it's the hard one

The actors need ref-fvm's full hostcall surface (IPLD state get/put, crypto syscalls, randomness, send/invoke semantics, exit/revert) and gas metering matched byte-and-gas-exact to the network. A gas mismatch of one unit = a different state root = fork off the network. Porting = re-implementing ref-fvm's host environment in Go with exact fidelity + vector matching.

Tasks (research spike first)

  • Spike: run a trivial builtin-actor WASM under wazero
  • Map ref-fvm hostcall/syscall surface -> Go equivalents
  • Gas-model fidelity plan + vector strategy
  • Go/no-go decision after spike

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureTrust model / swarm designenhancementNew feature or requestp3Low priority

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions