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

Add eth_getBlockReceipts API #2019

Merged
merged 2 commits into from
Nov 7, 2023
Merged

Conversation

blukat29
Copy link
Contributor

@blukat29 blukat29 commented Nov 2, 2023

Proposed changes

Resolves #2006.

  • Add eth_getBlockReceipts JSON-RPC API. Accepts block number or hash.
  • Modify klay_getBlockReceipts to accept block number or hash.
  • Some eth_getBlockReceipts implementations accept block numbers, whereas klay_getBlockReceipts has been accepting block hash only. But it is standard to accept both. Therefore Klaytn's eth_ and klay_ APIs accept both block number and hash.

Types of changes

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes ($ make test)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Related issues

Further comments

@ghost
Copy link

ghost commented Nov 4, 2023

For the reference eth_getBlockReceipt must support both block hash and block number params on the input according to the finalized specification ethereum/execution-apis#393. The reason that alchemy deprecated it is because the method is originally developed by erigon which they only supported block numbers but for the external indexer indexing blocks through the rpc method I would advise to use block hash params in case of a possible reorg.

@blukat29
Copy link
Contributor Author

blukat29 commented Nov 6, 2023

@kaliubuntu0206 Thanks for the information. I have modified the paragraph for clarity.
This PR is expected to be shipped with v1.12.0 this December. If you need the feature now, please cherry-pick this PR.

@ghost
Copy link

ghost commented Nov 6, 2023

@blukat29 Could you also research that path based database scheme implementation from the upstream geth would be possible? #2021

@blukat29 blukat29 merged commit b0e0cc0 into klaytn:dev Nov 7, 2023
11 checks passed
@blukat29 blukat29 deleted the eth-getblockreceipts branch November 7, 2023 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Supporting eth_getBlockReceipts
3 participants