Skip to content

eth_getBalance ignores block param and accepts empty address #19

@Siddharth2812

Description

@Siddharth2812

Problem

eth_getBalance accepts a block parameter, but the current implementation does not actually return balance from that block.

Proposed Solution

Validate the address before processing the request. If block-based balance lookup is not supported yet, return a clear error instead of silently using the latest balance. Keep eth_getBalance read-only and avoid creating accounts/DIDs during balance checks.

Alternatives Considered

Continue returning latest balance for any block input, but that is misleading for RPC clients and not Ethereum-compatible.

Additional Context

Example request with invalid input currently returning success:

curl -X POST https://rpc.jmdt.io \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": ["", "0x10"],
    "id": 1
  }'

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions