Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Reset the noir-gates-diff report on master #4878

Merged
merged 19 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gates_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ jobs:
run: |
./gates_report.sh
mv gates_report.json ../gates_report.json

- name: Compare gates reports
id: gates_diff
uses: vezenovm/noir-gates-diff@f80ea702d579873ff80f0261c62e2bae5203748e
uses: vezenovm/noir-gates-diff@45e9c9a21deb236fa7f38138b42b33ddaf7c0985
with:
report: gates_report.json
summaryQuantile: 0.9 # only display the 10% most significant circuit size diffs in the summary (defaults to 20%)
Expand Down
6 changes: 6 additions & 0 deletions test_programs/execution_success/1_mul/src/main.nr
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Test unsafe integer multiplication with overflow: 12^8 = 429 981 696
// The circuit should handle properly the growth of the bit size
fn main(mut x: u32, y: u32, z: u32) {
let nine = x * x;
assert(nine == 9);

let sixteen = y * y;
assert(sixteen == 16);
vezenovm marked this conversation as resolved.
Show resolved Hide resolved

x *= y;
x *= x; //144
x *= x; //20736
Expand Down
6 changes: 3 additions & 3 deletions tooling/nargo_cli/src/cli/info_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ struct InfoReport {

#[derive(Debug, Serialize)]
struct ProgramInfo {
name: String,
package_name: String,
#[serde(skip)]
expression_width: ExpressionWidth,
functions: Vec<FunctionInfo>,
Expand All @@ -238,7 +238,7 @@ impl From<ProgramInfo> for Vec<Row> {
fn from(program_info: ProgramInfo) -> Self {
vecmap(program_info.functions, |function| {
row![
Fm->format!("{}", program_info.name),
Fm->format!("{}", program_info.package_name),
jfecher marked this conversation as resolved.
Show resolved Hide resolved
Fc->format!("{}", function.name),
format!("{:?}", program_info.expression_width),
Fc->format!("{}", function.acir_opcodes),
Expand Down Expand Up @@ -302,7 +302,7 @@ fn count_opcodes_and_gates_in_program(
})
.collect::<Result<_, _>>()?;

Ok(ProgramInfo { name: package.name.to_string(), expression_width, functions })
Ok(ProgramInfo { package_name: package.name.to_string(), expression_width, functions })
}

fn count_opcodes_and_gates_in_contract(
Expand Down
Loading