Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eth_getBlockByNumber failing with Error invoking RPC: Error invoking RPC: Invalid value - cannot pass negative number #3416

Open
sgrsaga opened this issue Jan 24, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@sgrsaga
Copy link

sgrsaga commented Jan 24, 2025

Description

Hedera mainnet is having issues with calling this block "0x4475775" with Json RPC method "eth_getBlockByNumber"

Request

curl --location "mynode-ip" \
--header "Content-Type: application/json" \
--data "{
    \"method\":\"eth_getBlockByNumber\",
    \"params\":[\"0x4475775\", true],
    \"id\":1,
    \"jsonrpc\":\"2.0\"
}"

Response:
Error code 500

{
    "error": {
        "code": -32603,
        "message": "[Request ID: 5412474a-5422-4882-b409-243c7d834e35] Error invoking RPC: Invalid value - cannot pass negative number"
    },
    "jsonrpc": "2.0",
    "id": 1
}

But same block can be called via direct call

https://mymainnet-node/api/v1/blocks/71784309

It returns value:

{
    "count": 6,
    "hapi_version": "0.55.2",
    "hash": "0xbf427aa2d4544529ad2d748c80c4e75d86ae617e2eeef2965caf10e80cea6e43c568ae35eaa080aec10eaefbed772256",
    "name": "2024-11-20T10_17_10.392550000Z.rcd.gz",
    "number": 71784309,
    "previous_hash": "0x2ffd2b77a11e7ef4d0cf262846bdf7644cad793f3c7bb68d1e662fff2aef53e8b6016ccbf85feeac740f0eab63ed1974",
    "size": 1517,
    "timestamp": {
        "from": "1732097830.392550000",
        "to": "1732097830.761018000"
    },
    "gas_used": 0,
    "logs_bloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}

Similar issue is reported in #2557

Further I verified the same call with public end point as well and we get the same error.

curl --location "https://mainnet.hashio.io/api" \
--header "Content-Type: application/json" \
--data "{
    \"method\":\"eth_getBlockByNumber\",
    \"params\":[\"0x4475775\", true],
    \"id\":1,
    \"jsonrpc\":\"2.0\"
}"

Steps to reproduce

Request

curl --location "mynode-ip" \
--header "Content-Type: application/json" \
--data "{
    \"method\":\"eth_getBlockByNumber\",
    \"params\":[\"0x4475775\", true],
    \"id\":1,
    \"jsonrpc\":\"2.0\"
}"

Additional context

No response

Hedera network

mainnet

Version

v0.63.1

Operating system

Linux

@Nana-EC
Copy link
Collaborator

Nana-EC commented Jan 27, 2025

@natanasow believes it might be resolved with his upcoming PR

@natanasow
Copy link
Collaborator

The upcoming PR #3387.

@natanasow natanasow self-assigned this Jan 28, 2025
@natanasow natanasow moved this from Backlog to Tasks In Progress in Smart Contract Sprint Board Jan 28, 2025
@natanasow natanasow moved this from Tasks In Progress to In Review in Smart Contract Sprint Board Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Review
Development

No branches or pull requests

4 participants