-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(consensus)!: deferred execution of txs with unversioned inputs (#…
…1023) Description --- - Mark transactions as deferred and execute in consensus - Set resolved inputs for each transaction that includes which lock is required - Remove input refs from transactions - Determine read locks from transaction execution result Motivation and Context --- Deferred execution previously had a default COMMIT decision which led to bugs when running rejected transactions (they would still get a COMMIT decision, but the validator does not have an accepted result to commit). This PR partially implements late execution for local-only transactions. Additional work is required to support this and it has been disabled i.e. will ABORT the transaction for transactions without versions. There was a bug where inputs without versions were provided but filled inputs for those substates were provided, the transaction would still detect that one or more inputs do not have a version. Input refs are unnecessary because the validator will always know which substates were written at lock time. TODOs: - missing transactions needs to differentiate between transactions pending execution and transactions that are deferred. - correct pledging procedure for unversioned inputs - blocks should generate a diff which is committed on a 3-chain - current committed state + diffs from uncommitted blocks can be used to determine inputs for subsequent transactions How Has This Been Tested? --- Existing tests pass, a new consensus unit test was written which is ignored because it fails, requires additional work to succeed, manually (previously working transactions still work). What process can a PR reviewer use to test or verify this change? --- Submit a transaction with a missing version Breaking Changes --- - [ ] None - [x] Requires data directory to be deleted - [ ] Other - Please specify
- Loading branch information
Showing
89 changed files
with
1,546 additions
and
1,208 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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.