-
Notifications
You must be signed in to change notification settings - Fork 322
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
Multi suicide #1169
Multi suicide #1169
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.
Each vector assumes a transaction finalization happens. 1 tx - one vector.
Suc000 is the base. It happens in the beginning of each following vector.
So 1. Call regular suicide. 2. Call again selfdesteuct contract in the same tx. But different call. 3. Tx finishes. 4 . Check the post state.
Then go to the next vector that do the same. But different scenario in step 2.
src/GeneralStateTestsFiller/stSystemOperationsTest/multiSelfdestructFiller.yml
Outdated
Show resolved
Hide resolved
# SUC002 | ||
- indexes: | ||
data: !!int 1 | ||
gas: !!int -1 |
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.
gas and value can be omited if it is -1
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.
looks very good now. @marioevz any more ideas for suicide double call ?
maybe more scenarios with revert
This is for test cases in PR #1162, but it scares me to modify the same file in two PRs at the same time.
call happens within one transaction to contractA, that has different scenarios around suicide
contractA has balance=3
SUC000 - contractA is called to perform suicide to dest1 (3 must immidiately(check that it is immidiately and not by the end of tx) go to dest1)
contractA is called again in the same tx, but this time
SUC001 - does not suicide, just receive more funds via call. check the balance of contractA (must be 0, the second transfer funds erased)
SUC002 - does another suicide to dest1 (so dest1 now have 3 + x)
SUC003 - does another suicide to dest2 (so both dest1 and dest2 has some balance)
SUC004 - tries to make value transfer but fails because initial suicide 0ed the balance (answering this (check that it is immidiately and not by the end of tx))
SUC005 - receives more funds and try to transder it (same as SUC004, but this time work because it received funds via 2nd call)