Skip to content

FVM crate extraction/refactor #969

@Stebalien

Description

@Stebalien

Motivation:

  • Abstracting over multiple FVM versions is somewhat painful because some "common" types live in this repo. This is requiring quite a few annoying and otherwise unnecessary conversions in the FFI.
  • Changes/enhancements to our "ipld" types require changes to this repo.
  • Changes to, e.g., the "token amount" type only apply to a single FVM version.

Note: We don't have to be concerned about accidentally changing actor behavior, because actor behavior is fixed on each network upgrade (when we compile to wasm). That gives us a lot more flexibility to iterate on some of these datastructures.

General idea:

  • Move everything in "ipld" into a new repo (fvm-ipld-structures? or maybe just fvm-datastructures? or fil-something?). We could do multiple repos, but that probably isn't worth it.
  • Move TokenAmount and Address from "shared" to their own crates. We can import these in fvm_shared, but pulling them into a new crate will make it easier to abstract over multiple versions (and iterate).
  • Try to get rid of "raw bytes" in interfaces. This is basically just a Vec<u8> with some other features, but it pollutes and complicates some interfaces (feat: remove RawBytes from APIs #965).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Kind: ImprovementAn improvement of something that exists.P2P2: Should be resolved

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions