You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implementations of the above trait are responsible to validate transactions, this has to account for transactions is the store, as well as transactions currently in flight. Namely, when two transactions try to consume the same nullifier, only one can succeed.
The issue with the above traits are the following:
The trait doesn't expose the complete API necessary to track in-flight transactions. This needs to be done with another trait, currently ApplyBlock, to callback this object and signal that an in-flight transaction has been committed to store, allowing the object to clean its internal state. While this works, it makes it harder to follow the code, since the interface is not "self sufficient".
The trait doesn't have an intermediary state, between this transaction has been added to the queue, to this transaction has been added to a batch. It would be interesting to model such a state, because once fees are implemented, we would like to prioritize transactions not by arrival order, but by amount of fees paid.
The text was updated successfully, but these errors were encountered:
We may want the above as a trait because of #23, so we can implement an in-memory and DB implementations (although we sqlite we can have an in-memory DB, so that is not super necessary, and we could have a plain implementation instead).
The design above makes sense to me since the lifecycle of the transaction changes after it touches multiple components. Which is kinda of modeled in the example above.
miden-node/block-producer/src/txqueue/mod.rs
Lines 53 to 59 in 1462d45
Implementations of the above trait are responsible to validate transactions, this has to account for transactions is the store, as well as transactions currently in flight. Namely, when two transactions try to consume the same nullifier, only one can succeed.
The issue with the above traits are the following:
ApplyBlock
, to callback this object and signal that an in-flight transaction has been committed to store, allowing the object to clean its internal state. While this works, it makes it harder to follow the code, since the interface is not "self sufficient".The text was updated successfully, but these errors were encountered: