Skip to content

Commit

Permalink
Add a rule removing init code size limit checks (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
palinatolmach authored Dec 3, 2024
1 parent 52a450e commit 3311bbe
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/kontrol/kdist/no_code_size_checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ module NO-CODE-SIZE-CHECKS
imports EVM
imports FOUNDRY
rule <k> #mkCodeDeposit ACCT
rule [deploy-no-codesize-limit]:
<k> #mkCodeDeposit ACCT
=> Gcodedeposit < SCHED > *Int lengthBytes(OUT) ~> #deductGas
~> #finishCodeDeposit ACCT OUT
...
Expand All @@ -22,5 +23,23 @@ module NO-CODE-SIZE-CHECKS
requires #isValidCode(OUT, SCHED)
[priority(30)]
rule [create-valid-no-codesize-limit]:
<k> CREATE VALUE MEMSTART MEMWIDTH
=> #accessAccounts #newAddr(ACCT, NONCE)
~> #checkCreate ACCT VALUE
~> #create ACCT #newAddr(ACCT, NONCE) VALUE #range(LM, MEMSTART, MEMWIDTH)
~> #codeDeposit #newAddr(ACCT, NONCE)
...
</k>
<id> ACCT </id>
<localMem> LM </localMem>
<account>
<acctID> ACCT </acctID>
<nonce> NONCE </nonce>
...
</account>
<schedule> SCHED </schedule>
[preserves-definedness, priority(30)]
endmodule
```

0 comments on commit 3311bbe

Please sign in to comment.