-
Notifications
You must be signed in to change notification settings - Fork 643
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
RPC for receiving proofs towards execution outcome for the light client #2712
Comments
Assigning to @bowenwang1996 since he is working on the light client implementation and setting priority to P0 since it is a blocker for the bridge implementation. |
@nearmax from the light client side, if they want to verify the authenticity of a transaction are they going to need proofs to every single receipt generated by the transaction? |
@bowenwang1996 For now they would need a proof to the receipt that did a specific function call. So this RPC endpoint will be used together with another RPC endpoint that returns receipts for the given transaction (I assume we have such RPC endpoint). |
@nearmax just realized an issue while implementing this: proofs for execution outcomes are garbage collected so they will only be kept for five epochs. Will we run an archival node for the light client? |
Yes, but for now, let's not focus on that. |
@nearmax there is a missing piece in the merklization of things (we missed some proofs) -- that's why I am asking. If we think that using archival nods is fine, I'll add the proofs and garbage collect them so that we don't have to worry about the impact on disk usage too much. |
Sounds good. |
FYI. Missing part -- near-api-js wrapper. @bowenwang1996 volunteered to implement it. |
Nearcore implementation: #2737 |
We need to add an RPC endpoint that given the following:
Returns:
The proof of this execution outcome that can be verified by the light client using the head block. The proof should include:
inner_rest_hash
andBlockHeaderInnerLiteView
of the block that includes execution outcome;If transaction/receipt is not known a special error should be returned;
If head is behind the block that contains the outcome another special error should be returned;
If head is not the part of the canonical chain a third special error should be returned.
We also need to do the following:
The text was updated successfully, but these errors were encountered: