Skip to content

Commit f7435ba

Browse files
authored
Update loadTx rules in driver.md (#2692)
* throw EVMC_OUT_OF_GAS when src account is not in accounts * fix loadTx for invalid init code * add hasBigInt as discardKey
1 parent 903e131 commit f7435ba

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

kevm-pyk/src/kevm_pyk/gst_to_kore.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
'transactionSequence',
3838
'chainname',
3939
'lastblockhash',
40+
'hasBigInt',
4041
]
4142
)
4243
_GST_LOAD_KEYS: Final = frozenset(

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ To do so, we'll extend sort `JSON` with some EVM specific syntax, and provide a
8383
8484
syntax EthereumCommand ::= loadTx ( Account ) [symbol(loadTx)]
8585
// --------------------------------------------------------------
86-
rule <k> loadTx(_) => #end EVMC_OUT_OF_GAS ... </k>
86+
rule <k> loadTx(_) => startTx ... </k>
87+
<statusCode> _ => EVMC_OUT_OF_GAS </statusCode>
88+
<txPending> ListItem(TXID:Int) REST => REST </txPending>
8789
<schedule> SCHED </schedule>
88-
<txPending> ListItem(TXID:Int) ... </txPending>
8990
<message>
9091
<msgID> TXID </msgID>
9192
<to> .Account </to>
@@ -176,6 +177,10 @@ To do so, we'll extend sort `JSON` with some EVM specific syntax, and provide a
176177
</account>
177178
requires notBool ACCTCODE ==K .Bytes
178179
180+
rule <k> loadTx(_) => startTx ... </k>
181+
<statusCode> _ => EVMC_OUT_OF_GAS </statusCode>
182+
<txPending> ListItem(_TXID:Int) REST => REST </txPending> [owise]
183+
179184
syntax EthereumCommand ::= "#finishTx"
180185
// --------------------------------------
181186
rule <statusCode> _:ExceptionalStatusCode </statusCode> <k> #halt ~> #finishTx => #popCallStack ~> #popWorldState ... </k>

tests/failing.llvm

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ BlockchainTests/GeneralStateTests/Pyspecs/constantinople/eip1014_create2/recreat
132132
BlockchainTests/GeneralStateTests/Pyspecs/frontier/opcodes/all_opcodes.json,src/GeneralStateTestsFiller/Pyspecs/frontier/opcodes/test_all_opcodes.py::test_all_opcodes[fork_Cancun-blockchain_test]
133133
BlockchainTests/GeneralStateTests/Pyspecs/frontier/opcodes/double_kill.json,*
134134
BlockchainTests/GeneralStateTests/Pyspecs/paris/security/tx_selfdestruct_balance_bug.json,*
135-
BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip3860_initcode/contract_creating_tx.json,src/GeneralStateTestsFiller/Pyspecs/shanghai/eip3860_initcode/test_initcode.py::test_contract_creating_tx[fork_Cancun-blockchain_test-over_limit_ones]
136-
BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip3860_initcode/contract_creating_tx.json,src/GeneralStateTestsFiller/Pyspecs/shanghai/eip3860_initcode/test_initcode.py::test_contract_creating_tx[fork_Cancun-blockchain_test-over_limit_zeros]
137135
BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip4895_withdrawals/balance_within_block.json,*
138136
BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip4895_withdrawals/large_amount.json,*
139137
BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip4895_withdrawals/many_withdrawals.json,*
@@ -145,7 +143,6 @@ BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip4895_withdrawals/use_value
145143
BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip4895_withdrawals/use_value_in_tx.json,*
146144
BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip4895_withdrawals/withdrawing_to_precompiles.json,*
147145
BlockchainTests/GeneralStateTests/Pyspecs/shanghai/eip4895_withdrawals/zero_amount.json,*
148-
BlockchainTests/GeneralStateTests/Shanghai/stEIP3860-limitmeterinitcode/creationTxInitCodeSizeLimit.json,creationTxInitCodeSizeLimit_d1g0v0_Cancun
149146
BlockchainTests/GeneralStateTests/stBadOpcode/opc49DiffPlaces.json,*
150147
BlockchainTests/GeneralStateTests/stBadOpcode/opc4ADiffPlaces.json,*
151148
BlockchainTests/GeneralStateTests/stBadOpcode/undefinedOpcodeFirstByte.json,*
@@ -183,8 +180,3 @@ BlockchainTests/GeneralStateTests/stPreCompiledContracts/precompsEIP2929Cancun.j
183180
BlockchainTests/GeneralStateTests/stRevertTest/RevertInCreateInInit_Paris.json,*
184181
BlockchainTests/GeneralStateTests/stSpecialTest/failed_tx_xcf416c53_Paris.json,*
185182
BlockchainTests/GeneralStateTests/stSStoreTest/InitCollisionParis.json,*
186-
BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccount1559.json,*
187-
BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccountCreate1559.json,*
188-
BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccountCreate.json,*
189-
BlockchainTests/GeneralStateTests/stTransactionTest/NoSrcAccount.json,*
190-
BlockchainTests/GeneralStateTests/stTransactionTest/ValueOverflowParis.json,*

0 commit comments

Comments
 (0)