Skip to content

Commit 7d23e6e

Browse files
authored
Merge pull request #348 from costa-group/release
Adding changes version 2.2.2
2 parents 7a27234 + fbcb805 commit 7d23e6e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+21428
-831
lines changed

Cargo.lock

Lines changed: 22 additions & 60 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Circom language reference can be found at [circom language reference](https://do
2323

2424
At this time there are two available syntax highlighters: [circom Visual Studio Code highlight syntax](https://github.com/iden3/circom-highlighting-vscode) and [circom Vim highlight syntax](https://github.com/iden3/vim-circom-syntax).
2525

26+
The circom development team is part of the COSTA research group at the Complutense University of Madrid.
27+
2628
# Documentation
2729
All documentation is available in [circom 2 Documentation](https://docs.circom.io/), we encourage you to read it. If you are new start with the [Getting started section](https://docs.circom.io/getting-started/installation/).
2830
Basic background on Zero-knowledge proofs can be found on [Background section](https://docs.circom.io/background/background/).

RELEASES.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
# Release notes
2+
## March 11, 2025 circom 2.2.2
3+
#### Extensions
4+
- Adding a new prime number: bls12377.
5+
- Adding an r1cs reader.
6+
- Adding a new compilation flag --no_asm: If activated, it does not use asm files for witness generation code in C++.
7+
- Adding a new compilation flag --no_init: If activated, it removes zero-initializations of circom variables (var).
8+
9+
#### Improvements
10+
- Adding a specific 64-bit arithmetization for Goldilocks in C++ (not using asm), which dramatically improves witness generation efficiency for this prime.
11+
- Generation of full C++ code for the arithmatization (for the prime in use) as an alternative to asm code. This is activated with the new --no_asm flag and provides C++ witness generation code which is independent from the architecture being used.
12+
- Improving the analysis of signal double assigment: branch case no longer causes an error in assignments in different branches.
13+
- Improving the generated C++ code by removing unnecessary instructions.
14+
15+
###Fixed bugs
16+
- Fixing a panic in type analysis.
17+
18+
219
## November 12, 2024 circom 2.2.1
320
#### Improvements:
421
- Improving the use and heritance of tags inside buses. Now the values are propagated correctly following the same rules as arrays.
@@ -8,7 +25,6 @@
825
- Improving error messages.
926
- Improving error recovery in parser.
1027
- Adding flag --constraint_assert_dissabled. When this flag is activated the compiler does not add asserts in the generated code (C++, WASM) for === constraint equalities
11-
1228

1329
#### Fixed bugs:
1430
- Importing function printDebug removed from WASM (circom tests from circomlib working now).

circom/src/compilation_user.rs

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ pub struct CompilerConfig {
2121
pub c_flag: bool,
2222
pub debug_output: bool,
2323
pub produce_input_log: bool,
24-
pub constraint_assert_dissabled_flag: bool,
24+
pub constraint_assert_disabled_flag: bool,
2525
pub vcp: VCP,
26+
pub no_asm_flag: bool,
27+
pub prime: String,
2628
}
2729

2830
pub fn compile(config: CompilerConfig) -> Result<(), ()> {
@@ -35,7 +37,9 @@ pub fn compile(config: CompilerConfig) -> Result<(), ()> {
3537
debug_output: config.debug_output,
3638
produce_input_log: config.produce_input_log,
3739
wat_flag: config.wat_flag,
38-
constraint_assert_dissabled_flag: config.constraint_assert_dissabled_flag,
40+
41+
constraint_assert_disabled_flag: config.constraint_assert_disabled_flag,
42+
no_asm_flag: config.no_asm_flag,
3943
},
4044
VERSION
4145
)?;
@@ -48,21 +52,50 @@ pub fn compile(config: CompilerConfig) -> Result<(), ()> {
4852
config.c_file,
4953
config.dat_file
5054
);
51-
println!(
52-
"{} {}/{}, {}, {}, {}, {}, {}, {} and {}",
53-
Colour::Green.paint("Written successfully:"),
54-
&config.c_folder,
55-
"main.cpp".to_string(),
56-
"circom.hpp".to_string(),
57-
"calcwit.hpp".to_string(),
58-
"calcwit.cpp".to_string(),
59-
"fr.hpp".to_string(),
60-
"fr.cpp".to_string(),
61-
"fr.asm".to_string(),
62-
"Makefile".to_string()
63-
);
55+
if config.no_asm_flag {
56+
println!(
57+
"{} {}/{}, {}, {}, {}, {}, {} and {}",
58+
Colour::Green.paint("Written successfully:"),
59+
&config.c_folder,
60+
"main.cpp".to_string(),
61+
"circom.hpp".to_string(),
62+
"calcwit.hpp".to_string(),
63+
"calcwit.cpp".to_string(),
64+
"fr.hpp".to_string(),
65+
"fr.cpp".to_string(),
66+
"Makefile".to_string()
67+
);
68+
} else {
69+
if config.prime == "goldilocks" {
70+
println!(
71+
"{} {}/{}, {}, {}, {}, {}, {} and {}",
72+
Colour::Green.paint("Written successfully:"),
73+
&config.c_folder,
74+
"main.cpp".to_string(),
75+
"circom.hpp".to_string(),
76+
"calcwit.hpp".to_string(),
77+
"calcwit.cpp".to_string(),
78+
"fr.hpp".to_string(),
79+
"Makefile".to_string(),
80+
"json2bin64.cpp".to_string()
81+
);
82+
} else {
83+
println!(
84+
"{} {}/{}, {}, {}, {}, {}, {}, {} and {}",
85+
Colour::Green.paint("Written successfully:"),
86+
&config.c_folder,
87+
"main.cpp".to_string(),
88+
"circom.hpp".to_string(),
89+
"calcwit.hpp".to_string(),
90+
"calcwit.cpp".to_string(),
91+
"fr.hpp".to_string(),
92+
"fr.cpp".to_string(),
93+
"fr.asm".to_string(),
94+
"Makefile".to_string()
95+
);
96+
}
97+
}
6498
}
65-
6699
match (config.wat_flag, config.wasm_flag) {
67100
(true, true) => {
68101
compiler_interface::write_wasm(&circuit, &config.js_folder, &config.wasm_name, &config.wat_file)?;

0 commit comments

Comments
 (0)