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_getReceiptProof #372

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ncitron
Copy link

@ncitron ncitron commented Jan 28, 2023

Adds a new method, eth_getReceiptProof. This method takes in a transaction hash as input, and returns both a receipt, and a merkle proof of the receipt rooted at the receipt root.

The main use case I have in mind for this is light clients that utilize an RPC to prove state. Right now, the most efficient way to verify a given receipt is to download every receipt in the block, reconstruct the merkle tree, and check that the root of it matches. This method can instead be used, and significantly reduces the amount of data the light client must consume.

Both Helios and Kevlar want to make use of this method, and I imagine other light clients would as well.

@ncitron
Copy link
Author

ncitron commented Jan 28, 2023

@etan-status pointed out that there has been some work towards migrating the receipt tree to an ssz tree in Daneb. It's probably best that we hold off on this method until after this change. Once this is decided I will update the schema to reflect the new tree format.

Copy link

@Jircs1 Jircs1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etan-status
Copy link
Contributor

Context for SSZ:

@etan-status
Copy link
Contributor

And, for a demo that shows how the SSZ receipts would look like:

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.

4 participants