Process instruction with observer #164
Closed
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.
[WIP] more docs etc. incoming shortly, plus an evaluation of any overlap with #161
Problem
Callers can have some difficulty retrieving all information about a processed mollusk instruction or instruction chain. In particular, updating tests to compare CUs, account states, and results can be a bit tedious.
Solution
Allow an observer to be passed in to the new
with_observerwrapper functions. This observer is handed all the relevant information so that the caller's testing setup can easily process it.Context
This is part of a simple solution to provide developers an easy
#[compare_programs]attribute, which makes a test compare CUs and check byte-for-byte parity of accounts, data, and instruction results, across any arbitrary number of versions of a program.