Skip to content

Filecoin V2 APIs #5636

@elmattic

Description

@elmattic

Summary

The V2 API introduces ergonomic improvements related to the recent addition of F3:

For detailed documentation and motivation, refer to the following document:

https://www.notion.so/filecoindev/Filecoin-V2-APIs-1d0dc41950c1808b914de5966d501658#1e4dc41950c180498371f45fd6e6eb91

In general, the API methods remain mostly similar to those in the V1 API. The main differences involve how tipsets are resolved and slight changes to method interfaces.

Some methods now accept a new type (TipSetSelector), which will require adjustments. One approach could be to introduce a new set of methods for those with updated signatures, but we can keep this decision open for now.

Tasks

  • Implement a Tipset resolver (baked by the F3 APIs)
  • Implement the "selector" pattern
  • Extend api compare test framework to support the V2 APIs

List of V2 methods to support

  • Chain

    • ChainGetTipSet
  • EthBasic

    • EthChainId
    • EthProtocolVersion
    • EthSyncing
    • EthAccounts
    • Web3ClientVersion
    • NetListening
    • NetVersion
  • EthSend

    • EthSendRawTransaction
    • EthSendRawTransactionUntrusted
  • EthTransaction

    • EthBlockNumber

    • EthGetBlockTransactionCountByNumber

    • EthGetBlockTransactionCountByHash

    • EthGetBlockByHash

    • EthGetBlockByNumber

    • EthGetTransactionByHash

    • EthGetTransactionByHashLimited

    • EthGetTransactionByBlockHashAndIndex

    • EthGetTransactionByBlockNumberAndIndex

    • EthGetMessageCidByTransactionHash

    • EthGetTransactionHashByCid

    • EthGetTransactionCount

    • EthGetTransactionReceipt

    • EthGetTransactionReceiptLimited

    • EthGetBlockReceipts

    • EthGetBlockReceiptsLimited

  • EthLookup

    • EthGetCode
    • EthGetStorageAt
    • EthGetBalance
  • EthTrace

    • EthTraceBlock
    • EthTraceReplayBlockTransactions
    • EthTraceTransaction
    • EthTraceFilter
  • EthGas

    • EthGasPrice
    • EthFeeHistory
    • EthMaxPriorityFeePerGas
    • EthEstimateGas
    • EthCall
  • EthEvents

    • EthGetLogs
    • EthNewBlockFilter
    • EthNewPendingTransactionFilter
    • EthNewFilter
    • EthUninstallFilter
    • EthGetFilterChanges
    • EthGetFilterLogs
    • EthSubscribe
    • EthUnsubscribe
  • Filecoin

    • EthAddressToFilecoinAddress
    • FilecoinAddressToEthAddress
  • State

    • StateGetActor
    • StateGetID

Risks & Dependencies

F3 should work.

Additional Links & Resources

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: EpicA feature or collection of issues that achieve a greater goal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions