Skip to content

Commit

Permalink
fix: Reset the noir-gates-diff report on master (#4878)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

Opened this PR to test
noir-lang/noir-gates-diff#3 after seeing this
#4848 (comment)

## Summary\*

The noir-gates-diff report became malformed on master as "main" was used
as the program name for each program in `execution_success`. This PR
references the last commit in this PR
noir-lang/noir-gates-diff#3. That PR changes to
using the correct name for each program in `execution_success` but also
resets the report on `master` by comparing against a harcoded reference.
That is why it is expected to see a massive gate diff report on this PR.
The follow-up will revert the changes to accurately check against the
reference.

## Additional Context



## Documentation\*

Check one:
- [ ] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [ ] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
vezenovm committed Apr 23, 2024
1 parent f267d42 commit 50bc325
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
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: 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),
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

0 comments on commit 50bc325

Please sign in to comment.