Skip to content

chore: update databus relation to remove need for read tags#22610

Merged
ledwards2225 merged 11 commits into
merge-train/barretenbergfrom
lde/databus-drop-read-tags
Apr 17, 2026
Merged

chore: update databus relation to remove need for read tags#22610
ledwards2225 merged 11 commits into
merge-train/barretenbergfrom
lde/databus-drop-read-tags

Conversation

@ledwards2225

@ledwards2225 ledwards2225 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Rewrites the Databus relation to avoid the need for read_tags (boolean witnesses indicating read_counts > 0)

Previously the databus relation had the following inverse correctness subrelation:

(lookup_term * table_term * inverses - inverse_exists) * scaling_factor

where inverse_exists = is_read + read_tag - is_read * read_tag

This PR splits this into two subrelations, one for reads and one for writes:

(1a): (lookup_term * table_term * inverses - 1) * is_read
(1b): (lookup_term * table_term * inverses - 1) * count

The lookup subrelation itself remains unchanged. This keeps the total number of subrelations at three but removes one witness poly per databus column.

* @tparam AllValues
* @param row
*/
template <size_t bus_idx, typename AllValues> static bool operation_exists_at_row(const AllValues& row)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this was already unused

@ledwards2225 ledwards2225 marked this pull request as ready for review April 16, 2026 17:29
@ledwards2225 ledwards2225 requested a review from LeilaWang as a code owner April 16, 2026 18:05
@ledwards2225 ledwards2225 added ci-full Run all master checks. labels Apr 16, 2026

@federicobarbacovi federicobarbacovi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks for doing this!

@ledwards2225 ledwards2225 merged commit 1b0dc31 into merge-train/barretenberg Apr 17, 2026
16 of 18 checks passed
@ledwards2225 ledwards2225 deleted the lde/databus-drop-read-tags branch April 17, 2026 19:39
github-merge-queue Bot pushed a commit that referenced this pull request Apr 18, 2026
BEGIN_COMMIT_OVERRIDE
chore: update databus relation to remove need for read tags (#22610)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run all master checks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants