mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 05:14:14 +00:00
EIP-3541: Reject new contracts starting with the 0xEF byte
This commit is contained in:
parent
b4221381d6
commit
e08c9ef2d9
@ -235,6 +235,10 @@ proc writeContract*(c: Computation, fork: Fork): bool {.gcsafe.} =
|
||||
debug "Contract code size exceeds EIP170", limit=EIP170_CODE_SIZE_LIMIT, actual=contractCode.len
|
||||
return false
|
||||
|
||||
if fork >= FkLondon and contractCode[0] == 0xFE.byte:
|
||||
debug "Contract code can't start with 0xEF byte"
|
||||
return false
|
||||
|
||||
let storageAddr = c.msg.contractAddress
|
||||
if c.isSelfDestructed(storageAddr): return
|
||||
|
||||
|
@ -175,6 +175,10 @@ proc writeContract*(c: Computation, fork: Fork): bool {.gcsafe.} =
|
||||
actual = contractCode.len
|
||||
return false
|
||||
|
||||
if fork >= FkLondon and contractCode[0] == 0xFE.byte:
|
||||
debug "Contract code can't start with 0xEF byte"
|
||||
return false
|
||||
|
||||
let storageAddr = c.msg.contractAddress
|
||||
if c.isSelfDestructed(storageAddr): return
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user