From 40a7831a73463bf24021c6b4dccd77d970323ec8 Mon Sep 17 00:00:00 2001 From: Pia Date: Tue, 28 May 2024 13:21:06 +0900 Subject: [PATCH] chore: hint comment out --- lib/mpt.cairo | 2 +- lib/rlp_little.cairo | 22 +++++++++++----------- mpt-fixtures | 1 + 3 files changed, 13 insertions(+), 12 deletions(-) create mode 160000 mpt-fixtures diff --git a/lib/mpt.cairo b/lib/mpt.cairo index 228f980..40ee8a9 100644 --- a/lib/mpt.cairo +++ b/lib/mpt.cairo @@ -90,7 +90,7 @@ func verify_mpt_proof_inner{ pow2_array: felt*, ) -> (value: felt*, value_len: felt) { alloc_locals; - %{ print(f"\n\nNode index {ids.node_index+1}/{ids.mpt_proof_len} \n \t {ids.n_nibbles_already_checked=}") %} + // %{ print(f"\n\nNode index {ids.node_index+1}/{ids.mpt_proof_len} \n \t {ids.n_nibbles_already_checked=}") %} if (node_index == mpt_proof_len - 1) { // Last node : item of interest is the value. // Check that the hash of the last node is the expected one. diff --git a/lib/rlp_little.cairo b/lib/rlp_little.cairo index 02b182b..049f935 100644 --- a/lib/rlp_little.cairo +++ b/lib/rlp_little.cairo @@ -249,25 +249,25 @@ func assert_subset_in_key_be{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}( // Get the little endian 256 bit number from the extracted 64 bit le words array : let key_subset_256_le = key_subset_to_uint256(key_subset, key_subset_len); - %{ - key_subset_256_le = hex(ids.key_subset_256_le.low + ids.key_subset_256_le.high*2**128)[2:] - print(f"Key subset 256 le: {key_subset_256_le}") - %} + // %{ + // key_subset_256_le = hex(ids.key_subset_256_le.low + ids.key_subset_256_le.high*2**128)[2:] + // print(f"Key subset 256 le: {key_subset_256_le}") + // %} let (key_subset_be_tmp: Uint256, n_bytes: felt) = uint256_reverse_endian_no_padding( key_subset_256_le, pow2_array ); - %{ - orig_key = hex(ids.key_be.low + ids.key_be.high*2**128)[2:] - key_subset = hex(ids.key_subset_be_tmp.low + ids.key_subset_be_tmp.high*2**128)[2:] - print(f"Orig key: {orig_key}, n_nibbles={len(orig_key)}") - print(f"Key subset: {key_subset}, n_nibbles={len(key_subset)}") - %} + // %{ + // orig_key = hex(ids.key_be.low + ids.key_be.high*2**128)[2:] + // key_subset = hex(ids.key_subset_be_tmp.low + ids.key_subset_be_tmp.high*2**128)[2:] + // print(f"Orig key: {orig_key}, n_nibbles={len(orig_key)}") + // print(f"Key subset: {key_subset}, n_nibbles={len(key_subset)}") + // %} // Cut nibble of the key subset if needed from the leftmost position. 0x123 -> 0x23 local key_subset_be: Uint256; local bitwise_ptr_f: BitwiseBuiltin*; if (cut_nibble != 0) { - %{ print(f"Cut nibble") %} + // %{ print(f"Cut nibble") %} if (key_subset_be_tmp.high != 0) { let (_, key_susbet_be_high) = bitwise_divmod( key_subset_be_tmp.high, pow2_array[8 * (n_bytes - 16) - 4] diff --git a/mpt-fixtures b/mpt-fixtures new file mode 160000 index 0000000..d2de024 --- /dev/null +++ b/mpt-fixtures @@ -0,0 +1 @@ +Subproject commit d2de024d04d0f78a5020a08284456e82646cb80c