chore: genericize databus#22648
Merged
Merged
Conversation
cfe3a00 to
36997ba
Compare
ledwards2225
commented
Apr 17, 2026
| // Allocate only enough space for the databus data. For ZK, masking values are stored in MaskingTailData. | ||
| polynomials.calldata = Polynomial(calldata_size, dyadic_size()); | ||
| polynomials.calldata_read_counts = Polynomial(calldata_size, dyadic_size()); | ||
| // TODO(https://github.com/AztecProtocol/barretenberg/issues/1555): Minimum size >1 to avoid point at infinity |
Contributor
Author
There was a problem hiding this comment.
Existing TODO, just moved. (I think this should go away with Sergei's ongoing work)
ledwards2225
commented
Apr 17, 2026
| } | ||
| } | ||
| // Bus column k is selected by q_{k+1}; all other wire-linear selectors stay zero on this row. | ||
| // One line per bus column — Stage 1 adds siblings here when NUM_BUS_COLUMNS grows. |
Contributor
Author
There was a problem hiding this comment.
sigh.. comment is AI slop. Will remove in the follow on
federicobarbacovi
approved these changes
Apr 20, 2026
federicobarbacovi
left a comment
Contributor
There was a problem hiding this comment.
Looks great, thanks for doing this! Only a few minor comments
| // Map bus_idx → wire-linear selector on the values struct (mirrors BusData<i>::selector in the relation). | ||
| const std::array<const FF*, NUM_BUS_COLUMNS> bus_selectors{ &values.q_l, &values.q_r, &values.q_o }; | ||
|
|
||
| // Locate the bus column being read (exactly one selector should be hot on a busread row) and look up the |
Contributor
There was a problem hiding this comment.
Suggested change
| // Locate the bus column being read (exactly one selector should be hot on a busread row) and look up the | |
| // Locate the bus column being read (exactly one selector should be active on a busread row) and look up the |
| this->return_data, | ||
| this->return_data_read_counts, | ||
| this->return_data_inverses }; | ||
| this->lookup_read_tags }; |
Contributor
There was a problem hiding this comment.
Thanks for cleaning this up!
| public: | ||
| using FF = FF_; | ||
| static constexpr size_t NUM_BUS_COLUMNS = 3; // calldata, secondary calldata, return data | ||
| // NUM_BUS_COLUMNS (= 3: calldata, secondary calldata, return data) is defined in databus.hpp so all consumers |
dipkakwani
pushed a commit
to dipkakwani/aztec-packages
that referenced
this pull request
Apr 22, 2026
BEGIN_COMMIT_OVERRIDE chore: genericize databus (AztecProtocol#22648) chore(ts): drop dead Plonk VK scaffolding and port AztecProtocol#22655 TS cleanup (AztecProtocol#22657) END_COMMIT_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the databus mechanism generic on number of bus columns to facilitate extension