-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(engine): only scope check new references for component state (#990)
Description --- fix(engine): only scope check new references for component state fix(engine): limit initial scope to transaction inputs fix(engine): depositing buckets now also includes the resource in scope Motivation and Context --- A bug in the engine caused some transactions to fail unless all vaults and resources contained in e.g an account were in scope regardless if they were used. This PR changes the scope check to only check that newly added references in component state are in scope, without requiring that _every_ reference is in scope. Explicitly limiting scope to inputs allows us to pass in a store that contains more than just the transaction inputs for the current transaction. This should be useful in future when we want to maintain a store for potentially dependent transactions within a block. The thinking is that we pass in a wrapped read-only persistent store, the wrapper will track substate changes made by executing transactions in a block and be able to return a commit diff for the block. How Has This Been Tested? --- Engine tests, manually by executing a transaction that previously failed due to the scope issue. What process can a PR reviewer use to test or verify this change? --- In the wallet web UI, create an initial free coins account, then create a new empty account, then click create free test coins on the empty account. This transaction previously failed. Breaking Changes --- - [x] None - [ ] Requires data directory to be deleted - [ ] Other - Please specify
- Loading branch information
Showing
8 changed files
with
153 additions
and
75 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
Oops, something went wrong.