Skip to content

Commit b3ad66c

Browse files
Change cairo's repo version used in range check doc links (#1313)
* change cairo's repo version used in range check doc links * change to version v2.12.0-dev.1
1 parent b6b4ca7 commit b3ad66c

File tree

11 files changed

+23
-23
lines changed

11 files changed

+23
-23
lines changed

src/libfuncs/bounded_int.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ fn build_divrem<'ctx, 'this>(
590590
};
591591

592592
// Increase range check builtin by 3, regardless of `div_rem_algorithm`:
593-
// https://github.com/starkware-libs/cairo/blob/61c56aff349b4715f2a6619faf5b710f2da8a663/crates/cairo-lang-sierra-to-casm/src/invocations/int/bounded.rs#L97
593+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/int/bounded.rs#L100
594594
let range_check = match div_rem_algorithm {
595595
BoundedIntDivRemAlgorithm::KnownSmallRhs => crate::libfuncs::increment_builtin_counter_by(
596596
context,
@@ -603,8 +603,8 @@ fn build_divrem<'ctx, 'this>(
603603
| BoundedIntDivRemAlgorithm::KnownSmallLhs { .. } => {
604604
// If `div_rem_algorithm` is `KnownSmallQuotient` or `KnownSmallLhs`, increase range check builtin by 1.
605605
//
606-
// Case KnownSmallQuotient: https://github.com/starkware-libs/cairo/blob/61c56aff349b4715f2a6619faf5b710f2da8a663/crates/cairo-lang-sierra-to-casm/src/invocations/int/bounded.rs#L126
607-
// Case KnownSmallLhs: https://github.com/starkware-libs/cairo/blob/61c56aff349b4715f2a6619faf5b710f2da8a663/crates/cairo-lang-sierra-to-casm/src/invocations/int/bounded.rs#L154
606+
// Case KnownSmallQuotient: https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/int/bounded.rs#L129
607+
// Case KnownSmallLhs: https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/int/bounded.rs#L157
608608
crate::libfuncs::increment_builtin_counter_by(
609609
context,
610610
entry,

src/libfuncs/bytes31.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ pub fn build_from_felt252<'ctx, 'this>(
111111
info: &SignatureOnlyConcreteLibfunc,
112112
) -> Result<()> {
113113
// The sierra-to-casm compiler uses the range check builtin a total of 3 times.
114-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/misc.rs?plain=1#L266
114+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/misc.rs?plain=1#L266
115115
let range_check: Value =
116116
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 3)?;
117117

src/libfuncs/circuit.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ fn build_eval<'ctx, 'this>(
317317
// let one = entry.argument(6)?;
318318

319319
// Always increase the add mod builtin pointer, regardless of the evaluation result.
320-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs?plain=1#L257
320+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs?plain=1#L257
321321
let add_mod = increment_builtin_counter_by(
322322
context,
323323
entry,
@@ -351,7 +351,7 @@ fn build_eval<'ctx, 'this>(
351351

352352
// Increase the mul mod builtin pointer by the number of evaluated gates.
353353
// If the evaluation succedes, then we assume that every gate was evaluated.
354-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs?plain=1#L261
354+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs?plain=1#L261
355355
let mul_mod = increment_builtin_counter_by(
356356
context,
357357
ok_block,
@@ -432,7 +432,7 @@ fn build_eval<'ctx, 'this>(
432432
// Increase the mul mod builtin pointer by the number of evaluated gates.
433433
// As the evaluation failed, we read the number of evaluated gates from
434434
// the first argument of the error block.
435-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs?plain=1#L261
435+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs?plain=1#L261
436436
let mul_mod = {
437437
let mul_mod_usage = err_block.muli(
438438
err_block.arg(0)?,
@@ -1209,7 +1209,7 @@ fn build_u96_guarantee_verify<'ctx, 'this>(
12091209
_info: &SignatureOnlyConcreteLibfunc,
12101210
) -> Result<()> {
12111211
// We increase the range_check96 builtin by 1 usage
1212-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs?plain=1#L534
1212+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/circuit.rs?plain=1#L534
12131213
let range_check96 = increment_builtin_counter_by(
12141214
context,
12151215
entry,

src/libfuncs/felt252_dict.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub fn build_new<'ctx, 'this>(
5555
info: &SignatureOnlyConcreteLibfunc,
5656
) -> Result<()> {
5757
// We increase the segment arena builtin by 1 usage.
58-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/felt252_dict.rs?plain=1#L45-L49
58+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/felt252_dict.rs?plain=1#L45-L49
5959
let segment_arena = super::increment_builtin_counter_by(
6060
context,
6161
entry,

src/libfuncs/int.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ fn build_divmod<'ctx, 'this>(
335335
))?;
336336
// The sierra-to-casm compiler uses the range check builtin 3 times if the algorithm
337337
// is KnownSmallRhs. Otherwise it is used 4 times.
338-
// https://github.com/starkware-libs/cairo/blob/96625b57abee8aca55bdeb3ecf29f82e8cea77c3/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned.rs#L151C1-L155C11
338+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned.rs#L151C1-L155C11
339339
let range_check = match div_rem_algorithm {
340340
BoundedIntDivRemAlgorithm::KnownSmallRhs => {
341341
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 3)?
@@ -568,7 +568,7 @@ fn build_mul_guarantee_verify<'ctx, 'this>(
568568
_info: &SignatureOnlyConcreteLibfunc,
569569
) -> Result<()> {
570570
// The sierra-to-casm compiler uses the range check builtin a total of 9 times.
571-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned128.rs?plain=1#L112
571+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned128.rs?plain=1#L112
572572
let range_check =
573573
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 9)?;
574574

@@ -673,7 +673,7 @@ fn build_square_root<'ctx, 'this>(
673673
info: &SignatureOnlyConcreteLibfunc,
674674
) -> Result<()> {
675675
// The sierra-to-casm compiler uses the range_check builtin 4 times.
676-
// https://github.com/starkware-libs/cairo/blob/96625b57abee8aca55bdeb3ecf29f82e8cea77c3/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned.rs#L73
676+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned.rs#L73
677677
let range_check =
678678
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 4)?;
679679

@@ -898,7 +898,7 @@ fn build_u128s_from_felt252<'ctx, 'this>(
898898

899899
// The sierra-to-casm compiler uses the range check builtin a total of 3 times when the value is greater than u128 max.
900900
// Otherwise it will be used once.
901-
// https://github.com/starkware-libs/cairo/blob/96625b57abee8aca55bdeb3ecf29f82e8cea77c3/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned128.rs#L234
901+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned128.rs#L234
902902
let range_check = super::increment_builtin_counter_by_if(
903903
context,
904904
entry,

src/libfuncs/int_range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub fn build_int_range_try_new<'ctx, 'this>(
5757
info: &SignatureOnlyConcreteLibfunc,
5858
) -> Result<()> {
5959
// The sierra-to-casm compiler uses the range check builtin a total of 1 time.
60-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/range.rs?plain=1#L24
60+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/range.rs?plain=1#L24
6161
let range_check = super::increment_builtin_counter(context, entry, location, entry.arg(0)?)?;
6262
let x = entry.arg(1)?;
6363
let y = entry.arg(2)?;

src/libfuncs/pedersen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub fn build_pedersen<'ctx>(
5353
.to_native_assert_error("runtime library should be available")?;
5454

5555
// The sierra-to-casm compiler uses the pedersen builtin a total of 1 time.
56-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/pedersen.rs?plain=1#L23
56+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/pedersen.rs?plain=1#L23
5757
let pedersen_builtin = super::increment_builtin_counter_by(
5858
context,
5959
entry,

src/libfuncs/poseidon.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub fn build_hades_permutation<'ctx>(
5454
.to_native_assert_error("runtime library should be available")?;
5555

5656
// The sierra-to-casm compiler uses the poseidon builtin a total of 1 time.
57-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/poseidon.rs?plain=1#L19
57+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/poseidon.rs?plain=1#L19
5858
let poseidon_builtin = super::increment_builtin_counter_by(
5959
context,
6060
entry,

src/libfuncs/starknet.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ pub fn build_class_hash_try_from_felt252<'ctx, 'this>(
391391
_info: &SignatureOnlyConcreteLibfunc,
392392
) -> Result<()> {
393393
// The sierra-to-casm compiler uses the range check builtin a total of 3 times.
394-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/misc.rs?plain=1#L266
394+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/misc.rs?plain=1#L266
395395
let range_check =
396396
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 3)?;
397397

@@ -450,7 +450,7 @@ pub fn build_contract_address_try_from_felt252<'ctx, 'this>(
450450
_info: &SignatureOnlyConcreteLibfunc,
451451
) -> Result<()> {
452452
// The sierra-to-casm compiler uses the range check builtin a total of 3 times.
453-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/misc.rs?plain=1#L266
453+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/misc.rs?plain=1#L266
454454
let range_check =
455455
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 3)?;
456456

@@ -823,7 +823,7 @@ pub fn build_storage_base_address_from_felt252<'ctx, 'this>(
823823
_info: &SignatureOnlyConcreteLibfunc,
824824
) -> Result<()> {
825825
// The sierra-to-casm compiler uses the range check builtin a total of 3 times.
826-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/starknet/storage.rs?plain=1#L30
826+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/starknet/storage.rs?plain=1#L30
827827
let range_check =
828828
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 3)?;
829829

@@ -881,7 +881,7 @@ pub fn build_storage_address_try_from_felt252<'ctx, 'this>(
881881
_info: &SignatureOnlyConcreteLibfunc,
882882
) -> Result<()> {
883883
// The sierra-to-casm compiler uses the range check builtin a total of 3 times.
884-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/misc.rs?plain=1#L266
884+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/misc.rs?plain=1#L266
885885
let range_check =
886886
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 3)?;
887887

src/libfuncs/uint256.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub fn build_divmod<'ctx, 'this>(
6565
info: &SignatureOnlyConcreteLibfunc,
6666
) -> Result<()> {
6767
// The sierra-to-casm compiler uses the range check builtin a total of 6 times.
68-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned256.rs?plain=1#L47
68+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned256.rs?plain=1#L47
6969
let range_check =
7070
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 6)?;
7171

@@ -353,7 +353,7 @@ pub fn build_square_root<'ctx, 'this>(
353353
_info: &SignatureOnlyConcreteLibfunc,
354354
) -> Result<()> {
355355
// The sierra-to-casm compiler uses the range check builtin a total of 7 times.
356-
// https://github.com/starkware-libs/cairo/blob/dc8b4f0b2e189a3b107b15062895597588b78a46/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned256.rs?plain=1#L189
356+
// https://github.com/starkware-libs/cairo/blob/v2.12.0-dev.1/crates/cairo-lang-sierra-to-casm/src/invocations/int/unsigned256.rs?plain=1#L189
357357
let range_check =
358358
super::increment_builtin_counter_by(context, entry, location, entry.arg(0)?, 7)?;
359359

0 commit comments

Comments
 (0)