-
Notifications
You must be signed in to change notification settings - Fork 40
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
Usability: Add an easy way for a user to retrieve an inclusion proof after having synced over its block #256
Comments
We have some workarounds for the issue above:
|
I think this may be independently interesting as this may remove the source of ambiguity on whether the transactions is already included or not. I think our note serialization format should be able to handle notes of different types - specifically:
On the negative side, in additional to extra latency, it does introduce a potential attack vector where a malicious sender could send an invalid inclusion path - so, the client would need to handle such situations.
I think one other approach that falls into this category could be to add a new endpoint to the node - something like The main downside of this approach is reduced privacy - i.e., the node may learn additional info about the notes the client is interested in. |
I was thinking the authentication path would be anchored in the MMR. That is to say, not only the path from the note to the block, but also the path from the block to the current MMR. There are MMR race conditions the client needs to handle, but the sender would not be allowed to lie.
Agree, that is what I tried to propose here |
This is supported from the client (eventually this struct should be moved to
Is this the case? It seems there is no more information than when getting information with a sync. |
I think the description here was to return only the data for an specific note. Whereas the sync returns data for any note matching a given prefix. IMO we should make this a bit more flexible, as in the user can choose how much data she receives by having a variable length prefix, so privacy would be preserved, and we would still have the possibility of a fast path for things like on-chain notes. |
I'll think we'll need to add an endpoint to miden node to retrieve a block header + the inclusion path for that block against a given MMR forest.
Generally, I agree - but I would probably start with the simpler endpoint which works with Node IDs, and then add a privacy-preserving one later. |
We already have a part of this issue done - i.e., we have
In either case, we could return the authentication path against the latest MMR state, and the client will be able to truncate it accordingly. |
In terms of what a user would need in order to be able to use a note for which it has not received sync-related data, it seems that adding auth path to the However, there will likely be other use-cases where it would be unnecessary to return the MMR data alongside the block header data (explorer?), so it feels like adding a new endpoint would be a better way to go. Another more mixed approach could be to add a flag to the |
I'm leaning toward using a single
But I'm also fine with not returning the path by default and use an additional parameter to specify whether the path should be included. |
Closed by #345. |
Given the following scenario:
N
is created and included in blockX
X+N
X
N
and wants to consume itThe
sync
endpoint, as it is, doesn't cover the situation above. So a user may never see the inclusion proof for the blockN
, and therefor never be able to consume it.The text was updated successfully, but these errors were encountered: