Skip to content

chore: op wires index from 0#11986

Merged
ledwards2225 merged 2 commits intomasterfrom
lde/op_relation
Feb 13, 2025
Merged

chore: op wires index from 0#11986
ledwards2225 merged 2 commits intomasterfrom
lde/op_relation

Conversation

@ledwards2225
Copy link
Contributor

The ecc op relation in Mega is designed to check that the ecc op data has been duplicated across the wires and ecc_op_wires. Because the wires need to be shifted, they contain a zero row, meaning the ecc op data is stored starting from index 1. Prior to this PR, the op wires also stored the data this way, even though they dont need to be shifted. Its more convenient for the ecc op wires to index from zero. This is achieved by simply utilizing the shifted wires in the relation so that we check ecc_op_wire[i] = wire[i+1].

Note: also fixes an incorrect skip condition in the EccOpRelation that was not caught prior due to an unrelated bug that will be fixed in another PR.

@ledwards2225 ledwards2225 marked this pull request as ready for review February 13, 2025 16:59
@ledwards2225 ledwards2225 self-assigned this Feb 13, 2025
@maramihali maramihali self-requested a review February 13, 2025 19:18
@maramihali maramihali added the crypto cryptography label Feb 13, 2025
{
// The prover can skip execution of this relation altogether since an honest input will lead to a zero
// contribution at every row, even when the selector lagrange_ecc_op is on
return true;

Choose a reason for hiding this comment

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

i have thought at some point that this is bizzare but didn't get the chance to investigate it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I think this was just faulty/rushed thinking that got reinforced by an erroneously passing test

* ecc op wires over the portion of the execution trace representing ECC op queue gates. The next four check
* that the op wire polynomials are identically zero everywhere else.
* @note This relation utilizes the shifted wires so that the ecc op wires can store the data begining at index 0,
* unlike the wires which contain an initial zero row to facilitate the left-shift-by-1 needed by other relations.

Choose a reason for hiding this comment

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

isn't it right-shift-by-1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it depends how your reference but the things we label *_shift are the left shift by 1 of *

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so * is the right shift by 1 of *_shift if you like...

@ledwards2225 ledwards2225 merged commit be1b563 into master Feb 13, 2025
50 checks passed
@ledwards2225 ledwards2225 deleted the lde/op_relation branch February 13, 2025 19:31
rahul-kothari pushed a commit that referenced this pull request Mar 5, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.77.0</summary>

##
[0.77.0](aztec-package-v0.76.4...aztec-package-v0.77.0)
(2025-02-14)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg.js: 0.77.0</summary>

##
[0.77.0](barretenberg.js-v0.76.4...barretenberg.js-v0.77.0)
(2025-02-14)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.77.0</summary>

##
[0.77.0](aztec-packages-v0.76.4...aztec-packages-v0.77.0)
(2025-02-14)


### ⚠ BREAKING CHANGES

* Only decrement the counter of an array if its address has not changed
(noir-lang/noir#7297)

### Features

* PIL relations modifications for bc decomposition
([#11935](#11935))
([6c93058](6c93058))
* Poseidon2 in vm2
([#11597](#11597))
([2c199d8](2c199d8))
* Refactor `append_tx_effects_for_blob`
([#11805](#11805))
([e5a055b](e5a055b))


### Bug Fixes

* **docs:** Update token bridge diagram
([#11982](#11982))
([e5da9ed](e5da9ed))
* Let LSP read `noirfmt.toml` for formatting files
(noir-lang/noir#7355)
([4d35d2f](4d35d2f))
* Only decrement the counter of an array if its address has not changed
(noir-lang/noir#7297)
([4d35d2f](4d35d2f))
* Test more prover agents devnet
([#11990](#11990))
([f12be5f](f12be5f))


### Miscellaneous

* Avoid u128s in brillig memory
(noir-lang/noir#7363)
([4d35d2f](4d35d2f))
* **ci:** Downgrade 4epochs test to transfer test
([#11983](#11983))
([2340aab](2340aab))
* Explanations about skippable
([#11984](#11984))
([19589bc](19589bc))
* Op wires index from 0
([#11986](#11986))
([be1b563](be1b563))
* Prep for ci3
([8edee9e](8edee9e))
* Remove browser test
([3e570be](3e570be))
* Replace relative paths to noir-protocol-circuits
([b8ba716](b8ba716))
* Some polishing on the skippable document
([#11997](#11997))
([50e0a38](50e0a38))
* Update docs about integer overflows
(noir-lang/noir#7370)
([4d35d2f](4d35d2f))
</details>

<details><summary>barretenberg: 0.77.0</summary>

##
[0.77.0](barretenberg-v0.76.4...barretenberg-v0.77.0)
(2025-02-14)


### Features

* PIL relations modifications for bc decomposition
([#11935](#11935))
([6c93058](6c93058))
* Poseidon2 in vm2
([#11597](#11597))
([2c199d8](2c199d8))


### Miscellaneous

* Explanations about skippable
([#11984](#11984))
([19589bc](19589bc))
* Op wires index from 0
([#11986](#11986))
([be1b563](be1b563))
* Some polishing on the skippable document
([#11997](#11997))
([50e0a38](50e0a38))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
AztecBot added a commit to AztecProtocol/barretenberg that referenced this pull request Mar 6, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>aztec-package: 0.77.0</summary>

##
[0.77.0](AztecProtocol/aztec-packages@aztec-package-v0.76.4...aztec-package-v0.77.0)
(2025-02-14)


### Miscellaneous

* **aztec-package:** Synchronize aztec-packages versions
</details>

<details><summary>barretenberg.js: 0.77.0</summary>

##
[0.77.0](AztecProtocol/aztec-packages@barretenberg.js-v0.76.4...barretenberg.js-v0.77.0)
(2025-02-14)


### Miscellaneous

* **barretenberg.js:** Synchronize aztec-packages versions
</details>

<details><summary>aztec-packages: 0.77.0</summary>

##
[0.77.0](AztecProtocol/aztec-packages@aztec-packages-v0.76.4...aztec-packages-v0.77.0)
(2025-02-14)


### ⚠ BREAKING CHANGES

* Only decrement the counter of an array if its address has not changed
(noir-lang/noir#7297)

### Features

* PIL relations modifications for bc decomposition
([#11935](AztecProtocol/aztec-packages#11935))
([6c93058](AztecProtocol/aztec-packages@6c93058))
* Poseidon2 in vm2
([#11597](AztecProtocol/aztec-packages#11597))
([2c199d8](AztecProtocol/aztec-packages@2c199d8))
* Refactor `append_tx_effects_for_blob`
([#11805](AztecProtocol/aztec-packages#11805))
([e5a055b](AztecProtocol/aztec-packages@e5a055b))


### Bug Fixes

* **docs:** Update token bridge diagram
([#11982](AztecProtocol/aztec-packages#11982))
([e5da9ed](AztecProtocol/aztec-packages@e5da9ed))
* Let LSP read `noirfmt.toml` for formatting files
(noir-lang/noir#7355)
([4d35d2f](AztecProtocol/aztec-packages@4d35d2f))
* Only decrement the counter of an array if its address has not changed
(noir-lang/noir#7297)
([4d35d2f](AztecProtocol/aztec-packages@4d35d2f))
* Test more prover agents devnet
([#11990](AztecProtocol/aztec-packages#11990))
([f12be5f](AztecProtocol/aztec-packages@f12be5f))


### Miscellaneous

* Avoid u128s in brillig memory
(noir-lang/noir#7363)
([4d35d2f](AztecProtocol/aztec-packages@4d35d2f))
* **ci:** Downgrade 4epochs test to transfer test
([#11983](AztecProtocol/aztec-packages#11983))
([2340aab](AztecProtocol/aztec-packages@2340aab))
* Explanations about skippable
([#11984](AztecProtocol/aztec-packages#11984))
([19589bc](AztecProtocol/aztec-packages@19589bc))
* Op wires index from 0
([#11986](AztecProtocol/aztec-packages#11986))
([be1b563](AztecProtocol/aztec-packages@be1b563))
* Prep for ci3
([8edee9e](AztecProtocol/aztec-packages@8edee9e))
* Remove browser test
([3e570be](AztecProtocol/aztec-packages@3e570be))
* Replace relative paths to noir-protocol-circuits
([b8ba716](AztecProtocol/aztec-packages@b8ba716))
* Some polishing on the skippable document
([#11997](AztecProtocol/aztec-packages#11997))
([50e0a38](AztecProtocol/aztec-packages@50e0a38))
* Update docs about integer overflows
(noir-lang/noir#7370)
([4d35d2f](AztecProtocol/aztec-packages@4d35d2f))
</details>

<details><summary>barretenberg: 0.77.0</summary>

##
[0.77.0](AztecProtocol/aztec-packages@barretenberg-v0.76.4...barretenberg-v0.77.0)
(2025-02-14)


### Features

* PIL relations modifications for bc decomposition
([#11935](AztecProtocol/aztec-packages#11935))
([6c93058](AztecProtocol/aztec-packages@6c93058))
* Poseidon2 in vm2
([#11597](AztecProtocol/aztec-packages#11597))
([2c199d8](AztecProtocol/aztec-packages@2c199d8))


### Miscellaneous

* Explanations about skippable
([#11984](AztecProtocol/aztec-packages#11984))
([19589bc](AztecProtocol/aztec-packages@19589bc))
* Op wires index from 0
([#11986](AztecProtocol/aztec-packages#11986))
([be1b563](AztecProtocol/aztec-packages@be1b563))
* Some polishing on the skippable document
([#11997](AztecProtocol/aztec-packages#11997))
([50e0a38](AztecProtocol/aztec-packages@50e0a38))
</details>

---
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

crypto cryptography

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants