filecoin-project / filecoin-project/ref-fvm

generate a machine-readable syscall descriptor file

Open
#623 5 comments 0 reactions 0 assignees View on GitHub
Kind: Feature Topic: SDK
Dominant language
Rust
Stars
422
Forks
154
Avg merge
2d 16h
Merged PRs (30d)
12

Description

Two SDK teams (@ainhoa-a and @dtynn) have independently come up with the idea of creating a machine-readable JSON (or like) descriptor of FVM syscalls out of the [FFI definitions](https://docs.rs/fvm_sdk/0.6.1/fvm_sdk/sys/index.html) (source of truth).

Assuming JSON, this would likely be some form of a top-level array, containing one entry per syscall. Every entry would contain:

- name of the module
- name of the function
- whether it's privileged or not (see #468)
- input parameters (array)
- return value, if any (we don't support multi-value returns)
- error numbers

An open question is whether to include documentation or not.

Contributor guide

Open the contributing guide

Research direction

Start with the FFI definitions in fvm_sdk::sys, identified as the source of truth, and inspect how syscall modules and functions expose their parameters, returns, privileges, and error numbers. Define the descriptor schema, resolve whether documentation belongs in it, and consider how generation should stay aligned with those definitions; done means one machine-readable entry exists for every syscall with the agreed fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
json, rust
Domain
blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.