Skip to content

refactor: replace direct indexing for bus_prefix and beta_powers#2965

Open
Nashtare wants to merge 2 commits intonextfrom
robin/refactor_bus
Open

refactor: replace direct indexing for bus_prefix and beta_powers#2965
Nashtare wants to merge 2 commits intonextfrom
robin/refactor_bus

Conversation

@Nashtare
Copy link
Copy Markdown
Contributor

@Nashtare Nashtare commented Apr 6, 2026

Describe your changes

Match AIR trace access for clarity and safety upon updating / tweaking hardcoded constants.
LMK what you think @adr1anh, feel free to close if you think that's not appropriate

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Commits are signed.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.
  • Updated `CHANGELOG.md'

@Nashtare Nashtare requested a review from adr1anh April 6, 2026 06:43
@Nashtare Nashtare force-pushed the robin/refactor_bus branch from a9ad7e7 to 8630cbe Compare April 6, 2026 07:49
@adr1anh
Copy link
Copy Markdown
Contributor

adr1anh commented Apr 6, 2026

I haven't taken a full look yet, but this is looking very nice!

It should play nicely into #2962. During the exploration of the tradeoff between trace generation and constraint evaluation, it became clear that we needed an extension point for groups of messages (e.g. Hasher and BlockHash). These groups have many mutually exclusive flags with ~7 possible messages, all sharing a very common structure. The naive constraint evaluation algorithm would encode each message individually, and some rough estimates showed this would double the number of EF operations.

The ideas being explored in the PR involve adding a hook for InteractionGroup which allows the caller to specialize the computation of the messages, caching common sub expressions. This requires direct access to the challenges, so this PR definitely helps with getting those correct.

@Nashtare Nashtare self-assigned this Apr 6, 2026
@adr1anh
Copy link
Copy Markdown
Contributor

adr1anh commented Apr 9, 2026

After merging next into adr1anh/constraint-simplification, I'll cherry pick this into #2856

Base automatically changed from adr1anh/constraint-simplification to next April 16, 2026 15:51
@adr1anh
Copy link
Copy Markdown
Contributor

adr1anh commented Apr 17, 2026

I opted not to include this in #2856 since the bus abstraction is getting its own PR. We should revisit this in the context of #2962.

@huitseeker huitseeker added the on hold This issue is blocked or we don't want to start it yet label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on hold This issue is blocked or we don't want to start it yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants