You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
Test mload_d1g0v0_Shanghai fails with the following error message:
[!] Case ~/code/rust/ef-tests/crates/ef-testing/ethereum-tests/BlockchainTests/GeneralStateTests/VMTests/vmIOandFlowOperations/mload.json failed (description: mload): Test failed: failed test mload_d1g0v0_Shanghai: expected storage value 0x0000000000000000000000000000000000000000000000000000000000000bad, got 0x0000000000000000000000000000000000000000000000000000000000000000
Expected behavior:
Test should pass or be skipped. The error is due to the fact that the transaction is expected to revert in the EVM with OOG (out of gas), while the transaction passes in Kakarot.
generate katana dump of kakarot system and move the .katana folder to your ef-tests directory
run
make tarket=mload_d1g0v0_Shanghai ef-test
Related code:
The MLOAD gas cost depends on the current size of the memory and the expansion produced by the offset.
No where in the current Kakarot implementation do we revert the execution if the gas cost if above the current gas limit. To decide if this is needed or not.
// @notice Iteratively decode and execute the bytecode of an ExecutionContext// @param ctx The pointer to the execution context.// @return ExecutionContext The pointer to the updated execution context.funcrun{
syscall_ptr:felt*,
pedersen_ptr:HashBuiltin*,
range_check_ptr,
bitwise_ptr:BitwiseBuiltin*,
}(ctx:model.ExecutionContext*) ->model.ExecutionContext* {
alloc_locals;
// Decode and executeletctx:model.ExecutionContext*=decode_and_execute(ctx=ctx);
// Check if execution should be stoppedletstopped:felt=ExecutionContext.is_stopped(self=ctx);
letis_root:felt=ExecutionContext.is_root(self=ctx);
// Terminate executionif (stopped!=FALSE) {
letctx=ExecutionContext.finalize_state(ctx);
if (is_root!=FALSE) {
if (ctx.destroy_contracts_len !=0) {
letctx=SelfDestructHelper.finalize(ctx);
returnctx;
}
returnctx;
} else {
letis_precompile=Precompiles.is_precompile(address=ctx.evm_contract_address);
if (is_precompile!=FALSE) {
letctx=CallHelper.finalize_calling_context(ctx);
returnrun(ctx=ctx);
}
let (bytecode_len) =IAccount.bytecode_len(
contract_address=ctx.starknet_contract_address
);
letis_eao=ExecutionContext.is_caller_eoa(self=ctx);
// If the starknet contract of the execution context has no bytecode and is not an EOA,// then it means we are at the end of a CREATE/CREATE2 opcode.if (bytecode_len+is_eao==0) {
letctx=CreateHelper.finalize_calling_context(ctx);
returnrun(ctx=ctx);
} else {
letctx=CallHelper.finalize_calling_context(ctx);
returnrun(ctx=ctx);
}
}
}
// Continue executionreturnrun(ctx=ctx);
}
The text was updated successfully, but these errors were encountered:
Bug Report
Kakarot version: ee6458a
Current behavior:
Test
mload_d1g0v0_Shanghai
fails with the following error message:Expected behavior:
Test should pass or be skipped. The error is due to the fact that the transaction is expected to revert in the EVM with OOG (out of gas), while the transaction passes in Kakarot.
Steps to reproduce:
Related code:
The MLOAD gas cost depends on the current size of the memory and the expansion produced by the offset.
No where in the current Kakarot implementation do we revert the execution if the gas cost if above the current gas limit. To decide if this is needed or not.
https://github.com/kkrt-labs/kakarot/blob/0c6e7a62a38e973ad6ceebfbf648841749ffe0ee/src/kakarot/instructions.cairo#L601-L644
The text was updated successfully, but these errors were encountered: