0xPolygonMiden / miden-client

Client library that facilitates interaction with the Miden rollup
MIT License
29 stars 25 forks source link

Verify a note exists when importing #277

Closed igamigo closed 2 months ago

igamigo commented 3 months ago

What should be done?

Address this TODO

When we import a note, we should check for the note's existence by doing the proper RPC call. Perhaps this check can be disabled through a flag, although there does not seem to be a good reason to do so.

How should it be done?

The check should make use of the GetNoteDetails RPC. Once the note is checked, if there is no inclusion proof we should look at either:

When is this task done?

When validity is checked upon importing a note and a message is output based on that

Additional context

No response

bobbinth commented 3 months ago

Perhaps this check can be disabled through a flag, although there does not seem to be a good reason to do so.

One potential situation where this could be useful is when the user doesn't want to leak the info about which notes they are interested in to the node. In this situation, the user would need to be sure that they haven't synced too far into the future - so, definitely more of an "advanced feature".

mFragaBA commented 2 months ago

closing as #297 got merged