feat(avm): poseidon2 in vm2#11597
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5a378e0 to
d916f01
Compare
d916f01 to
c176d6c
Compare
038aa43 to
9e80f24
Compare
35fce8a to
b103a20
Compare
9e80f24 to
8ea0328
Compare
b103a20 to
7883080
Compare
fcarreiro
left a comment
There was a problem hiding this comment.
Will leave some more useful comments tomorrow!
| // Alpha (exponentiation): 5 | ||
| namespace poseidon2_params; | ||
| // Internal Matrix Diagonal (for partial rounds) | ||
| pol MU_0 = 7626475329478847982857743246276194948757851985510858890691733676098590062311; |
There was a problem hiding this comment.
I think Jean was suggesting we put these (well, for ECC) in the aztec constants so that you can use them both in PIL and C++? no strong preference from my side but worth considering
There was a problem hiding this comment.
hmm i think this is fine as is. They're already available in cpp through bb in nicer hex form anyways, while in PIL they need to be in this decimal format.
7883080 to
73f9803
Compare
0b4fd1c to
09bac87
Compare
73f9803 to
dece8ee
Compare
09bac87 to
7bd3cc6
Compare
7bd3cc6 to
2df2297
Compare
fcarreiro
left a comment
There was a problem hiding this comment.
Looking good in general! Leaving the constraints to Jean.
| } | ||
|
|
||
| } // namespace bb::avm2::simulation No newline at end of file | ||
| } // namespace bb::avm2::simulation |
There was a problem hiding this comment.
|
|
||
| std::vector<Poseidon2PermutationEvent> event_results = perm_event_emitter.dump_events(); | ||
|
|
||
| EXPECT_EQ(result, expected); |
There was a problem hiding this comment.
You should still use a container matcher. If you want to reuse your expected variable, you can use ElementsAreArray(). Same in the other EXPECT_EQ against expected. (and in other tests).
2df2297 to
3b7e83a
Compare
3b7e83a to
ee53456
Compare
🤖 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).
🤖 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).

Please read contributing guidelines and remove this line.