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

Implement eth_getLogs endpoint #315

Open
6 tasks
acolytec3 opened this issue Jul 19, 2022 · 3 comments
Open
6 tasks

Implement eth_getLogs endpoint #315

acolytec3 opened this issue Jul 19, 2022 · 3 comments

Comments

@acolytec3
Copy link
Collaborator

acolytec3 commented Jul 19, 2022

Not 100% sure what all goes into this but at a minimum:

  • Add support for transaction receipts to history network
  • Look at EthereumJS client and see how getLogs is implemented
  • Build out some sort of canonicalIndex for transaction -> block mapping
  • Add getTransactionReceipt to history protocol
  • Add getLogs method to history protocol
  • Integrate getTransactionReceipt and getLogs in browser and cli clients

cc: @ScottyPoi this will serve as our tracking issue for receipts/logs. Feel free to add/update/whatever or comment here as we learn more

@acolytec3
Copy link
Collaborator Author

I've done some initial research on how receipts are handled in the ethjs monorepo and I think we might need to just copy some small bits of code. The receipts stuff is spread across vm and client. Since we're just handing the data structures, we definitely won't to bring in all the dependency bloat that would come from importing the client and vm just to get a few helper methods.

@ScottyPoi
Copy link
Collaborator

I started working it out in the browser client and came to similar conclusions.

Is the idea, generally, that the network will store receipts individually by transaction hash? Or are we trying to store whole blocks worth of receipts?

@acolytec3
Copy link
Collaborator Author

No, per [this][(https://github.com/ethereum/portal-network-specs/blob/master/history-network.md#receipts) the receipts are stored per block. So if a block has transactions, there should be a corresponding list of receipts that are passed around the network as one blob of data encoded per the typing in the spec.

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

No branches or pull requests

2 participants