Skip to content

feat: optimize unconstrained embedded_curve_add#7751

Merged
TomAFrench merged 4 commits intomasterfrom
tf/opt-ec-add
Mar 21, 2025
Merged

feat: optimize unconstrained embedded_curve_add#7751
TomAFrench merged 4 commits intomasterfrom
tf/opt-ec-add

Conversation

@TomAFrench
Copy link
Member

Description

Problem*

Resolves

Summary*

This PR removes all the juggling around ECAdd to ensure that the inputs are separate witnesses, etc. when we're running in an unconstrained context.

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 and/or cargo fmt on default settings.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 19, 2025

Changes to Brillig bytecode sizes

Generated at commit: 556ec81130c3a7774f6871e563c49c00a0ab1c29, compared to commit: d8ea3a41dcba97fc2c3be4ad667f9eb782434156

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
inline_decompose_hint_brillig_call_inliner_min -86 ✅ -37.07%
regression_5045_inliner_min -86 ✅ -40.19%

Full diff report 👇
Program Brillig opcodes (+/-) %
embedded_curve_ops_inliner_min 398 (-86) -17.77%
embedded_curve_ops_inliner_zero 241 (-106) -30.55%
inline_decompose_hint_brillig_call_inliner_min 146 (-86) -37.07%
regression_5045_inliner_min 128 (-86) -40.19%

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: 995cbdc Previous: d8ea3a4 Ratio
zkemail_noir-jwt_ 3 s 2 s 1.50

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

@github-actions
Copy link
Contributor

Changes to number of Brillig opcodes executed

Generated at commit: 556ec81130c3a7774f6871e563c49c00a0ab1c29, compared to commit: d8ea3a41dcba97fc2c3be4ad667f9eb782434156

🧾 Summary (10% most significant diffs)

Program Brillig opcodes (+/-) %
inline_decompose_hint_brillig_call_inliner_min -99 ✅ -38.22%
embedded_curve_ops_inliner_zero -174 ✅ -43.83%

Full diff report 👇
Program Brillig opcodes (+/-) %
embedded_curve_ops_inliner_min 425 (-198) -31.78%
inline_decompose_hint_brillig_call_inliner_min 160 (-99) -38.22%
embedded_curve_ops_inliner_zero 223 (-174) -43.83%

@TomAFrench TomAFrench enabled auto-merge March 21, 2025 12:47
@TomAFrench TomAFrench added this pull request to the merge queue Mar 21, 2025
Merged via the queue into master with commit 6723aec Mar 21, 2025
111 checks passed
@TomAFrench TomAFrench deleted the tf/opt-ec-add branch March 21, 2025 13:06
TomAFrench added a commit to AztecProtocol/aztec-packages that referenced this pull request Mar 24, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: remove duplication on library list files
(noir-lang/noir#7774)
chore: bump bb to 0.82.0 (noir-lang/noir#7777)
feat: optimize unconstrained `embedded_curve_add`
(noir-lang/noir#7751)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
PhilWindle pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Mar 24, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.82.2](v0.82.1...v0.82.2)
(2025-03-24)


### Features

* optimize unconstrained `embedded_curve_add`
(noir-lang/noir#7751)
([1e796e2](1e796e2))
* translator zk relation adjustments testing
([#12718](#12718))
([33e528f](33e528f))


### Bug Fixes

* increased poseidon gates
([#12973](#12973))
([49d6bfa](49d6bfa))


### Miscellaneous

* bump bb to 0.82.0 (noir-lang/noir#7777)
([1e796e2](1e796e2))
* Fix for e2e gossip network test
([#12954](#12954))
([5a256c8](5a256c8))
* get logs from init containers
([#12974](#12974))
([28d1f3e](28d1f3e))
* remove duplication on library list files
(noir-lang/noir#7774)
([1e796e2](1e796e2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
DanielKotov pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Mar 27, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: remove duplication on library list files
(noir-lang/noir#7774)
chore: bump bb to 0.82.0 (noir-lang/noir#7777)
feat: optimize unconstrained `embedded_curve_add`
(noir-lang/noir#7751)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
DanielKotov pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Mar 27, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.82.2](v0.82.1...v0.82.2)
(2025-03-24)


### Features

* optimize unconstrained `embedded_curve_add`
(noir-lang/noir#7751)
([1e796e2](1e796e2))
* translator zk relation adjustments testing
([#12718](#12718))
([33e528f](33e528f))


### Bug Fixes

* increased poseidon gates
([#12973](#12973))
([49d6bfa](49d6bfa))


### Miscellaneous

* bump bb to 0.82.0 (noir-lang/noir#7777)
([1e796e2](1e796e2))
* Fix for e2e gossip network test
([#12954](#12954))
([5a256c8](5a256c8))
* get logs from init containers
([#12974](#12974))
([28d1f3e](28d1f3e))
* remove duplication on library list files
(noir-lang/noir#7774)
([1e796e2](1e796e2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
DanielKotov pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Mar 27, 2025
Automated pull of nightly from the
[noir](https://github.com/noir-lang/noir) programming language, a
dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
chore: remove duplication on library list files
(noir-lang/noir#7774)
chore: bump bb to 0.82.0 (noir-lang/noir#7777)
feat: optimize unconstrained `embedded_curve_add`
(noir-lang/noir#7751)
END_COMMIT_OVERRIDE

---------

Co-authored-by: AztecBot <tech@aztecprotocol.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
DanielKotov pushed a commit to AztecProtocol/aztec-packages that referenced this pull request Mar 27, 2025
🤖 I have created a new Aztec Packages release
---


##
[0.82.2](v0.82.1...v0.82.2)
(2025-03-24)


### Features

* optimize unconstrained `embedded_curve_add`
(noir-lang/noir#7751)
([1e796e2](1e796e2))
* translator zk relation adjustments testing
([#12718](#12718))
([33e528f](33e528f))


### Bug Fixes

* increased poseidon gates
([#12973](#12973))
([49d6bfa](49d6bfa))


### Miscellaneous

* bump bb to 0.82.0 (noir-lang/noir#7777)
([1e796e2](1e796e2))
* Fix for e2e gossip network test
([#12954](#12954))
([5a256c8](5a256c8))
* get logs from init containers
([#12974](#12974))
([28d1f3e](28d1f3e))
* remove duplication on library list files
(noir-lang/noir#7774)
([1e796e2](1e796e2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

2 participants