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_transactionBy impls #1531

Closed
2 of 3 tasks
sambukowski opened this issue Feb 23, 2023 · 2 comments
Closed
2 of 3 tasks

Add eth_transactionBy impls #1531

sambukowski opened this issue Feb 23, 2023 · 2 comments
Labels
C-enhancement New feature or request

Comments

@sambukowski
Copy link
Contributor

sambukowski commented Feb 23, 2023

Describe the feature

Implement the following:

  • eth_getTransactionByHash
  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex

Additional context

Related tracking issue: #1225

I can start working on these.

@sambukowski sambukowski added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Feb 23, 2023
@mattsse
Copy link
Collaborator

mattsse commented Feb 23, 2023

Thanks
Afaik this is currently blocked until we've figured out how to go from transaction to its block (we need data from the block for the rpc response)

Cc @rakita

@rakita
Copy link
Collaborator

rakita commented Feb 25, 2023

In reth, transactions are indexed by global counter TxNumber.

eth_getTransactionByBlockNumberAndIndex
Are possible to be done with BlockBodies table that contains start_tx of that global counter and number of transaction in this block.

eth_getTransactionByBlockHashAndIndex
Block number can be get from HeaderNumbers and it becomes same story as in ByBlockNumber

eth_getTransactionByHash
We have table for it TxHashNumber to get tx global index and tx can be found in Transactions table

@mattsse mattsse closed this as completed Apr 18, 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-enhancement New feature or request
Projects
Archived in project
Development

No branches or pull requests

4 participants