-
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
Test Boxes field in application calls static array #181
Conversation
export ALGOD_URL="https://github.com/algorand/go-algorand" | ||
export ALGOD_BRANCH="master" | ||
export ALGOD_URL="https://github.com/jannotti/go-algorand" | ||
export ALGOD_BRANCH="avm-box" |
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.
Currently points to the fork, but should revert this back before merging to master.
I think this would be nice to have if not essential. Currently the step variants of "add a method call with the signing account" do not claim the ability to add reference arg arrays to the method call (i.e. accounts, foreign_apps, foreign_assets, and boxes). This seems like an important feature to test, but since the existing tests are so intricate, a smallish new scenario focusing on this aspect might make the most sense. |
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.
Left a couple of comments/questions.
It seems that this is a "placeholder" PR which isn't concretely asserting anything about how boxes are handled. Is this true, and if so, are we waiting on algod code in the go-algorand boxes branch in order to understand the box API, and only then can we spell out precisely what the test will be?
Appreciate the quick feedback:
I think that makes sense like an integration test for the
Yes, the next part will be to implement the algod APIs to read from boxes. Then we can assert round-trip results (create, write, read from boxes) in the integration tests with some TEAL code, probably in a new PR to the |
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.
I believe this is probably approvable but must confess to my not understanding exactly what is going on. Could you explain how the test is actually doing anything? Specifically, in features/unit/transactions.feature
I see that one can allow boxes
to be added to an ApplicationCallTxn
. The hash of the txn should then reflect this new information, and this should create a totally new "golden". Is this understanding correct and are the golden's reflecting the expected transaction hash which includes boxes?
That's correct - it's checking if the boxes are encoded in the |
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
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.
The encoding tests look good, I just left a comment about another case I'd like to see. I'll approve since this is going into a feature branch, so not everything needs to be complete yet
This PR provides SDK tests for application transactions with the new
boxes
field:boxes
in application transactionsSDK implementation:
TODO:
Tracks #175