From e26a27b0873989bc79f9c39958d126bf82cbc37c Mon Sep 17 00:00:00 2001 From: FT <140458077+zeevick10@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:21:59 +0100 Subject: [PATCH 1/4] Update README.md --- cairo1-run/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cairo1-run/README.md b/cairo1-run/README.md index 0aa67c0b22..7057c1d093 100644 --- a/cairo1-run/README.md +++ b/cairo1-run/README.md @@ -97,7 +97,7 @@ Example: ## Libfunc `get_builtin_costs` & function `poseidon_hash_many` Compiling without gas checks removes libfuncs associated with gas checks that are generated during compilation but it cannot remove those in the cairo code itself. Therefore code using the external functions on the `gas` corelib moudle (`withdraw_gas`, `withdraw_gas_all` & `get_builtin_costs`) will fail to compile. -One notable case of this issue is the `poseidon_hash_span` function, which uses `get_builtin_costs` in its implementation. We advise using the `HashStateTrait` impl instead. The `poseidon_hash_span` function can also be modified so that it no longer relies on gas, an example of this can be found on the test file `poseidon.cairo` under the `cairo_porgrams/cairo-1-programs` folder. +One notable case of this issue is the `poseidon_hash_span` function, which uses `get_builtin_costs` in its implementation. We advise using the `HashStateTrait` impl instead. The `poseidon_hash_span` function can also be modified so that it no longer relies on gas, an example of this can be found on the test file `poseidon.cairo` under the `cairo_programs/cairo-1-programs` folder. ## Nullable> There is currently a bug in cairo 2.6.3 affecting `Nullable>` types. From 7b37b3a7100c7df8d8deaf39ed3553a8d2f65889 Mon Sep 17 00:00:00 2001 From: FT <140458077+zeevick10@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:22:36 +0100 Subject: [PATCH 2/4] Update dict_hint_utils.rs --- vm/src/hint_processor/builtin_hint_processor/dict_hint_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/hint_processor/builtin_hint_processor/dict_hint_utils.rs b/vm/src/hint_processor/builtin_hint_processor/dict_hint_utils.rs index 8e8ae9271b..825811dda3 100644 --- a/vm/src/hint_processor/builtin_hint_processor/dict_hint_utils.rs +++ b/vm/src/hint_processor/builtin_hint_processor/dict_hint_utils.rs @@ -149,7 +149,7 @@ pub fn dict_write( //Insert new value into tracker tracker.insert_value(&key, &new_value); //Insert previous value into dict_ptr.prev_value - //Addres for dict_ptr.prev_value should be dict_ptr* + 1 (defined above) + //Address for dict_ptr.prev_value should be dict_ptr* + 1 (defined above) vm.insert_value(dict_ptr_prev_value, prev_value)?; Ok(()) } From d12bedc39a5f54ca0e632a8a962c04b30e952197 Mon Sep 17 00:00:00 2001 From: FT <140458077+zeevick10@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:23:11 +0100 Subject: [PATCH 3/4] Update fq.cairo --- cairo_programs/fq.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cairo_programs/fq.cairo b/cairo_programs/fq.cairo index 01eac26c91..41c2d9e434 100644 --- a/cairo_programs/fq.cairo +++ b/cairo_programs/fq.cairo @@ -199,7 +199,7 @@ namespace fq { } // Computes a * b^{-1} modulo p - // NOTE: The modular inverse of b modulo p is computed in a hint and verified outside the hind with a multiplicaiton + // NOTE: The modular inverse of b modulo p is computed in a hint and verified outside the hind with a multiplication func div{range_check_ptr}(a: Uint256, b: Uint256, p: Uint256) -> Uint256 { alloc_locals; local b_inverse_mod_p: Uint256; From 6d13a1162cc4413cd66bed0071aa4656a2562e5f Mon Sep 17 00:00:00 2001 From: FT <140458077+zeevick10@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:25:01 +0100 Subject: [PATCH 4/4] Update vm_core.rs --- vm/src/vm/vm_core.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/src/vm/vm_core.rs b/vm/src/vm/vm_core.rs index 878953b9ea..8f56f7d3aa 100644 --- a/vm/src/vm/vm_core.rs +++ b/vm/src/vm/vm_core.rs @@ -3850,7 +3850,7 @@ mod tests { HashMap::new(), ))]; - //Initialzie registers + //Initialize registers run_context!(vm, 3, 2, 2); //Create program and execution segments