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_getBlockReceipts should be able to support blockHash params #5084

Closed
1 task done
ghost opened this issue Oct 19, 2023 · 1 comment · Fixed by #5105
Closed
1 task done

eth_getBlockReceipts should be able to support blockHash params #5084

ghost opened this issue Oct 19, 2023 · 1 comment · Fixed by #5105
Labels
C-bug An unexpected or incorrect behavior

Comments

@ghost
Copy link

ghost commented Oct 19, 2023

Describe the bug

It only supports block numbers instead.

The latest rpc specification for eth_getBlockReceipts defines to support either blockHash or block number for params

https://github.com/ethereum/execution-apis/pull/438/files#diff-116730f9786fa2f36b3c96b968f82419b2ebf694054f04dd0d3224372bf5579eR89

Here is what I got when I try to query blockHash

Error while fetching block receipts
Error: could not coalesce error (error={ "code": -32602, "data": "number too large to fit in target type", "message": "Invalid params" }, payload={ "id": 3, "jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": [ "0x1e22a0d24d014cb8c560444bce0f3f5d2c12cd32dc85306907bc0b33feb89ff9" ] }, code=UNKNOWN_ERROR, version=6.8.0)
    at makeError (/home/ubuntu/test/node_modules/ethers/lib.commonjs/utils/errors.js:129:21)
    at JsonRpcProvider.getRpcError (/home/ubuntu/test/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:653:41)
    at /home/ubuntu/test/node_modules/ethers/lib.commonjs/providers/provider-jsonrpc.js:268:45
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'UNKNOWN_ERROR',
  error: {
    code: -32602,
    message: 'Invalid params',
    data: 'number too large to fit in target type'
  },
  payload: {
    method: 'eth_getBlockReceipts',
    params: [
      '0x1e22a0d24d014cb8c560444bce0f3f5d2c12cd32dc85306907bc0b33feb89ff9'
    ],
    id: 3,
    jsonrpc: '2.0'
  },
  shortMessage: 'could not coalesce error'
}

Steps to reproduce

  1. Query 'eth_getBlockReceipts' with blockHash params
  2. Fails since the node could not recognize it

Node logs

No response

Platform(s)

No response

What version/commit are you on?

No response

What database version are you on?

No response

What type of node are you running?

Archive (default)

What prune config do you use, if any?

No response

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct
@ghost ghost added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Oct 19, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Oct 20, 2023
@ghost
Copy link
Author

ghost commented Oct 20, 2023

@mattsse That was fast, thank you

@ghost ghost mentioned this issue Nov 5, 2023
@DaniPopes DaniPopes removed the S-needs-triage This issue needs to be labelled label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug An unexpected or incorrect behavior
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant