Skip to content

feat(avm)!: smaller precomputed trace#20144

Merged
jeanmon merged 9 commits intomerge-train/avmfrom
jm/smaller-precomputed-trace
Feb 4, 2026
Merged

feat(avm)!: smaller precomputed trace#20144
jeanmon merged 9 commits intomerge-train/avmfrom
jm/smaller-precomputed-trace

Conversation

@jeanmon
Copy link
Contributor

@jeanmon jeanmon commented Feb 3, 2026

This PR performs the following changes (kudo to @fcarreiro for suggesting this):

  • precomputed.clk is non-zero only on the active portion of the precomputed subtrace
  • Introduce a clk column in execution sub-trace (counter on active rows). For each execution dispatching lookup using precomputed.clk, we replace precomputed.clk by execution.clk.
  • Rename precomputed.clk by precomputed.idx

Performance improvements

  • PCS: goes from 3s to ~1.3s on 32 cores.
  • For bulk this is a small improvement.
  • But for token transfers it is a 25%+ improvement.

@jeanmon jeanmon marked this pull request as ready for review February 3, 2026 17:59
Copy link
Contributor

@fcarreiro fcarreiro left a comment

Choose a reason for hiding this comment

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

I have some doubts about the PIL changes. I think that only lookups into precomputed or PIs should use idx. Shouldn't the rest use the execution clk? In particular think of memory. In simulation the clk manager (or whatever the name was) links it to execution.

@jeanmon
Copy link
Contributor Author

jeanmon commented Feb 3, 2026

I have some doubts about the PIL changes. I think that only lookups into precomputed or PIs should use idx. Shouldn't the rest use the execution clk? In particular think of memory. In simulation the clk manager (or whatever the name was) links it to execution.

@fcarreiro You are absolutely right. I think I overlooked the virtual trace of execution. I will review all of these changes more carefully.

@jeanmon jeanmon force-pushed the jm/smaller-precomputed-trace branch from 18b28ac to 82d36b4 Compare February 3, 2026 22:59
@jeanmon jeanmon requested a review from fcarreiro February 3, 2026 23:11
@jeanmon jeanmon force-pushed the jm/smaller-precomputed-trace branch from 82d36b4 to 8d4560e Compare February 3, 2026 23:16
@jeanmon jeanmon requested review from federicobarbacovi and iakovenkos and removed request for IlyasRidhuan and Maddiaa0 February 3, 2026 23:17
@jeanmon
Copy link
Contributor Author

jeanmon commented Feb 3, 2026

@federicobarbacovi @iakovenkos Could you please have a look at the changes in the files: prover.cpp, verifier.cpp, recursive_verifier.cpp?

Copy link
Contributor

@federicobarbacovi federicobarbacovi left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@jeanmon jeanmon force-pushed the jm/smaller-precomputed-trace branch from 8d4560e to 10c9a13 Compare February 4, 2026 18:35
@jeanmon jeanmon merged commit 9f9dcfd into merge-train/avm Feb 4, 2026
9 checks passed
@jeanmon jeanmon deleted the jm/smaller-precomputed-trace branch February 4, 2026 23:26
@AztecBot AztecBot mentioned this pull request Feb 4, 2026
github-merge-queue bot pushed a commit that referenced this pull request Feb 5, 2026
BEGIN_COMMIT_OVERRIDE
feat(avm)!: smaller precomputed trace (#20144)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants