keep-starknet-strange/snos

bug: Run run_os_on_simple_block_cairo1 test case failed

Closed this issue · 1 comments

SNOS version:
commit: e859129
Current behavior:
Running tests/os_on_blocks.rs (target/debug/deps/os_on_blocks-ae1a50e7baf6128e)

running 1 test
contract addresses:
erc20(eth): 4097
erc20(strk): 4098
account: 3221225984
contract: 1073743616
contracts: 7
deprecated_compiled_classes: 2
contracts to class_hash
0 -> 0
1 -> 0
4098 -> 2553874082637258309275750418379019378586603706497644242041372159420778949015
3221225984 -> 2147484160
1073743616 -> 2847229557799212240700619257444410593768590640938595411219122975663286400357
1073743872 -> 2553874082637258309275750418379019378586603706497644242041372159420778949015
4097 -> 2553874082637258309275750418379019378586603706497644242041372159420778949015
deprecated classes
2847229557799212240700619257444410593768590640938595411219122975663286400357
2553874082637258309275750418379019378586603706497644242041372159420778949015
classes
354573111547370173281606292268396466744750568787097671151101592218871604240
class_hash to compiled_class_hash
2147484160 -> 354573111547370173281606292268396466744750568787097671151101592218871604240
deprecated_fee_token_address: 0x0000000000000000000000000000000000000000000000000000000000001001
fee_token_address: 0x0000000000000000000000000000000000000000000000000000000000001002
writing block number: 1990 -> block hash: 66
executing INVOKE_FUNCTION on: 3221225984
about to call contract_address: 3221225984, class_hash: 2147484160, is_deprecated: 0
about to execute: GetExecutionInfo
about to execute: CallContract
CallContract syscall, contract address: 1073743616, selector: 0x39a1491f76903a16feed0a6433bec78de4c73194944e1118e226820ad479701 -> failed: false, Retdata([StarkFelt("0x0000000000000000000000000000000000000000000000000000000000000002")])?
entering syscall: GetExecutionInfo execution
entering syscall: CallContract execution
about to call contract_address: 1073743616, class_hash: 2847229557799212240700619257444410593768590640938595411219122975663286400357, is_deprecated: 1
about to call contract_address: 4097, class_hash: 2553874082637258309275750418379019378586603706497644242041372159420778949015, is_deprecated: 1
get_caller_address() syscall, syscall_ptr = 73:0, caller_address = 3221225984
storage_read syscall, syscall_ptr = 73:2, value = 1000000000000000000
storage_read syscall, syscall_ptr = 73:5, value = 0
storage_write (TODO): 73:8
storage_write (TODO): 73:11
storage_read syscall, syscall_ptr = 73:14, value = 0
storage_read syscall, syscall_ptr = 73:17, value = 0
storage_write (TODO): 73:20
storage_write (TODO): 73:23
emit_event (TODO): 73:26
traceback:
Cairo traceback (most recent call last):
cairo-lang/src/starkware/starknet/core/os/os.cairo:102:59: (pc=0:10627)
let (squashed_os_state_update, state_update_output) = state_update{hash_ptr=pedersen_ptr}(
^**********************************^
/snos/cairo-lang/src/starkware/starknet/core/os/state/state.cairo:56:45: (pc=0:4310)
let contract_state_tree_update_output = compute_contract_state_commitment(
^^
/snos/cairo-lang/src/starkware/starknet/core/os/state/commitment.cairo:90:5: (pc=0:3914)
compute_contract_state_commitment_inner(
^
^
/snos/cairo-lang/src/starkware/starknet/core/os/state/commitment.cairo:139:5: (pc=0:3942)
hash_contract_state_changes(
^
********************^

exception:
Err(
Runner(
VmException(
VmException {
pc: Relocatable {
segment_index: 0,
offset: 3956,
},
inst_location: Some(
Location {
end_line: 181,
end_col: 7,
input_file: InputFile {
filename: "/snos/cairo-lang/src/starkware/starknet/core/os/state/commitment.cairo",
},
parent_location: None,
start_line: 172,
start_col: 5,
},
),
inner_exc: Hint(
(
0,
CustomHint(
"Could not find commitment info for contract 1",
),
),
),
error_attr_value: None,
traceback: Some(
"Cairo traceback (most recent call last):\ncairo-lang/src/starkware/starknet/core/os/os.cairo:102:59: (pc=0:10627)\n let (squashed_os_state_update, state_update_output) = state_update{hash_ptr=pedersen_ptr}(\n ^**********************************^\n/snos/cairo-lang/src/starkware/starknet/core/os/state/state.cairo:56:45: (pc=0:4310)\n let contract_state_tree_update_output = compute_contract_state_commitment(\n ^^\n/snos/cairo-lang/src/starkware/starknet/core/os/state/commitment.cairo:90:5: (pc=0:3914)\n compute_contract_state_commitment_inner(\n ^^\n/snos/cairo-lang/src/starkware/starknet/core/os/state/commitment.cairo:139:5: (pc=0:3942)\n hash_contract_state_changes(\n ^********************^\n",
),
},
),
),
)
test run_os_on_simple_block_cairo1 ... ok

Expected behavior:
No exceptions

Steps to reproduce:
cargo test run_os_on_simple_block_cairo1 -- --nocapture
Related code:

insert short code snippets here

Hi @alexzhenyu , this project is still in active development. This is a known issue, we are currently working on it.