Closed mFragaBA closed 5 months ago
@bobbinth do you have any comments on this? Because the client does not get updates for notes that are not for accounts that it is tracking (ie they are not kept on the input notes table), I might not know when a P2ID transaction gets committed (for example, because I sent you a note and so it's for an account I'm not tracking, so I'm not able to tell if the note was included and hence the transaction committed). There's at least 2 solutions for this:
Add the tags for notes we keep in the output notes table when syncing: Probably could end up with lots of unnecessary sync-related data. In the example above it would mean I ask the node for note updates with tags corresponding to your Account ID until I see the note was included.
When checking if a transaction was committed, if there is no other satisfying criteria (no spent nullifier, or no valid account hash update), request GetNotesById
for tracked, non-committed, output notes and commit the transaction based on that. The downside would be that this leaks a note ID that the client is interested in. This is what we suggested initially, and the implemented approach on #273.
A couple of thoughts:
GetNotesById
for such notes should not leak too much info (i.e., not more info than is being leaked during state sync requests where we specify the set of accounts we are interested in).So, basically, I think we should already have all required data (but may need to make sure there are no bugs either on the node or client side), but also that using GetNotesById
should be fine, if needed.
closing as #313 got merged
Now that we have onchain notes, because we receive note IDs based on account ID tags we cannot base the status change on output notes alone, since we might not be receiving all the output notes of a transaction. Perhaps we can re-use the
/GetNotesById
endpoint_Originally posted by @igamigo in https://github.com/0xPolygonMiden/miden-client/pull/245#discussion_r1562667499_