-
Notifications
You must be signed in to change notification settings - Fork 270
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
feat: databus allows arbitrarily many reads per index #6524
Conversation
Benchmark resultsNo metrics with a significant change found. Detailed resultsAll benchmarks are run on txs on the This benchmark source data is available in JSON format on S3 here. Proof generationEach column represents the number of threads used in proof generation.
L2 block published to L1Each column represents the number of txs on an L2 block published to L1.
L2 chain processingEach column represents the number of blocks on the L2 chain where each block has 16 txs.
Circuits statsStats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.
Stats on running time collected for app circuits
Tree insertion statsThe duration to insert a fixed batch of leaves into each tree type.
MiscellaneousTransaction sizes based on how many contract classes are registered in the tx.
Transaction size based on fee payment method | Metric | | |
The failure seems to be related to one or more of the read_tag polynomials having a commitment equal to that of |
There was a problem hiding this 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 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05
.
Benchmark suite | Current: fcbd510 | Previous: 4ae9944 | Ratio |
---|---|---|---|
nativeconstruct_proof_ultrahonk_power_of_2/20 |
4855.257489999985 ms/iter |
4369.659419999991 ms/iter |
1.11 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @ludamad @codygunton
|
||
return is_read_gate + read_counts - (is_read_gate * read_counts); | ||
return is_read_gate + read_tag - (is_read_gate * read_tag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing a value that was boolean with the boolean old value was at least 1
✅
result_witness_indices.emplace_back(value_witness_idx); | ||
} | ||
|
||
// Check that the read result is as axpected and that the duplicate reads produce the same result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "expected"
} | ||
|
||
// Check that the read result is as axpected and that the duplicate reads produce the same result | ||
auto expected_read_result = calldata_values[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an illustration of the functionality this could be a tad more explicit; will update.
🤖 I have created a release *beep* *boop* --- <details><summary>aztec-package: 0.46.5</summary> ## [0.46.5](aztec-package-v0.46.4...aztec-package-v0.46.5) (2024-07-14) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.46.5</summary> ## [0.46.5](barretenberg.js-v0.46.4...barretenberg.js-v0.46.5) (2024-07-14) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.46.5</summary> ## [0.46.5](aztec-packages-v0.46.4...aztec-packages-v0.46.5) (2024-07-14) ### Features * Added barrett_reduction implementation into uintx ([#6768](#6768)) ([abced57](abced57)) * Databus allows arbitrarily many reads per index ([#6524](#6524)) ([f07200c](f07200c)) * Let LSP always work in a Noir workspace if there's any (noir-lang/noir#5461) ([8403e84](8403e84)) * Multiple trace structuring configurations ([#7408](#7408)) ([e4abe1d](e4abe1d)) * Verify ClientIVC proofs through Bb binary ([#7407](#7407)) ([3760c64](3760c64)) ### Bug Fixes * Lagrange interpolation ([#7440](#7440)) ([76bcd72](76bcd72)) * Move BigInt modulus checks to runtime in brillig (noir-lang/noir#5374) ([8403e84](8403e84)) * Run macro processors in the elaborator (noir-lang/noir#5472) ([8403e84](8403e84)) ### Miscellaneous * Keccak256 in Noir (noir-lang/noir#5316) ([8403e84](8403e84)) * Redo typo PR by omahs (noir-lang/noir#5487) ([8403e84](8403e84)) * Replace relative paths to noir-protocol-circuits ([e89bfd8](e89bfd8)) * Replace relative paths to noir-protocol-circuits ([fae353e](fae353e)) ### Documentation * Minor comments for private refunds/partial notes ([#7447](#7447)) ([9bcbb6c](9bcbb6c)) </details> <details><summary>barretenberg: 0.46.5</summary> ## [0.46.5](barretenberg-v0.46.4...barretenberg-v0.46.5) (2024-07-14) ### Features * Added barrett_reduction implementation into uintx ([#6768](#6768)) ([abced57](abced57)) * Databus allows arbitrarily many reads per index ([#6524](#6524)) ([f07200c](f07200c)) * Multiple trace structuring configurations ([#7408](#7408)) ([e4abe1d](e4abe1d)) * Verify ClientIVC proofs through Bb binary ([#7407](#7407)) ([3760c64](3760c64)) ### Bug Fixes * Lagrange interpolation ([#7440](#7440)) ([76bcd72](76bcd72)) </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.46.5</summary> ## [0.46.5](AztecProtocol/aztec-packages@aztec-package-v0.46.4...aztec-package-v0.46.5) (2024-07-14) ### Miscellaneous * **aztec-package:** Synchronize aztec-packages versions </details> <details><summary>barretenberg.js: 0.46.5</summary> ## [0.46.5](AztecProtocol/aztec-packages@barretenberg.js-v0.46.4...barretenberg.js-v0.46.5) (2024-07-14) ### Miscellaneous * **barretenberg.js:** Synchronize aztec-packages versions </details> <details><summary>aztec-packages: 0.46.5</summary> ## [0.46.5](AztecProtocol/aztec-packages@aztec-packages-v0.46.4...aztec-packages-v0.46.5) (2024-07-14) ### Features * Added barrett_reduction implementation into uintx ([#6768](AztecProtocol/aztec-packages#6768)) ([abced57](AztecProtocol/aztec-packages@abced57)) * Databus allows arbitrarily many reads per index ([#6524](AztecProtocol/aztec-packages#6524)) ([f07200c](AztecProtocol/aztec-packages@f07200c)) * Let LSP always work in a Noir workspace if there's any (noir-lang/noir#5461) ([8403e84](AztecProtocol/aztec-packages@8403e84)) * Multiple trace structuring configurations ([#7408](AztecProtocol/aztec-packages#7408)) ([e4abe1d](AztecProtocol/aztec-packages@e4abe1d)) * Verify ClientIVC proofs through Bb binary ([#7407](AztecProtocol/aztec-packages#7407)) ([3760c64](AztecProtocol/aztec-packages@3760c64)) ### Bug Fixes * Lagrange interpolation ([#7440](AztecProtocol/aztec-packages#7440)) ([76bcd72](AztecProtocol/aztec-packages@76bcd72)) * Move BigInt modulus checks to runtime in brillig (noir-lang/noir#5374) ([8403e84](AztecProtocol/aztec-packages@8403e84)) * Run macro processors in the elaborator (noir-lang/noir#5472) ([8403e84](AztecProtocol/aztec-packages@8403e84)) ### Miscellaneous * Keccak256 in Noir (noir-lang/noir#5316) ([8403e84](AztecProtocol/aztec-packages@8403e84)) * Redo typo PR by omahs (noir-lang/noir#5487) ([8403e84](AztecProtocol/aztec-packages@8403e84)) * Replace relative paths to noir-protocol-circuits ([e89bfd8](AztecProtocol/aztec-packages@e89bfd8)) * Replace relative paths to noir-protocol-circuits ([fae353e](AztecProtocol/aztec-packages@fae353e)) ### Documentation * Minor comments for private refunds/partial notes ([#7447](AztecProtocol/aztec-packages#7447)) ([9bcbb6c](AztecProtocol/aztec-packages@9bcbb6c)) </details> <details><summary>barretenberg: 0.46.5</summary> ## [0.46.5](AztecProtocol/aztec-packages@barretenberg-v0.46.4...barretenberg-v0.46.5) (2024-07-14) ### Features * Added barrett_reduction implementation into uintx ([#6768](AztecProtocol/aztec-packages#6768)) ([abced57](AztecProtocol/aztec-packages@abced57)) * Databus allows arbitrarily many reads per index ([#6524](AztecProtocol/aztec-packages#6524)) ([f07200c](AztecProtocol/aztec-packages@f07200c)) * Multiple trace structuring configurations ([#7408](AztecProtocol/aztec-packages#7408)) ([e4abe1d](AztecProtocol/aztec-packages@e4abe1d)) * Verify ClientIVC proofs through Bb binary ([#7407](AztecProtocol/aztec-packages#7407)) ([3760c64](AztecProtocol/aztec-packages@3760c64)) ### Bug Fixes * Lagrange interpolation ([#7440](AztecProtocol/aztec-packages#7440)) ([76bcd72](AztecProtocol/aztec-packages@76bcd72)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
TLDR: Up until now we were limited to only 1 read per entry of a databus column (see explanation of why below). This PR removes this limitation so that we can read from any row arbitrarily many times at the cost of adding one polynomial/commitment per databus column.
Note: this PR also cleans up some of the handling of ecc op wires and databus polys in various places by making better use of Flavor style getters.
Explanation: The log derivative lookup relation involves a polynomial that contains inverses, i.e. I_i = (read_term_i*write_term_i)^{-1}. These inverses only need to be computed when the relation is "active", i.e. when the row in question either contains a databus read gate or data that is being read. At all other rows, we simply set the value of the inverse polynomial to 0. This allows a subrelation of the form:
read_term * write_term * inverses - inverse_exists
Where
inverse_exists
is a polynomial that takes 1 if the relation is active (or equivalently, if the inverse has been computed) and 0 otherwise. Therefore, if the inverse has been computed, we check that it is indeed equal to the inverse ofread_term * write_term
, otherwise, the subrelation contribution is trivially 0. If we only allow a single read from each row of a bus column, the terminverse_exists
can be computed as an algebraic OR of the form:is_read_gate + read_counts - (is_read_gate * read_counts)
since both
is_read_gate
andread_counts
are both boolean. Ifread_counts
is no longer boolean, no such algebraic expression exists. The solution is to introduce a dedicated boolean polynomialread_tag
whose values are given bymin(1, read_counts)
, i.e. 1 if one or more reads have been performed at that row, and 0 otherwise.Closes AztecProtocol/barretenberg#937