Skip to content

query.function_call ReadRPC returns error while NEAR RPC succeeds #115

Closed
@khorolets

Description

@khorolets

The request

{
  "jsonrpc": "2.0",
  "id": "dontcare",
  "method": "query",
  "params": {
    "request_type": "call_function",
    "block_id": 100523214,
    "account_id": "ofpcore.near",
    "method_name": "get_stages_max_number",
    "args_base64": "eyJwcm9qZWN0X2lkIjogIjE2NjE5NDk3NjkxOTIifQ=="
  }
}

ReadRPC response

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32000,
        "message": "Server error",
        "data": "Function call returned an error: wasm execution failed with error: CompilationError(PrepareError(Deserialization))",
        "name": "HANDLER_ERROR",
        "cause": {
            "info": {
                "block_hash": "74ENVfd6tHDCoKEfipcFWMDFyeJQR1EMX1J86oF2smtZ",
                "block_height": 100523214,
                "vm_error": "wasm execution failed with error: CompilationError(PrepareError(Deserialization))"
            },
            "name": "CONTRACT_EXECUTION_ERROR"
        }
    },
    "id": "dontcare"
}

NEAR RPC response

{
    "jsonrpc": "2.0",
    "result": {
        "block_hash": "74ENVfd6tHDCoKEfipcFWMDFyeJQR1EMX1J86oF2smtZ",
        "block_height": 100523214,
        "logs": [],
        "result": [
            34,
            51,
            50,
            34
        ]
    },
    "id": "dontcare"
}

We might need help from the contract runtime team. Perhaps there are some corner cases in the way we run the contract that lead to

"wasm execution failed with error: CompilationError(PrepareError(Deserialization))"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions