refactor: account compilation: fallback accounts #187
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactors the way fallback accounts are created and then plumbed through the account compilation step before instruction execution.
There are a few performance benefits as a result of this refactoring, including creation of all fallback accounts ahead of time instead of within each instruction of a chain.
There is one subtle behavioral change. Currently, Mollusk always stubs out the target program account, whether you provide it or not. This is actually undesirable for some use cases. After this change, the program account is only stubbed out if it's not provided in the accounts list, making it a fallback account.