0xPolygonMiden / miden-client

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

Note screener for non-recorded notes and notes that can execute in future blocks #226

Open mFragaBA opened 7 months ago

mFragaBA commented 7 months ago

On #208 we added a check to see whether to store the created input notes (after executing a transaction and sending it to the node) or not. To achieve that we resort to the following heuristic:

  1. If the note is a known one (P2ID, P2IDR), check the script hash and inputs to see if any of the stored accounts can consume it. This would be the "fast" path.
  2. Otherwise, try consuming the note. If we can, we suppose eventually in the future it will also be possible.

Number 1 hasn't got many issues, but 2 has two:

_Originally posted by @bobbinth in https://github.com/0xPolygonMiden/miden-client/pull/208#discussion_r1523506120_