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 2
2
3
3
#### Upcoming Changes
4
4
5
+ * fix: Fix compute_ids_high_low hint constant path [ #2193 ] ( https://github.com/lambdaclass/cairo-vm/pull/2193 )
6
+
5
7
#### [ 2.4.0] - 2025-27-29
6
8
7
9
* 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(
170
170
) -> Result < ( ) , HintError > {
171
171
exec_scopes. insert_value :: < BigInt > ( "SECP256R1_P" , SECP256R1_P . clone ( ) ) ;
172
172
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" ;
175
175
176
176
let upper_bound = constants
177
177
. get ( UPPER_BOUND )
Original file line number Diff line number Diff line change @@ -1353,6 +1353,15 @@ fn cairo_run_secp_cairo0_negative_points() {
1353
1353
run_program_simple ( program_data. as_slice ( ) ) ;
1354
1354
}
1355
1355
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
+
1356
1365
#[ test]
1357
1366
#[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test) ]
1358
1367
#[ cfg( feature = "cairo-0-data-availability-hints" ) ]
You can’t perform that action at this time.
0 commit comments