fix(mempool): resolve local unversioned inputs before execution
Motivation and Context
Allow local only transactions with unversioned inputs to be resolved in the mempool
High-level Notes:
Versioned local and foreign inputs may be safely executed and passed to consensus. If an input conflicts or has been downed since execution this transaction will (and must) ABORT.
Unversioned inputs are more complicated.
Local-only unversioned in mempool: the mempool resolves all inputs as local and assigns the current UP version. Since inputs are not locked yet, another transaction may consume these inputs rendering one of the transactions to ABORT when it shouldn't. This can be resolved by executing the local-only transactions within the context of the object state of the current block.
Local-only consensus execution: The version applicable to the current leaf proposal which accounts for the uncommitted chain (to commit block/3-chain) is selected and proposed as LocalOnly. This implicitly pledges and locks the inputs.
Local-only with foreign conflicts in consensus: ...
How Has This Been Tested?
Cucumber test re-added that tests unversioned inputs.
What process can a PR reviewer use to test or verify this change?
Submit a transaction with at least one unversioned input local to the shard
Breaking Changes
[x] None
[ ] Requires data directory to be deleted
[ ] Other - Please specify
NOTE: Added an index to the database, that requires the database to be deleted to be applied. This is non-breaking but does ensure data integrity and improves the SQLite implementation query performance
Description
fix(mempool): resolve local unversioned inputs before execution
Motivation and Context
Allow local only transactions with unversioned inputs to be resolved in the mempool
High-level Notes:
How Has This Been Tested?
Cucumber test re-added that tests unversioned inputs.
What process can a PR reviewer use to test or verify this change?
Submit a transaction with at least one unversioned input local to the shard
Breaking Changes
NOTE: Added an index to the database, that requires the database to be deleted to be applied. This is non-breaking but does ensure data integrity and improves the SQLite implementation query performance