forest
forest copied to clipboard
Lotus' OpenRPC definitions are inaccurate
Forest wants to use Lotus' OpenRPC definitions to ensure RPC compatibility. But we've found that most endpoints are incorrect.
Here are some examples:
Snippets are taken from Lotus' OpenRPC definitions, and extraneous items have been redacted for brevity. Tested against Lotus v1.23.3
Objects in spec do not match objects in practice
{
"name": "Filecoin.WalletList",
"result": {
"description": "[]address.Address",
"schema": {
"items": [
{
"additionalProperties": false,
"type": [
"object"
]
}
],
"type": [ "array" ]
},
"required": true,
}
},
Claims to return an array of empty objects: [ {}, {}, {} ], but actually returns an array of strings
{
"name": "Filecoin.ChainHasObj",
"params": [
{
"description": "cid.Cid",
"schema": {
"examples": [
{
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
}
],
"type": [ "string" ]
},
"required": true,
}
],
Claims to accept a string but in actually accepts only objects like { "/": "<some CID>" }.
Note that the example does match the schema.
The schema does not represent all (stable) endpoints
Filecoin.Version does not appear in the schema, but is callable, and appears in the documentation
@aatifsyed Should it be rather an issue in lotus?
https://github.com/filecoin-project/lotus/issues/12164