Repository navigation
chore: port to v6 - #25651
Merged
Merged
chore: port to v6#25651
Conversation
Raw cherry-pick of aca4d3e onto v6 with conflict markers as git produced them. Resolution is in the following fix(port) commit. Conflicted paths: - Makefile - barretenberg/cpp/src/barretenberg/nodejs_module/lmdb_store/lmdb_store_message.hpp - barretenberg/cpp/src/barretenberg/nodejs_module/lmdb_store/lmdb_store_wrapper.hpp - native-packages/kvdb/.rebuild_patterns - native-packages/kvdb/bootstrap.sh - native-packages/kvdb/ts/package.json - native-packages/kvdb/yarn.lock
Resolve the v6 pick against the pre-split layout: the native code lives in barretenberg's nodejs_module and lmdblib. - lmdb_store_message.hpp / lmdb_store_wrapper.hpp: take the new txId fields, StartReadTx/CloseReadTx messages and read-tx registry, using v6's SERIALIZATION_FIELDS, bb::nodejs namespaces and barretenberg/ include paths. - lmdb_store_message.hpp: barretenberg's msgpack-c fork rejects any missing map key, while the upstream msgpack-c used by kvdb on next reads it as unset. v6 clients omit txId, so requests carrying an optional txId get a convert adaptor that reads a missing txId as nil. - lmdb_store_wrapper.cpp: use v6's unqualified format(). - Makefile: keep v6 (no native-packages build targets). - Drop native-packages/kvdb/*: that package does not exist on v6, so its node:test suite (read_tx.test.mjs) and harness wiring have no home.
Frees prover memory as soon as it is no longer needed. Six commits are cherry-picked unchanged from #25635 (author @olehmisar); the last commit is a small cleanup. Proofs and VKs are unchanged. ## Changes - Free each step's ACIR program once its circuit is built. - Move the batched HyperNova polynomial out instead of copying it. - Free the translator circuit builder once its proving key is built, and the final accumulator's polynomials after the decider proof. - Free the circuit builder's construction data (witness, copy cycles, lookup tables, memory records) once the prover instance is built. - `bb prove --scheme chonk`: move each step's bytecode, VK and witness into the bbapi requests instead of copying them. `--write_vk` now writes the hiding-kernel VK held by the IVC, since the bytecode has been moved out. - `bb prove --scheme chonk`: decompress each step just before it is loaded instead of all up front. The two `bb prove` changes affect only the native CLI; bb.js calls bbapi directly. ## Memory Native `bb prove --scheme chonk`, 8 threads, glibc malloc, interleaved base/PR runs. Peak RSS is the median of 3 runs; peak live heap is from an `LD_PRELOAD` allocation tracker, median of 2. | Flow | Peak RSS base | Peak RSS PR | Δ | Peak live heap base | Peak live heap PR | Δ | |---|---|---|---|---|---|---| | `ecdsar1+transfer_0_recursions+sponsored_fpc` | 285 MiB | 241 MiB | −45 (−16%) | 261 MiB | 217 MiB | −44 (−17%) | | `ecdsar1+transfer_1_recursions+private_fpc` | 335 MiB | 251 MiB | −84 (−25%) | 304 MiB | 224 MiB | −79 (−26%) | | `ecdsar1+amm_add_liquidity_1_recursions+sponsored_fpc` | 344 MiB | 249 MiB | −95 (−28%) | 314 MiB | 225 MiB | −90 (−29%) | | `ecdsar1+storage_proof_7_layers+sponsored_fpc` | 867 MiB | 689 MiB | −177 (−20%) | 796 MiB | 642 MiB | −153 (−19%) | Wall time was not resolvable on the shared benchmark host. WASM was not measured. ## Testing - `chonk_tests`, `hypernova_tests`, `bbapi_tests` (including `ChonkPinnedIvcInputsTest.AllPinnedFlows`), `sumcheck_tests`, `translator_vm_tests`, `ultra_honk_tests`, in Release and RelWithAssert builds. - All 11 pinned Chonk flows: base and PR proofs verify with each other's verifier, the hiding-kernel VK is byte-equal, `bb check` passes, and single-threaded proofs with a fixed RNG are byte-identical to base. --------- Co-authored-by: Oleh Misarosh <olehmisar@gmail.com> Co-authored-by: Facundo <facundo@aztec-labs.com> (cherry picked from commit b69af48)
AztecBot
force-pushed
the
cb/port-to-v6
branch
from
October 14, 2026 20:06
47c027b to
9801227
Compare
…umption (#25653) The [memory PR #25638](#25638) changed `prove --write_vk` to reuse the input VK instead of deriving it from the circuit. We remove this redundant option and keep `write_vk` as the single way to generate Chonk VKs. Re the question on #25638: it is moot. Every Chonk verifier uses the hiding-kernel VK from the protocol VK tree. The node takes it from the protocol circuit artifacts, and the rollup checks the VK against the tree at the expected leaf index. Those VKs come from `bb write_vk --scheme chonk`, which derives them from bytecode. A VK written by `prove --write_vk` was never used anywhere, so we remove the option rather than fix it. The pinned-flow test now derives the hiding-kernel VK from bytecode, checks it against the input VK, and verifies the proof with the derived one. We also remove the unused `prove_and_verify` method, its `PrivateExecutionSteps` helper, and an unnecessary constraint-system copy during VK generation. For HyperNova, we keep the move and document that both accumulation methods consume the instance’s polynomials. The batches overlap, so an assertion checks that the first unshifted polynomial—the one consumed—is absent from the second batch. This makes the contract explicit and guards the layout assumption; no peak-memory improvement was measured for this move. Validation: 16 HyperNova tests and all 11 pinned flows passed; CLI and test targets rebuilt. (cherry picked from commit d1db3d1)
Collaborator
Author
Flakey Tests🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
iakovenkos
approved these changes
Oct 15, 2026
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.
Rolling port of
port-to-v6-labelled PRs fromnextontov6. Each source PR lands as its cherry-pick commit; conflicted picks are a raw pick (conflict markers as git produced them) followed by afix(port):commit with the resolution.Ported
barretenberg/cpp/src/barretenberg/nodejs_module/lmdb_store+lmdblib(v6'sSERIALIZATION_FIELDS,bb::nodejsnamespace,barretenberg/includes, unqualifiedformat), the Makefile keeps v6's targets, andnative-packages/kvdb/*is dropped (no kvdb package on v6). It also decides one behavioural point: barretenberg's msgpack-c fork rejects a missing map key where the upstream msgpack-c used by kvdb onnexttreats it as unset, and v6 clients never sendtxId. Requests carrying an optionaltxIdtherefore get aconvertadaptor that reads a missingtxIdas nil. Without it every node fails to start withMissing field txId. The source PR'sread_tx.test.mjssuite passes 8/8 against the v6 addon locally (6/8 fail without the adaptor). The lmdblib gtests pass.Created by claudebox · group:
slackbot· Slack thread