File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed
cairo_programs/cairo-0-secp-hints-feature
hint_processor/builtin_hint_processor/secp Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 22
33#### Upcoming Changes
44
5+ * fix: Fix compute_ids_high_low hint constant path [ #2193 ] ( https://github.com/lambdaclass/cairo-vm/pull/2193 )
6+
57#### [ 2.4.0] - 2025-27-29
68
79* chore: Bump types-rs to 0.2.0 [ #2186 ] ( https://github.com/lambdaclass/cairo-vm/pull/2186 )
Original file line number Diff line number Diff line change 1+ %builtins range_check
2+
3+ from starkware.cairo.common.secp256r1.field import assert_165_bit
4+
5+ func main {range_check_ptr: felt } () {
6+ let value = 10 ;
7+ assert_165_bit(value);
8+ return ();
9+ }
Original file line number Diff line number Diff line change @@ -170,8 +170,8 @@ pub fn compute_ids_high_low(
170170) -> Result < ( ) , HintError > {
171171 exec_scopes. insert_value :: < BigInt > ( "SECP256R1_P" , SECP256R1_P . clone ( ) ) ;
172172
173- const UPPER_BOUND : & str = "starkware.cairo.common.math.assert_250_bit .UPPER_BOUND" ;
174- const SHIFT : & str = "starkware.cairo.common.math.assert_250_bit .SHIFT" ;
173+ const UPPER_BOUND : & str = "starkware.cairo.common.secp256r1.field.assert_165_bit .UPPER_BOUND" ;
174+ const SHIFT : & str = "starkware.cairo.common.secp256r1.field.assert_165_bit .SHIFT" ;
175175
176176 let upper_bound = constants
177177 . get ( UPPER_BOUND )
Original file line number Diff line number Diff line change @@ -1353,6 +1353,15 @@ fn cairo_run_secp_cairo0_negative_points() {
13531353 run_program_simple ( program_data. as_slice ( ) ) ;
13541354}
13551355
1356+ #[ test]
1357+ #[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
1358+ #[ cfg( feature = "cairo-0-secp-hints" ) ]
1359+ fn cairo_run_secp_cairo0_assert_165_bits ( ) {
1360+ let program_data =
1361+ include_bytes ! ( "../../../cairo_programs/cairo-0-secp-hints-feature/assert_165_bit.json" ) ;
1362+ run_program_simple ( program_data. as_slice ( ) ) ;
1363+ }
1364+
13561365#[ test]
13571366#[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
13581367#[ cfg( feature = "cairo-0-data-availability-hints" ) ]
You can’t perform that action at this time.
0 commit comments