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!: remove plookup pedersen methods from c_bind namespace #3033

Merged
merged 6 commits into from
Oct 25, 2023

Conversation

kevaundray
Copy link
Contributor

@kevaundray kevaundray commented Oct 25, 2023

These methods do the exact same thing as the methods without the plookup namespace.

This is here because previously there was a difference between plookup pedersen and non plookup pedersen.

Related to #3029

Checklist:

Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

  • If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
  • I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
  • Every change is related to the PR description.
  • I have linked this pull request to relevant issues (if any exist).

@kevaundray kevaundray marked this pull request as ready for review October 25, 2023 13:28
@kevaundray kevaundray changed the title chore: remove plookup pedersen methods from c_bind namespace chore!: remove plookup pedersen methods from c_bind namespace Oct 25, 2023
@kevaundray
Copy link
Contributor Author

If this is a breaking change for you, you can get the same behaviour by removing the plookup word in the function you are calling

@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • circuit_simulation_time_in_ms (base-rollup): 2,430 (+16%)
  • circuit_simulation_time_in_ms (merge-rollup): 1.20 (+46%)
  • note_history_trial_decrypting_time_in_ms (10): 211 (+46%)
  • l2_block_building_time_in_ms (8): 17,444 (+19%)
  • l2_block_building_time_in_ms (32): 70,053 (+21%)
  • l2_block_building_time_in_ms (128): 279,981 (+21%)
  • l2_block_rollup_simulation_time_in_ms (8): 15,859 (+20%)
  • l2_block_rollup_simulation_time_in_ms (32): 63,775 (+21%)
  • l2_block_rollup_simulation_time_in_ms (128): 254,417 (+21%)
  • l2_block_public_tx_process_time_in_ms (128): 24,968 (+18%)
  • l2_block_processing_time_in_ms (8): 2,769 (+23%)
  • l2_block_processing_time_in_ms (32): 10,320 (+19%)
  • l2_block_processing_time_in_ms (128): 40,312 (+18%)
Detailed results

All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.

This benchmark source data is available in JSON format on S3 here.

Values are compared against data from master at commit 388a47ba and shown if the difference exceeds 1%.

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 8 txs 32 txs 128 txs
l1_rollup_calldata_size_in_bytes 45,444 179,588 716,132
l1_rollup_calldata_gas 223,044 868,160 3,448,256
l1_rollup_execution_gas 842,131 3,595,268 22,203,625
l2_block_processing_time_in_ms ⚠️ 2,769 (+23%) ⚠️ 10,320 (+19%) ⚠️ 40,312 (+18%)
note_successful_decrypting_time_in_ms 333 (-2%) 1,024 (-2%) 3,830 (-1%)
note_trial_decrypting_time_in_ms 36.0 (-18%) 109 (-7%) 145 (+7%)
l2_block_building_time_in_ms ⚠️ 17,444 (+19%) ⚠️ 70,053 (+21%) ⚠️ 279,981 (+21%)
l2_block_rollup_simulation_time_in_ms ⚠️ 15,859 (+20%) ⚠️ 63,775 (+21%) ⚠️ 254,417 (+21%)
l2_block_public_tx_process_time_in_ms 1,531 (+14%) 6,119 (+15%) ⚠️ 24,968 (+18%)

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric 5 blocks 10 blocks
node_history_sync_time_in_ms 28,797 (+15%) 56,063 (+15%)
note_history_successful_decrypting_time_in_ms 2,370 (-7%) 4,669 (-6%)
note_history_trial_decrypting_time_in_ms 128 (+6%) ⚠️ 211 (+46%)
node_database_size_in_bytes 1,629,129 1,096,782
pxe_database_size_in_bytes 27,188 54,187

