-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mempool): allow local transactions with unversioned inputs (#1027)
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: - 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
- Loading branch information
Showing
17 changed files
with
473 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.