feat: opt-in round-parallel MSM for prover agents (BB_LEGACY_MSM) - #24980
Draft
AztecBot wants to merge 2 commits into
Draft
feat: opt-in round-parallel MSM for prover agents (BB_LEGACY_MSM)#24980AztecBot wants to merge 2 commits into
AztecBot wants to merge 2 commits into
Conversation
Prover agents now start their bb processes with the round-parallel Pippenger/MSM implementation instead of the legacy one. The bb.js `legacyMsm` backend option is threaded through BBJsFactory and defaulted to false in BBNativeRollupProver, with BB_LEGACY_MSM=true available to fall back without a code change. Scoped to the proving path only: the node's IVC/chonk verifiers keep bb's own default.
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.
Adds a knob so prover agents on the v5 line can opt into the new Pippenger implementation. Legacy stays the default.
What
scalar_multiplication::use_legacy_msm()defaults to the legacy MSM; the round-parallel_fastpath is opt-in viaBB_MSM_NEW, the bbapiSetMsmLegacycommand, or the bb.jslegacyMsmbackend option. Nothing inyarn-projectset that option, so prover agents had no way to switch short of the raw env var on the bb child.This threads the bb.js option through the prover's bb.js plumbing and exposes it as config:
BBJsFactoryOptions.legacyMsm→BBJsInstance.create→BackendOptions.legacyMsm, so each spawned bb process gets aSetMsmLegacyon startup (configureMsmBackendinbarretenberg/ts/src/barretenberg/index.tsruns for theNativeUnixSocketbackend).BBConfig.bbLegacyMsm/BB_LEGACY_MSMenv var, defaulting totrue(legacy).BBNativeRollupProverpassesconfig.bbLegacyMsm ?? true.BB_LEGACY_MSM=false. It reaches both agent entrypoints —getProverNodeAgentConfigFromEnv(standaloneaztec start --prover-agent) andproverClientConfigMappings(in-process agents).Scope and behavior notes
BBCircuitVerifierandBatchChonkVerifier(node-side IVC/chonk verify) are untouched, as is client-sideBBPrivateKernelProver.BBNativeRollupProvernow always sets an explicit override,BB_MSM_NEW=1in a prover agent's environment is shadowed and has no effect —BB_LEGACY_MSM=falseis the switch for agents. Say the word if you'd rather the TS layer stay silent when the config is unset so bb's own env default still applies.Testing
Not built or run locally — this container has no submodules checked out, no build cache credentials, and Rust 1.85 vs the expected 1.89, so a cold full-stack build was not viable. Relying on CI for typecheck. The MSM implementations themselves already have coverage in
scalar_multiplication.test.cpp,scalar_multiplication_safe_mode.test.cpp, andbbapi.test.cpp.Created by claudebox · group:
slackbot· requested by Adam Domurad · Slack thread