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

chore: Rebuild ACIR test artifacts #2147

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Conversation

TomAFrench
Copy link
Member

Description

Problem*

Summary*

This PR addresses the test failures in https://github.com/AztecProtocol/aztec-packages by regenerating the test cases using nargo built from de072ae.

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@TomAFrench TomAFrench requested a review from kobyhallx August 3, 2023 13:13
@TomAFrench
Copy link
Member Author

I was a little concerned by the increase in the size of the bytecode in this PR and that we might have a regression on gate counts.

It turns out that it's due to #1766 as we're replacing the quotient directive with a brillig function and so we need to include the bytecode while the directive didn't include its implementation in the ACIR.

Compare simple_shift_left_right from the previous committed artifact

Compiled ACIR for main (unoptimized):
current witness index : 10
public parameters indices : []
return value indices : []
BLACKBOX::RANGE [(_1, num_bits: 32)] [ ]
DIR::QUOTIENT PREDICATE = %EXPR [ 1 ]%
(out : _x1,  (_2, %EXPR [ 2⁴ ]%), _3)
BLACKBOX::RANGE [(_2, num_bits: 28)] [ ]
BLACKBOX::RANGE [(_3, num_bits: 5)] [ ]
BLACKBOX::RANGE [(_3, num_bits: 4)] [ ]
EXPR [ (1, _1) (-2⁴, _2) (-1, _3) 0 ]
DIR::QUOTIENT PREDICATE = %EXPR [ 1 ]%
(out : _%EXPR [ (2⁴, _1) 0 ]%,  (_4, %EXPR [ 2³² ]%), _5)
BLACKBOX::RANGE [(_4, num_bits: 4)] [ ]
BLACKBOX::RANGE [(_5, num_bits: 33)] [ ]
BLACKBOX::RANGE [(_5, num_bits: 32)] [ ]
EXPR [ (2⁴, _1) (-2³², _4) (-1, _5) 0 ]
DIR::QUOTIENT PREDICATE = %EXPR [ 1 ]%
(out : _x5,  (_6, %EXPR [ 2⁸ ]%), _7)
BLACKBOX::RANGE [(_6, num_bits: 24)] [ ]
BLACKBOX::RANGE [(_7, num_bits: 9)] [ ]
BLACKBOX::RANGE [(_7, num_bits: 8)] [ ]
EXPR [ (1, _5) (-2⁸, _6) (-1, _7) 0 ]
EXPR [ (1, _2) (-1, _6) (-1, _8) 0 ]
BRILLIG: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 })]
outputs: [Simple(Witness(9))]
[JumpIfNot { condition: RegisterIndex(0), location: 3 }, Const { destination: RegisterIndex(1), value: Value { inner: 1 } }, BinaryFieldOp { destination: RegisterIndex(0), op: Div, lhs: RegisterIndex(1), rhs: RegisterIndex(0) }, Stop]

EXPR [ (1, _8, _9) (1, _10) -1 ]
EXPR [ (1, _8, _10) 0 ]
EXPR [ (1, _10) -1 ]

Total ACIR opcodes generated for language PLONKCSat { width: 3 }: 18
Backend circuit size: 2980

to the version committed in this PR

Compiled ACIR for main (unoptimized):
current witness index : 10
public parameters indices : []
return value indices : []
BLACKBOX::RANGE [(_1, num_bits: 32)] [ ]
BRILLIG: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(1))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 2⁴ }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 1 })]
outputs: [Simple(Witness(2)), Simple(Witness(3))]
[JumpIfNot { condition: RegisterIndex(2), location: 6 }, BinaryIntOp { destination: RegisterIndex(3), op: UnsignedDiv, bit_size: 33, lhs: RegisterIndex(0), rhs: RegisterIndex(1) }, BinaryIntOp { destination: RegisterIndex(1), op: Mul, bit_size: 33, lhs: RegisterIndex(3), rhs: RegisterIndex(1) }, BinaryIntOp { destination: RegisterIndex(1), op: Sub, bit_size: 33, lhs: RegisterIndex(0), rhs: RegisterIndex(1) }, Mov { destination: RegisterIndex(0), source: RegisterIndex(3) }, Stop, Const { destination: RegisterIndex(0), value: Value { inner: 0 } }, Const { destination: RegisterIndex(1), value: Value { inner: 0 } }, Stop]

BLACKBOX::RANGE [(_2, num_bits: 28)] [ ]
BLACKBOX::RANGE [(_3, num_bits: 5)] [ ]
BLACKBOX::RANGE [(_3, num_bits: 4)] [ ]
EXPR [ (1, _1) (-2⁴, _2) (-1, _3) 0 ]
BRILLIG: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(2⁴, Witness(1))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 2³² }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 1 })]
outputs: [Simple(Witness(4)), Simple(Witness(5))]
[JumpIfNot { condition: RegisterIndex(2), location: 6 }, BinaryIntOp { destination: RegisterIndex(3), op: UnsignedDiv, bit_size: 37, lhs: RegisterIndex(0), rhs: RegisterIndex(1) }, BinaryIntOp { destination: RegisterIndex(1), op: Mul, bit_size: 37, lhs: RegisterIndex(3), rhs: RegisterIndex(1) }, BinaryIntOp { destination: RegisterIndex(1), op: Sub, bit_size: 37, lhs: RegisterIndex(0), rhs: RegisterIndex(1) }, Mov { destination: RegisterIndex(0), source: RegisterIndex(3) }, Stop, Const { destination: RegisterIndex(0), value: Value { inner: 0 } }, Const { destination: RegisterIndex(1), value: Value { inner: 0 } }, Stop]

BLACKBOX::RANGE [(_4, num_bits: 4)] [ ]
BLACKBOX::RANGE [(_5, num_bits: 33)] [ ]
BLACKBOX::RANGE [(_5, num_bits: 32)] [ ]
EXPR [ (2⁴, _1) (-2³², _4) (-1, _5) 0 ]
BRILLIG: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(5))], q_c: 0 }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 2⁸ }), Single(Expression { mul_terms: [], linear_combinations: [], q_c: 1 })]
outputs: [Simple(Witness(6)), Simple(Witness(7))]
[JumpIfNot { condition: RegisterIndex(2), location: 6 }, BinaryIntOp { destination: RegisterIndex(3), op: UnsignedDiv, bit_size: 33, lhs: RegisterIndex(0), rhs: RegisterIndex(1) }, BinaryIntOp { destination: RegisterIndex(1), op: Mul, bit_size: 33, lhs: RegisterIndex(3), rhs: RegisterIndex(1) }, BinaryIntOp { destination: RegisterIndex(1), op: Sub, bit_size: 33, lhs: RegisterIndex(0), rhs: RegisterIndex(1) }, Mov { destination: RegisterIndex(0), source: RegisterIndex(3) }, Stop, Const { destination: RegisterIndex(0), value: Value { inner: 0 } }, Const { destination: RegisterIndex(1), value: Value { inner: 0 } }, Stop]

BLACKBOX::RANGE [(_6, num_bits: 24)] [ ]
BLACKBOX::RANGE [(_7, num_bits: 9)] [ ]
BLACKBOX::RANGE [(_7, num_bits: 8)] [ ]
EXPR [ (1, _5) (-2⁸, _6) (-1, _7) 0 ]
EXPR [ (1, _2) (-1, _6) (-1, _8) 0 ]
BRILLIG: inputs: [Single(Expression { mul_terms: [], linear_combinations: [(1, Witness(8))], q_c: 0 })]
outputs: [Simple(Witness(9))]
[JumpIfNot { condition: RegisterIndex(0), location: 3 }, Const { destination: RegisterIndex(1), value: Value { inner: 1 } }, BinaryFieldOp { destination: RegisterIndex(0), op: Div, lhs: RegisterIndex(1), rhs: RegisterIndex(0) }, Stop]

EXPR [ (1, _8, _9) (1, _10) -1 ]
EXPR [ (1, _8, _10) 0 ]
EXPR [ (1, _10) -1 ]

[simple_shift_left_right] Total ACIR opcodes generated for language PLONKCSat { width: 3 }: 18
[simple_shift_left_right] Backend circuit size: 2980

@kobyhallx kobyhallx added this pull request to the merge queue Aug 3, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 3, 2023
@TomAFrench TomAFrench added this pull request to the merge queue Aug 3, 2023
Merged via the queue into master with commit 482e73c Aug 3, 2023
@TomAFrench TomAFrench deleted the rebuild-acir-artifacts branch August 3, 2023 14:11
TomAFrench added a commit that referenced this pull request Aug 4, 2023
* master: (50 commits)
  chore: update stale comment on `create_circuit` (#2173)
  chore: Replace `resolve_path` function with a trait that impls normalize (#2157)
  chore: clippy fix (#2174)
  feat!: Allow specifying new package name with `--name` flag (#2144)
  chore!: remove unused flags on LSP command (#2170)
  chore: Hide the `show_ssa` and `show_brillig` flags (#2171)
  chore: bump `clap` to 4.3.19 (#2167)
  chore: Move the long line of `nargo info` to `long_about` (#2151)
  chore: Refactor `normalize_path` into an API on FileManager (#2156)
  fix: Implement slices of structs (#2150)
  chore: Refreshed ACIR artifacts (#2148)
  chore: Rebuild ACIR test artifacts (#2147)
  chore: remove short flags for `--show-ssa` and `--deny-warnings` (#2141)
  chore: replace usage of `Directive::Quotient` with brillig opcode  (#1766)
  chore: clippy fix (#2136)
  feat: Initial work on rewriting closures to regular functions with hi… (#1959)
  chore: Decouple acir blockid from ssa valueid (#2103)
  chore: Initialize copy array from previous values in `array_set` (#2106)
  chore: rename `ssa_refactor` module to `ssa` (#2129)
  chore: Use `--show-output` flag on execution rather than compilation  (#2116)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants