forest icon indicating copy to clipboard operation
forest copied to clipboard

Forest OpenRPC FIPs

Open aatifsyed opened this issue 1 year ago • 1 comments

Forest's 2024 roadmap includes the following:

Objective 2: Increase network governance contributions ... Key results of authoring 5 FIPs, with 2 of them being accepted...

The proposed timeline includes the following:

  1. Q2

    Propose FIP to specify default JSONRPC interface

  2. Q3

    Propose FIP to specify Miner Interface

Forest has attempted to use the results of calling the rpc.discover JSON-RPC method on Lotus to generate a compatible API, but failed^1:

  • the returned items are not always correct
  • the returned items do not contain schemas for the required parameters

We also tried codegen from go: https://github.com/ChainSafe/forest/tree/5a05dd184a6e8f9eaeb21c8f122b3f9a0b89b974/codegen

We have therefore manually implemented our RPC API from scratch.

The interface definition language for JSON-RPC interfaces is OpenRPC: https://open-rpc.org/, which can be the basis for a FIP.

We should not maintain a separate OpenRPC document for our API - it can be generated from our existing code.

This issue tracks

  • initial reflection work #4033
  • migration of endpoints #4032
  • #4365
  • Q3 FIP authoring

aatifsyed avatar Mar 07 '24 11:03 aatifsyed

End goal

  • We have Lotus' seal of approval™️ on the below
  • A complete OpenRPC (JSON) document for a subset of "client interoperability methods"
  • Text of a FIP

Current status

  • forest.openrpc
    • We believe this is structurally correct, given
      • snapshot testing
  • lotus.openrpc
    • We believe this is structurally incomplete

Outstanding work

  • [low risk] @ansermino will document each method
    • Currently in Notion, will be in Google Docs for Lotus review
  • [medium risk] @aatifsyed will find the structural inconsistencies between forest.openrpc and lotus.openrpc as a seed for discussion
  • @whom? choosing which methods belong under "client interoperability methods", which will synthesise requirements from the following stakeholders
    • Boost (have a list)
    • Curio (have a list)
    • Web3Mine?
    • Glif (have a list)
    • Lotus?
  • Code changes in forest
    • migrate descriptions to forest
    • add tagging functionality to trait RpcEndpoint
  • New repo for spec
  • stretch: generate docs
    • super stretch: nice interactive docs against a public endpoint

aatifsyed avatar May 24 '24 13:05 aatifsyed