Circuits stats

Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit circuit_simulation_time_in_ms circuit_input_size_in_bytes circuit_output_size_in_bytes
private-kernel-init 96.6 (+17%) 61,697 18,841
private-kernel-ordering 59.3 (+17%) 24,233 8,089
base-rollup ⚠️ 2,430 (+16%) 656,309 811
root-rollup 103 (+15%) 4,072 1,097
private-kernel-inner 70.1 (+20%) 81,504 18,841
public-kernel-private-input 55.1 (+19%) 41,455 18,841
public-kernel-non-first-iteration 34.6 (+21%) 41,497 18,841
merge-rollup ⚠️ 1.20 (+46%) 2,592 873

Miscellaneous

Transaction sizes based on how many contracts are deployed in the tx.

Metric 0 deployed contracts 1 deployed contracts
tx_size_in_bytes 8,723 27,240 (-7%)

@kevaundray kevaundray mentioned this pull request Oct 25, 2023
@kevaundray kevaundray merged commit a8ea391 into master Oct 25, 2023
79 checks passed
@kevaundray kevaundray deleted the kw/pedersen-cleanup-rm-plookup-namespace branch October 25, 2023 18:12
Maddiaa0 pushed a commit that referenced this pull request Oct 25, 2023
These methods do the exact same thing as the methods without the plookup
namespace.

This is here because previously there was a difference between plookup
pedersen and non plookup pedersen.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
sirasistant pushed a commit that referenced this pull request Oct 26, 2023
🤖 I have created a release *beep* *boop*
---


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

##
[0.12.0](aztec-packages-v0.11.1...aztec-packages-v0.12.0)
(2023-10-26)


### ⚠ BREAKING CHANGES

