Skip to content

Commit 65dfb5a

Browse files
committed
implement eip 7825
1 parent 3207259 commit 65dfb5a

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

kevm-pyk/src/kevm_pyk/kproj/evm-semantics/schedule.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ module SCHEDULE
3131
| "Ghaswarmcoinbase" | "Ghaswithdrawals" | "Ghastransient" | "Ghasmcopy"
3232
| "Ghasbeaconroot" | "Ghaseip6780" | "Ghasblobbasefee" | "Ghasblobhash"
3333
| "Ghasbls12msmdiscount" | "Ghashistory" | "Ghasrequests" | "Ghasauthority"
34-
| "Ghasfloorcost" | "Ghasclz"
35-
// -------------------------------------------------------------
34+
| "Ghasfloorcost" | "Ghasclz" | "Ghastxgaslimit"
35+
// -----------------------------------------------------------------------------------------
3636
```
3737

3838
### Schedule Constants
@@ -53,7 +53,7 @@ A `ScheduleConst` is a constant determined by the fee schedule.
5353
| "Gaccessliststoragekey" | "Rmaxquotient" | "Ginitcodewordcost" | "maxInitCodeSize" | "Gwarmstoragedirtystore"
5454
| "Gpointeval" | "Gmaxblobgas" | "Gminbasefee" | "Gtargetblobgas" | "Gperblob" | "Blobbasefeeupdatefraction"
5555
| "Gbls12g1add" | "Gbls12g1mul" | "Gbls12g2add" | "Gbls12g2mul" | "Gbls12mapfptog1" | "Gbls12PairingCheckMul"
56-
| "Gbls12PairingCheckAdd" | "Gauthbase" | "Gbls12mapfp2tog2" | "Gtxdatafloor"
56+
| "Gbls12PairingCheckAdd" | "Gauthbase" | "Gbls12mapfp2tog2" | "Gtxdatafloor" | "Gmaxtxgaslimit"
5757
// -------------------------------------------------------------------------------------------------------------------------------------------------------
5858
```
5959

@@ -148,6 +148,7 @@ A `ScheduleConst` is a constant determined by the fee schedule.
148148
rule [Gbls12PairingCheckAddDefault]: Gbls12PairingCheckAdd < DEFAULT > => 0
149149
rule [Gbls12mapfptog1Default]: Gbls12mapfptog1 < DEFAULT > => 0
150150
rule [Gbls12mapfp2tog2Default]: Gbls12mapfp2tog2 < DEFAULT > => 0
151+
rule [GmaxtxgaslimitDefault]: Gmaxtxgaslimit < DEFAULT > => 0
151152
152153
rule [GselfdestructnewaccountDefault]: Gselfdestructnewaccount << DEFAULT >> => false
153154
rule [GstaticcalldepthDefault]: Gstaticcalldepth << DEFAULT >> => true
@@ -183,6 +184,7 @@ A `ScheduleConst` is a constant determined by the fee schedule.
183184
rule [GhasauthorityDefault]: Ghasauthority << DEFAULT >> => false
184185
rule [GhasfloorcostDefault]: Ghasfloorcost << DEFAULT >> => false
185186
rule [GhasclzDefault]: Ghasclz << DEFAULT >> => false
187+
rule [GhastxgaslimitDefault]: Ghastxgaslimit << DEFAULT >> => false
186188
```
187189

188190
### Frontier Schedule
@@ -504,12 +506,16 @@ A `ScheduleConst` is a constant determined by the fee schedule.
504506
```k
505507
syntax Schedule ::= "OSAKA" [symbol(OSAKA_EVM), smtlib(schedule_OSAKA)]
506508
// -----------------------------------------------------------------------
507-
rule [SCHEDCONSTOsaka]: SCHEDCONST < OSAKA > => SCHEDCONST < PRAGUE >
508-
509-
rule [GhasclzOsaka]: Ghasclz << OSAKA >> => true
510-
rule [SCHEDFLAGOsaka]: SCHEDFLAG << OSAKA >> => SCHEDFLAG << PRAGUE >>
511-
requires notBool ( SCHEDFLAG ==K Ghasclz )
512-
509+
rule [GmaxtxgaslimitOsaka]: Gmaxtxgaslimit < OSAKA > => 16777216
510+
rule [SCHEDCONSTOsaka]: SCHEDCONST < OSAKA > => SCHEDCONST < PRAGUE >
511+
requires notBool ( SCHEDCONST ==K Gmaxtxgaslimit )
512+
513+
rule [GhasclzOsaka]: Ghasclz << OSAKA >> => true
514+
rule [GhastxgaslimitOsaka]: Ghastxgaslimit << OSAKA >> => true
515+
rule [SCHEDFLAGOsaka]: SCHEDFLAG << OSAKA >> => SCHEDFLAG << PRAGUE >>
516+
requires notBool ( SCHEDFLAG ==K Ghasclz
517+
orBool SCHEDFLAG ==K Ghastxgaslimit
518+
)
513519
```
514520

515521
```k

