sei-protocol/sei-chain

[BUG] eth_call fails when max uint256 is passed in

Closed this issue · 1 comments

Seid version
Show us output of seid version --long | head
name: sei
server_name:
version: v5.5.5-14-g6e9257d3
commit: 6e9257d
build_tags: netgo,ledger
go: go version go1.21.1 darwin/arm64
build_deps:

  • cosmossdk.io/errors@v1.0.0
  • filippo.io/edwards25519@v1.0.0-rc.1
  • github.com/99designs/go-keychain@v0.0.0-20191008050251-8e49817e8af4

Chain ID
Which chain are you running into issues with?
pacific-1

Describe the bug
eth_call endpoint fails when max uint256 is passed in as a balance override. The same call works on other EVM chains.

To Reproduce
Steps to reproduce the behavior:
Run the following:

curl -X POST -H "Content-Type: application/json" \
  --url $RPC \
  --data '{
    "jsonrpc":"2.0",
    "method":"eth_call",
    "params":[{
      "from": "0x7647DD2a41f96f4eAD50cbfb70D48E796e2450A5",
      "to": "0xef31c799B489Db6F27077f624291d365bEc51AB9",
      "value": "0x1"
    }, "latest",
    {
        "0x7647DD2a41f96f4eAD50cbfb70D48E796e2450A5": {
                "balance": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
        }
    }
    ],
    "id":1
  }'

this results in:

{"jsonrpc":"2.0","id":1,"error":{"code":-32603,"message":"method handler crashed"}}

Expected behavior
A clear and concise description of what you expected to happen.
It should print out:

{"jsonrpc":"2.0","id":1,"result":"0x"}

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Resolved here by simply returning a meaningful error #1783.