* remove plookup pedersen methods from c_bind namespace
([#3033](#3033))

### Features

* Add function selector to cli to make it easier for to call functions
([#3053](#3053))
([e0f0a8e](e0f0a8e)),
closes
[#1996](#1996)
* Added correctness tests for several small relations in Goblin
Translator (Goblin Translator part 8)
([#2963](#2963))
([4c83250](4c83250))
* AWS mainnet fork
([#2986](#2986))
([f491362](f491362))
* Correctness tests for decomposition and non-native field relations
(Goblin Translator Part 9)
([#2981](#2981))
([cdc830d](cdc830d))
* Enable sol verifier tests in ci
([#2997](#2997))
([058de1e](058de1e))
* Goblin Translator flavor and permutation correctness (Goblin
Translator part 7)
([#2961](#2961))
([737f17f](737f17f))
* Linking errors
([#3004](#3004))
([388a47b](388a47b)),
closes
[#2969](#2969)


### Bug Fixes

* Fix clang-16 check
([#3030](#3030))
([7a5a8b3](7a5a8b3))
* Fix docusaurus yellow paper build
([#3063](#3063))
([db54c1f](db54c1f))
* Run deploy step for mainnet fork
([#3052](#3052))
([9b6be22](9b6be22))
* Try fix publish bb
([#3036](#3036))
([51248b5](51248b5))
* Unboxing - nargo.toml injection of "-" for "_"
([#3018](#3018))
([83d6c51](83d6c51))


### Miscellaneous

* **acir_tests:** Add script to regenerate double_verify_proof inputs
([#3005](#3005))
([9c4eab2](9c4eab2))
* Add portal contract option to deploy subcommand of aztec-cli
([#3032](#3032))
([546b410](546b410))
* Fix `pedersen_compress_with_hash_index` c_bind function
([#3054](#3054))
([a136f6e](a136f6e))
* Msg sender is 0 when no entrypoint is called
([#3024](#3024))
([53c6680](53c6680)),
closes
[#2949](#2949)
* Optimize pedersen hash for the common usecase by not allocating when
input fits in scratch space
([#3056](#3056))
([a0d290d](a0d290d))
* Proxy redundant `hash` methods
([#3046](#3046))
([df389b5](df389b5))
* Remove "non-core artifact" nargo generated files
([#3026](#3026))
([03ebb8e](03ebb8e)),
closes
[#2977](#2977)
* Remove `pedersen_buffer_to_field` from c_bind
([#3045](#3045))
([de7e63b](de7e63b))
* Remove pedersen hash oracle
([#3023](#3023))
([0e6958c](0e6958c))
* Remove plookup pedersen methods from c_bind namespace
([#3033](#3033))
([a8ea391](a8ea391))
* Rename pedersen typescript methods to be called `hash` instead of
compress
([#3047](#3047))
([2f7cc5f](2f7cc5f))
* Run check rebuild on boxes
([#3000](#3000))
([c503d91](c503d91))
* Same prettier in boxes and everywhere else
([#3025](#3025))
([0769d20](0769d20)),
closes
[#2978](#2978)
</details>

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

##
[0.12.0](barretenberg.js-v0.11.1...barretenberg.js-v0.12.0)
(2023-10-26)


### ⚠ BREAKING CHANGES

* remove plookup pedersen methods from c_bind namespace
([#3033](#3033))

### Miscellaneous

* Proxy redundant `hash` methods
([#3046](#3046))
([df389b5](df389b5))
* Remove `pedersen_buffer_to_field` from c_bind
([#3045](#3045))
([de7e63b](de7e63b))
* Remove plookup pedersen methods from c_bind namespace
([#3033](#3033))
([a8ea391](a8ea391))
* Rename pedersen typescript methods to be called `hash` instead of
compress
([#3047](#3047))
([2f7cc5f](2f7cc5f))
</details>

<details><summary>barretenberg: 0.12.0</summary>

##
[0.12.0](barretenberg-v0.11.1...barretenberg-v0.12.0)
(2023-10-26)


### ⚠ BREAKING CHANGES

* remove plookup pedersen methods from c_bind namespace
([#3033](#3033))

### Features

* Added correctness tests for several small relations in Goblin
Translator (Goblin Translator part 8)
([#2963](#2963))
([4c83250](4c83250))
* Correctness tests for decomposition and non-native field relations
(Goblin Translator Part 9)
([#2981](#2981))
([cdc830d](cdc830d))
* Enable sol verifier tests in ci
([#2997](#2997))
([058de1e](058de1e))
* Goblin Translator flavor and permutation correctness (Goblin
Translator part 7)
([#2961](#2961))
([737f17f](737f17f))


### Bug Fixes

* Fix clang-16 check
([#3030](#3030))
([7a5a8b3](7a5a8b3))


### Miscellaneous

* **acir_tests:** Add script to regenerate double_verify_proof inputs
([#3005](#3005))
([9c4eab2](9c4eab2))
* Fix `pedersen_compress_with_hash_index` c_bind function
([#3054](#3054))
([a136f6e](a136f6e))
* Proxy redundant `hash` methods
([#3046](#3046))
([df389b5](df389b5))
* Remove `pedersen_buffer_to_field` from c_bind
([#3045](#3045))
([de7e63b](de7e63b))
* Remove pedersen hash oracle
([#3023](#3023))
([0e6958c](0e6958c))
* Remove plookup pedersen methods from c_bind namespace
([#3033](#3033))
([a8ea391](a8ea391))
</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 Oct 27, 2023
🤖 I have created a release *beep* *boop*
---


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

##
[0.12.0](AztecProtocol/aztec-packages@aztec-packages-v0.11.1...aztec-packages-v0.12.0)
(2023-10-26)


### ⚠ BREAKING CHANGES

* remove plookup pedersen methods from c_bind namespace
([#3033](AztecProtocol/aztec-packages#3033))

### Features

* Add function selector to cli to make it easier for to call functions
([#3053](AztecProtocol/aztec-packages#3053))
([e0f0a8e](AztecProtocol/aztec-packages@e0f0a8e)),
closes
[#1996](AztecProtocol/aztec-packages#1996)
* Added correctness tests for several small relations in Goblin
Translator (Goblin Translator part 8)
([#2963](AztecProtocol/aztec-packages#2963))
([4c83250](AztecProtocol/aztec-packages@4c83250))
* AWS mainnet fork
([#2986](AztecProtocol/aztec-packages#2986))
([f491362](AztecProtocol/aztec-packages@f491362))
* Correctness tests for decomposition and non-native field relations
(Goblin Translator Part 9)
([#2981](AztecProtocol/aztec-packages#2981))
([cdc830d](AztecProtocol/aztec-packages@cdc830d))
* Enable sol verifier tests in ci
([#2997](AztecProtocol/aztec-packages#2997))
([058de1e](AztecProtocol/aztec-packages@058de1e))
* Goblin Translator flavor and permutation correctness (Goblin
Translator part 7)
([#2961](AztecProtocol/aztec-packages#2961))
([737f17f](AztecProtocol/aztec-packages@737f17f))
* Linking errors
([#3004](AztecProtocol/aztec-packages#3004))
([388a47b](AztecProtocol/aztec-packages@388a47b)),
closes
[#2969](AztecProtocol/aztec-packages#2969)


### Bug Fixes

* Fix clang-16 check
([#3030](AztecProtocol/aztec-packages#3030))
([7a5a8b3](AztecProtocol/aztec-packages@7a5a8b3))
* Fix docusaurus yellow paper build
([#3063](AztecProtocol/aztec-packages#3063))
([db54c1f](AztecProtocol/aztec-packages@db54c1f))
* Run deploy step for mainnet fork
([#3052](AztecProtocol/aztec-packages#3052))
([9b6be22](AztecProtocol/aztec-packages@9b6be22))
* Try fix publish bb
([#3036](AztecProtocol/aztec-packages#3036))
([51248b5](AztecProtocol/aztec-packages@51248b5))
* Unboxing - nargo.toml injection of "-" for "_"
([#3018](AztecProtocol/aztec-packages#3018))
([83d6c51](AztecProtocol/aztec-packages@83d6c51))


### Miscellaneous

* **acir_tests:** Add script to regenerate double_verify_proof inputs
([#3005](AztecProtocol/aztec-packages#3005))
([9c4eab2](AztecProtocol/aztec-packages@9c4eab2))
* Add portal contract option to deploy subcommand of aztec-cli
([#3032](AztecProtocol/aztec-packages#3032))
([546b410](AztecProtocol/aztec-packages@546b410))
* Fix `pedersen_compress_with_hash_index` c_bind function
([#3054](AztecProtocol/aztec-packages#3054))
([a136f6e](AztecProtocol/aztec-packages@a136f6e))
* Msg sender is 0 when no entrypoint is called
([#3024](AztecProtocol/aztec-packages#3024))
([53c6680](AztecProtocol/aztec-packages@53c6680)),
closes
[#2949](AztecProtocol/aztec-packages#2949)
* Optimize pedersen hash for the common usecase by not allocating when
input fits in scratch space
([#3056](AztecProtocol/aztec-packages#3056))
([a0d290d](AztecProtocol/aztec-packages@a0d290d))
* Proxy redundant `hash` methods
([#3046](AztecProtocol/aztec-packages#3046))
([df389b5](AztecProtocol/aztec-packages@df389b5))
* Remove "non-core artifact" nargo generated files
([#3026](AztecProtocol/aztec-packages#3026))
([03ebb8e](AztecProtocol/aztec-packages@03ebb8e)),
closes
[#2977](AztecProtocol/aztec-packages#2977)
* Remove `pedersen_buffer_to_field` from c_bind
([#3045](AztecProtocol/aztec-packages#3045))
([de7e63b](AztecProtocol/aztec-packages@de7e63b))
* Remove pedersen hash oracle
([#3023](AztecProtocol/aztec-packages#3023))
([0e6958c](AztecProtocol/aztec-packages@0e6958c))
* Remove plookup pedersen methods from c_bind namespace
([#3033](AztecProtocol/aztec-packages#3033))
([a8ea391](AztecProtocol/aztec-packages@a8ea391))
* Rename pedersen typescript methods to be called `hash` instead of
compress
([#3047](AztecProtocol/aztec-packages#3047))
([2f7cc5f](AztecProtocol/aztec-packages@2f7cc5f))
* Run check rebuild on boxes
([#3000](AztecProtocol/aztec-packages#3000))
([c503d91](AztecProtocol/aztec-packages@c503d91))
* Same prettier in boxes and everywhere else
([#3025](AztecProtocol/aztec-packages#3025))
([0769d20](AztecProtocol/aztec-packages@0769d20)),
closes
[#2978](AztecProtocol/aztec-packages#2978)
</details>

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

##
[0.12.0](AztecProtocol/aztec-packages@barretenberg.js-v0.11.1...barretenberg.js-v0.12.0)
(2023-10-26)


### ⚠ BREAKING CHANGES

* remove plookup pedersen methods from c_bind namespace
([#3033](AztecProtocol/aztec-packages#3033))

### Miscellaneous

* Proxy redundant `hash` methods
([#3046](AztecProtocol/aztec-packages#3046))
([df389b5](AztecProtocol/aztec-packages@df389b5))
* Remove `pedersen_buffer_to_field` from c_bind
([#3045](AztecProtocol/aztec-packages#3045))
([de7e63b](AztecProtocol/aztec-packages@de7e63b))
* Remove plookup pedersen methods from c_bind namespace
([#3033](AztecProtocol/aztec-packages#3033))
([a8ea391](AztecProtocol/aztec-packages@a8ea391))
* Rename pedersen typescript methods to be called `hash` instead of
compress
([#3047](AztecProtocol/aztec-packages#3047))
([2f7cc5f](AztecProtocol/aztec-packages@2f7cc5f))
</details>

<details><summary>barretenberg: 0.12.0</summary>

##
[0.12.0](AztecProtocol/aztec-packages@barretenberg-v0.11.1...barretenberg-v0.12.0)
(2023-10-26)


### ⚠ BREAKING CHANGES

* remove plookup pedersen methods from c_bind namespace
([#3033](AztecProtocol/aztec-packages#3033))

### Features

* Added correctness tests for several small relations in Goblin
Translator (Goblin Translator part 8)
([#2963](AztecProtocol/aztec-packages#2963))
([4c83250](AztecProtocol/aztec-packages@4c83250))
* Correctness tests for decomposition and non-native field relations
(Goblin Translator Part 9)
([#2981](AztecProtocol/aztec-packages#2981))
([cdc830d](AztecProtocol/aztec-packages@cdc830d))
* Enable sol verifier tests in ci
([#2997](AztecProtocol/aztec-packages#2997))
([058de1e](AztecProtocol/aztec-packages@058de1e))
* Goblin Translator flavor and permutation correctness (Goblin
Translator part 7)
([#2961](AztecProtocol/aztec-packages#2961))
([737f17f](AztecProtocol/aztec-packages@737f17f))


### Bug Fixes

* Fix clang-16 check
([#3030](AztecProtocol/aztec-packages#3030))
([7a5a8b3](AztecProtocol/aztec-packages@7a5a8b3))


### Miscellaneous

* **acir_tests:** Add script to regenerate double_verify_proof inputs
([#3005](AztecProtocol/aztec-packages#3005))
([9c4eab2](AztecProtocol/aztec-packages@9c4eab2))
* Fix `pedersen_compress_with_hash_index` c_bind function
([#3054](AztecProtocol/aztec-packages#3054))
([a136f6e](AztecProtocol/aztec-packages@a136f6e))
* Proxy redundant `hash` methods
([#3046](AztecProtocol/aztec-packages#3046))
([df389b5](AztecProtocol/aztec-packages@df389b5))
* Remove `pedersen_buffer_to_field` from c_bind
([#3045](AztecProtocol/aztec-packages#3045))
([de7e63b](AztecProtocol/aztec-packages@de7e63b))
* Remove pedersen hash oracle
([#3023](AztecProtocol/aztec-packages#3023))
([0e6958c](AztecProtocol/aztec-packages@0e6958c))
* Remove plookup pedersen methods from c_bind namespace
([#3033](AztecProtocol/aztec-packages#3033))
([a8ea391](AztecProtocol/aztec-packages@a8ea391))
</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
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants