feat: C++ codegen to support the msgpack-compact serialisation format#10878
Merged
aakoshh merged 6 commits intoaf/msgpack-defaultfrom Dec 18, 2025
Merged
feat: C++ codegen to support the msgpack-compact serialisation format#10878aakoshh merged 6 commits intoaf/msgpack-defaultfrom
msgpack-compact serialisation format#10878aakoshh merged 6 commits intoaf/msgpack-defaultfrom
Conversation
msgpack-compact serialisation format
Contributor
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Execution Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 87d863a | Previous: 1eeaba1 | Ratio |
|---|---|---|---|
rollup-block-root-single-tx |
0.003 s |
0.002 s |
1.50 |
rollup-checkpoint-merge |
0.004 s |
0.003 s |
1.33 |
rollup-tx-merge |
0.003 s |
0.002 s |
1.50 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
Contributor
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 87d863a | Previous: 1eeaba1 | Ratio |
|---|---|---|---|
test_report_zkpassport_noir-ecdsa_ |
2 s |
1 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
github-merge-queue bot
pushed a commit
to AztecProtocol/aztec-packages
that referenced
this pull request
Dec 10, 2025
#18937) Brings the changes in the generated C++ for deserialising programs from noir-lang/noir#10878 adding support for the `msgpack-compact` format. Removes the exception if `msgpack` or `msgpack-compact` format is encountered in the format marker. Tested the same way as #12841 but with `export NOIR_SERIALIZATION_FORMAT=msgpack-compact`.
ludamad
added a commit
to AztecProtocol/aztec-packages
that referenced
this pull request
Dec 15, 2025
Updates the noir submodule to noir-lang/noir#10878 which adds C++ codegen support for msgpack-compact serialization format. Also exports NOIR_SERIALIZATION_FORMAT=msgpack-compact in source_bootstrap. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ludamad
added a commit
to AztecProtocol/aztec-packages
that referenced
this pull request
Dec 15, 2025
Updates the noir submodule to noir-lang/noir#10878 which adds C++ codegen support for msgpack-compact serialization format. Also exports NOIR_SERIALIZATION_FORMAT=msgpack-compact in source_bootstrap. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ludamad
added a commit
to AztecProtocol/aztec-packages
that referenced
this pull request
Dec 15, 2025
Updates the noir submodule to noir-lang/noir#10878 which adds C++ codegen support for msgpack-compact serialization format. Also exports NOIR_SERIALIZATION_FORMAT=msgpack-compact in source_bootstrap. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5 tasks
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.
Description
Problem
As the graphs in #7690 demonstrate, the
msgpack-compactformat can provide some reduction in the size of the serialised circuits, at the cost of some backwards compatibility. The Crypto Engineering team was interested in trying to pursue this, but in AztecProtocol/aztec-packages#12841 we didn't generate C++ code to handle it.Summary
Changes the C++ codegen to generate code that handles both the 'map' and the 'tuple' formats that the
rmp_serdelibrary is capable of producing.We don't utilise the serialisation in C++, but that stays being 'map' based only.
Introduced special handling for
structfields with()type: they are skipped during deserialisation in the generated C++ code. This is used in the special purposeProgramWithoutBrilligtype to ignore theunconstrained_functionsfield. By setting it tounconstrained_functions: (), we can add more fields after it, and still correctly get them from themsgpack::type::ARRAYthat the 'tuple' format produces.Additional Context
With this format, the only difference is that
structs are serialised as an ARRAY of fields rather than a MAP of (field-name, value) pairs. The number of fields in the array has to match the number of fields in the structure. The format still uses strings for tagging enum variants.See these tests for the difference in the backwards compatibility of
msgpackvsmsgpack-compact.The format can be activated with the env var:
User Documentation
Check one:
PR Checklist
cargo fmton default settings.