-
Notifications
You must be signed in to change notification settings - Fork 342
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
Add some failure modes to hackatom contract #142
Conversation
78759c4
to
fdb5ec1
Compare
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.
Good stuff. Some comments.
Do we want this in the 0.6 branch?
I wanted this primarily to test the soon-to-be released wasmd binary, so you, need it on 0.6. It should be merged into 0.7 as well. This doesn't break any APIs, just changes the format of the test contract (but nothing but our test code should depend on that) |
Okay, I believe I fixed all points from the review |
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.
Nice.
I wonder if the checked-in contract changed due to renamings of internal functions. Anyways, there should not be a functional difference.
Based on this discussion: CosmWasm/wasmd#8 (comment)
Breaking change in the contract - no longer will
{}
release funds, but we will need to do{"release":{}}
.We add the following new commands for testing the stack:
{"cpuloop":{}}
- will do an infinite loop with cpu usage - to hit wasm gas limit{"storageloop":{}}
- will do an infinite loop with writes to storage - to hit cosmos-sdk storage gas limit{"panic":{}}
- will cause contract to do a panic, make sure we handle this properly (like any other error)