kevm-pyk/src/kevm_pyk/kproj/evm-semantics/state-utils.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ The `"rlp"` key loads the block information.
612612
andBool TX_MAX_PRIORITY_FEE <=Int TX_MAX_FEE
613613
andBool BAL >=Int TX_GAS_LIMIT *Int TX_MAX_FEE +Int VALUE
614614
andBool TX_GAS_LIMIT <=Int BLOCK_GAS_LIMIT
615+
andBool (notBool Ghastxgaslimit << SCHED >> orBool TX_GAS_LIMIT <=Int Gmaxtxgaslimit < SCHED >)
615616
andBool size(TX_AUTH_LIST) >Int 0 andBool #checkAuthorityList(TX_AUTH_LIST)
616617
617618
rule [[ #isValidTransaction (TXID, ACCTFROM) => true ]]
@@ -648,6 +649,7 @@ The `"rlp"` key loads the block information.
648649
andBool TX_MAX_BLOB_FEE >=Int Cbasefeeperblob(SCHED, EXCESS_BLOB_GAS)
649650
andBool BAL >=Int TX_GAS_LIMIT *Int TX_MAX_FEE +Int (Ctotalblob(SCHED, size(TVH)) *Int TX_MAX_BLOB_FEE) +Int VALUE
650651
andBool TX_GAS_LIMIT <=Int BLOCK_GAS_LIMIT
652+
andBool (notBool Ghastxgaslimit << SCHED >> orBool TX_GAS_LIMIT <=Int Gmaxtxgaslimit < SCHED >)
651653
andBool Ctotalblob(SCHED, size(TVH)) <=Int Gmaxblobgas < SCHED>
652654
653655
rule [[ #isValidTransaction (TXID, ACCTFROM) => true ]]
@@ -677,6 +679,7 @@ The `"rlp"` key loads the block information.
677679
andBool TX_MAX_PRIORITY_FEE <=Int TX_MAX_FEE
678680
andBool BAL >=Int TX_GAS_LIMIT *Int TX_MAX_FEE +Int VALUE
679681
andBool TX_GAS_LIMIT <=Int BLOCK_GAS_LIMIT
682+
andBool (notBool Ghastxgaslimit << SCHED >> orBool TX_GAS_LIMIT <=Int Gmaxtxgaslimit < SCHED >)
680683
681684
rule [[ #isValidTransaction (TXID, ACCTFROM) => true ]]
682685
<schedule> SCHED </schedule>
@@ -704,6 +707,7 @@ The `"rlp"` key loads the block information.
704707
andBool BASE_FEE <=Int TX_GAS_PRICE
705708
andBool BAL >=Int TX_GAS_LIMIT *Int TX_GAS_PRICE +Int VALUE
706709
andBool TX_GAS_LIMIT <=Int BLOCK_GAS_LIMIT
710+
andBool (notBool Ghastxgaslimit << SCHED >> orBool TX_GAS_LIMIT <=Int Gmaxtxgaslimit < SCHED >)
707711
708712
rule #isValidTransaction (_, _) => false [owise]
709713
```

0 commit comments

Comments
 (0)