Skip to content

Commit

Permalink
EIP-7610: Revert creation in case of non-empty storage (#2686)
Browse files Browse the repository at this point in the history
* Revert contract creation if address already has the non-empty storage

* Enabling failing tests that now pass

* Fix failling.llvm

* Enforcing `STORAGE ==K .Map` to create a `#newExistingAccount `

* Optimizing storage requirement to create an existing acccount
  • Loading branch information
Robertorosmaninho authored Jan 23, 2025
1 parent 6cf81f6 commit 61b8f9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions kevm-pyk/src/kevm_pyk/kproj/evm-semantics/evm.md
Original file line number Diff line number Diff line change
Expand Up @@ -809,16 +809,17 @@ These are just used by the other operators for shuffling local execution state a
<acctID> ACCT </acctID>
<code> CODE </code>
<nonce> NONCE </nonce>
<storage> STORAGE </storage>
...
</account>
requires CODE =/=K .Bytes orBool NONCE =/=Int 0
requires CODE =/=K .Bytes orBool NONCE =/=Int 0 orBool STORAGE =/=K .Map
rule <k> #newExistingAccount ACCT => .K ... </k>
<account>
<acctID> ACCT </acctID>
<code> CODE </code>
<nonce> 0 </nonce>
<storage> _ => .Map </storage>
<storage> .Map </storage>
<origStorage> _ => .Map </origStorage>
...
</account>
Expand Down
5 changes: 0 additions & 5 deletions tests/failing.llvm
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,11 @@ BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip4895_withdrawals/zero_amou
BlockchainTests/GeneralStateTests/stBadOpcode/opc49DiffPlaces.json,*
BlockchainTests/GeneralStateTests/stBadOpcode/opc4ADiffPlaces.json,*
BlockchainTests/GeneralStateTests/stBadOpcode/undefinedOpcodeFirstByte.json,*
BlockchainTests/GeneralStateTests/stCreate2/create2collisionStorageParis.json,*
BlockchainTests/GeneralStateTests/stCreate2/RevertInCreateInInitCreate2Paris.json,*
BlockchainTests/GeneralStateTests/stEIP1559/lowFeeCap.json,*
BlockchainTests/GeneralStateTests/stEIP1559/lowGasLimit.json,lowGasLimit_d0g0v0_Cancun
BlockchainTests/GeneralStateTests/stEIP1559/lowGasPriceOldTypes.json,*
BlockchainTests/GeneralStateTests/stEIP1559/tipTooHigh.json,*
BlockchainTests/GeneralStateTests/stEIP1559/transactionIntinsicBug_Paris.json,*
BlockchainTests/GeneralStateTests/stExtCodeHash/dynamicAccountOverwriteEmpty_Paris.json,*
BlockchainTests/GeneralStateTests/stPreCompiledContracts/idPrecomps.json,idPrecomps_d9g0v0_Cancun
BlockchainTests/GeneralStateTests/stPreCompiledContracts/precompsEIP2929Cancun.json,precompsEIP2929Cancun_d117g0v0_Cancun
BlockchainTests/GeneralStateTests/stPreCompiledContracts/precompsEIP2929Cancun.json,precompsEIP2929Cancun_d12g0v0_Cancun
Expand All @@ -177,6 +174,4 @@ BlockchainTests/GeneralStateTests/stPreCompiledContracts/precompsEIP2929Cancun.j
BlockchainTests/GeneralStateTests/stPreCompiledContracts/precompsEIP2929Cancun.json,precompsEIP2929Cancun_d63g0v0_Cancun
BlockchainTests/GeneralStateTests/stPreCompiledContracts/precompsEIP2929Cancun.json,precompsEIP2929Cancun_d81g0v0_Cancun
BlockchainTests/GeneralStateTests/stPreCompiledContracts/precompsEIP2929Cancun.json,precompsEIP2929Cancun_d99g0v0_Cancun
BlockchainTests/GeneralStateTests/stRevertTest/RevertInCreateInInit_Paris.json,*
BlockchainTests/GeneralStateTests/stSpecialTest/failed_tx_xcf416c53_Paris.json,*
BlockchainTests/GeneralStateTests/stSStoreTest/InitCollisionParis.json,*

0 comments on commit 61b8f9e

Please sign in to comment.