-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding dryrun trace test and expected app trace #161
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggesting another test case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of suggestions around naming conventions and removing a step that seems a bit redundant.
A possible future improvement -but not worth holding up this PR for- is to do one of the following (or even both):
- add the possibility of CSV output (with no truncation). So would add example files and a step such as:
Then calling app trace CSV produces "<app-trace-csv-file>"
- add the possibility of non-truncated output. So would add example files and a step such as:
Then calling app trace no-truncation produces "<app-trace-notrunc-file>"
Co-authored-by: Zeph Grunschlag <[email protected]>
Co-authored-by: Zeph Grunschlag <[email protected]>
Co-authored-by: Zeph Grunschlag <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For future reference, recommend opening an issue for possible improvements cited above (CSV + no truncation).
Also new issue that cropped up: handling errors in the trace. EG:
348 | 43 | 25 | swap | | [21, 2432902008176640000, 21]
349 | 45 | 26 | store 0 | 0->21 | [21, 2432902008176640000]
350 | 45 | 26 | * overflowed | | [21, 2432902008176640000]
Which we can get from a switch that looks like this:
def line_or_err(i, ln):
line = lines[ln - 1]
err = trace[i].get("error")
return err if err else line
@unit | ||
Feature: Dryrun Trace | ||
|
||
@unit.dryrun.trace.application |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add this to the table in the README then we can merge it in.
Testing format of the dryrun trace printer being added to the SDKs
algorand/py-algorand-sdk#283
algorand/go-algorand-sdk#289
algorand/js-algorand-sdk#514
algorand/java-algorand-sdk#305