Skip to content
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

Simplify dryrunning and debugging group txn #1405

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

algorandskiy
Copy link
Contributor

Summary

  • Extend clerk dryrun so it can dump dryrun state object suitable for REST, tealdbg and python tests
    goal clerk dryrun -t grouptxn.msgp -o dr.mspg --dryrun-dump --dryrun-dump-format=msgp
  • Fix parameter validation in tealdbg
  • Fix NPE in REST dryrun when a first txn in a group non-TEAL

Test Plan

Extended expect test for group txn

txns = append(txns, other...)
for i := range txns {
enc := protocol.EncodeJSON(&txns[i])
dr.Txns = append(dr.Txns, enc)
}

if tx.Type == protocol.ApplicationCallTx {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entire if tx.Type == protocol.ApplicationCallTx { block moved inside the loop without modifications

Comment on lines +941 to +943
if txnOrStxn == nil {
// empty input do nothing
} else if txn, ok := txnOrStxn.(transactions.Transaction); ok {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow pre-existing groups of signed transactions

Copy link
Contributor

@brianolson brianolson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one comment that could be further clarified.

* Extend clerk dryrun so it can dump dryrun state object suitable for REST, tealdbg and python tests
  goal clerk dryrun -t grouptxn.msgp -o dr.mspg --dryrun-dump --dryrun-dump-format=msgp
* Fix parameter validation in tealdbg
* Fix NPE in REST dryrun when a first txn in a group non-TEAL
Copy link
Contributor

@tsachiherman tsachiherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@tsachiherman tsachiherman merged commit 423e959 into algorand:master Sep 4, 2020
@algorandskiy algorandskiy deleted the pavel/goal branch January 15, 2021 18:11
tsachiherman pushed a commit to tsachiherman/go-algorand that referenced this pull request Jul 7, 2021
Extend clerk dryrun so it can dump dryrun state object suitable for REST, tealdbg and python tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants