-
Notifications
You must be signed in to change notification settings - Fork 9
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
Implement EIP-2937 #7
Implement EIP-2937 #7
Conversation
Added an indestructable property to a contract instance
-added new EVM error for when an indestructible contract tries to self destruct -added if case in opsuicide to throw the error described above when an indestructible contract tries to opSuicide -appeased some golint stuff
* added 2937 to valideip map * added comments to exported functions to appease go linter * updated bastanchury instructionset to inherit yolov2 * set opcode to 0xa8 per eip spec
reverted change made that was unrelated to PR/EIP
2f696dc
to
254a593
Compare
@@ -270,7 +270,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas | |||
// The depth-check is already done, and precompiles handled above | |||
contract := NewContract(caller, AccountRef(addrCopy), value, gas) | |||
contract.SetCallCode(&addrCopy, evm.StateDB.GetCodeHash(addrCopy), code) | |||
ret, err = run(evm, contract, input, false) | |||
ret, err = run(evm, contract, input, false, false) |
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 think this highlights the commens I made on FEM about the EIP: it's far too vaguely specified. In this case, it appears that executing this sequence:
- A calls
B
. B
doesset-indesructible
as the first op.B
calls onC
C
does selfdestruct, but is prevented, because the flag was stickified fromB
.
This implementation seems based on the static
mode, which is meant to be 'sticky' -- following along any child scopes.
I don't interpret the EIP to have the same semantics, though
3c8c36c
to
77fea7f
Compare
d56dd5a
to
e571bfe
Compare
525ab04
to
d1be5fa
Compare
…er (#7) (ethereum#22989) Co-authored-by: Gary Rong <[email protected]> Co-authored-by: Mikhail Kalinin <[email protected]>
Implements Set Indestructible Opcode