You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getTipsetByEthBlockNumberOrHash is a function in Lotus used to retrieve a tipset. It accepts predefined strings such as "pending" or "latest". However, using "earliest" will result in an error.
This function is utilized in several Ethereum endpoints:
EthGetTransactionCount
EthGetBlockReceiptsLimited
EthGetCode
EthGetStorageAt
EthGetBalance
EthEstimateGas
EthCall
In Forest, a similar function exists called tipset_by_block_number_or_hash. The key difference is that Forest also supports additional predefined strings such as "safe" and "finalized".
This function is used by:
EthGetTransactionCount
EthGetCode
EthGetStorageAt
EthGetBalance
EthEstimateGas
EthCall
And
EthFeeHistory
EthGetBlockByHash
EthGetBlockByNumber
EthGetTransactionByBlockNumberAndIndex
EthTraceBlock
For the second list of functions, support for "safe" and "finalized" might be required. However, Forest is likely to diverge from Lotus in the first list.
To address these differences, we should:
Use clear types: Split the Predefined type into subtypes where necessary. For instance, functions like EthGetBlockByNumber should only accept the required subtype (e.g., a hexadecimal block number).
Expand API coverage: Ensure the API supports all possible values for predefined strings, including both accepted and rejected values, to improve robustness and compliance with the specification. This is especially important for defining a Common Node API and an OpenRPC specification.
Environment (please complete the following information):
OS:
Branch/commit
Hardware
Other information and links
The text was updated successfully, but these errors were encountered:
Describe the bug
getTipsetByEthBlockNumberOrHash
is a function in Lotus used to retrieve a tipset. It accepts predefined strings such as "pending" or "latest". However, using "earliest" will result in an error.This function is utilized in several Ethereum endpoints:
In Forest, a similar function exists called
tipset_by_block_number_or_hash
. The key difference is that Forest also supports additional predefined strings such as "safe" and "finalized".This function is used by:
And
For the second list of functions, support for "safe" and "finalized" might be required. However, Forest is likely to diverge from Lotus in the first list.
To address these differences, we should:
Use clear types: Split the Predefined type into subtypes where necessary. For instance, functions like
EthGetBlockByNumber
should only accept the required subtype (e.g., a hexadecimal block number).Expand API coverage: Ensure the API supports all possible values for predefined strings, including both accepted and rejected values, to improve robustness and compliance with the specification. This is especially important for defining a Common Node API and an OpenRPC specification.
Environment (please complete the following information):
Other information and links
The text was updated successfully, but these errors were encountered: