feat: use msgpack for ClientIvc::Proof in API#12911
Merged
ledwards2225 merged 21 commits intomasterfrom Mar 21, 2025
Merged
Conversation
Contributor
Author
|
Quick rejection (see timestamp) |
codygunton
approved these changes
Mar 21, 2025
ludamad
reviewed
Mar 22, 2025
| msgpack::sbuffer buffer; | ||
| msgpack::pack(buffer, *this); | ||
| return buffer; | ||
| } |
Collaborator
There was a problem hiding this comment.
Suspect that this didn't add any new headers (but also in general this should be in a cpp file as msgpack stuff that isn't our thin header include should avoid header pollution)
Contributor
Author
There was a problem hiding this comment.
yeah I definitely don't want this in here. When you're back we should discuss how to standardize things, assuming we move to more msgpack use in general. I saw you had some established patterns using msgpack::packer - maybe this can just fit into that but wasn't sure it was the right thing
PhilWindle
pushed a commit
that referenced
this pull request
Mar 24, 2025
🤖 I have created a new Aztec Packages release --- ## [0.82.1](v0.82.0...v0.82.1) (2025-03-24) ### Features * **avm:** Port field gt to vm2 ([#12883](#12883)) ([0ae6891](0ae6891)) * use msgpack for ClientIvc::Proof in API ([#12911](#12911)) ([1a01602](1a01602)) ### Bug Fixes * disable proving on vite box ([#12971](#12971)) ([69a0fb6](69a0fb6)) * no hardcoded versions in bbup ([#12944](#12944)) ([397144f](397144f)) * pull CRS data ahead of time ([#12945](#12945)) ([43155d6](43155d6)) * Remove workaround ([#12952](#12952)) ([c3337af](c3337af)) * set the correct env var ([#12959](#12959)) ([bd0f4b2](bd0f4b2)) * yolo add bunch of test flakes ([13c19da](13c19da)) * yolo e2e_p2p tests now fully skipped due to huge speed regression ([9141410](9141410)) * yolo txe binds just to localhost by default. ([3933b35](3933b35)) ### Miscellaneous * Change `/bin/bash` shebang to be env based ([#12834](#12834)) ([7843a67](7843a67)) * clean up avm codeowners ([#12860](#12860)) ([35a8f46](35a8f46)) * deflake the kind smoke test ([#12955](#12955)) ([1a37d6d](1a37d6d)), closes [#11177](#11177) * fee cleanup ([#12941](#12941)) ([fdf1da4](fdf1da4)) * Increase bot count ([#12963](#12963)) ([16edd06](16edd06)) * L2 chain config for alpha testnet ([#12962](#12962)) ([e13edb8](e13edb8)) * Reduce bots ([#12953](#12953)) ([4bbc5da](4bbc5da)) * remove selector from public call request ([#12828](#12828)) ([18bcc1b](18bcc1b)) * replace relative paths to noir-protocol-circuits ([61cf4b6](61cf4b6)) * replace relative paths to noir-protocol-circuits ([4356c17](4356c17)) * replace relative paths to noir-protocol-circuits ([f73f47d](f73f47d)) * Set default proving config to true ([#12964](#12964)) ([75c1549](75c1549)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
DanielKotov
pushed a commit
that referenced
this pull request
Mar 27, 2025
Switches to using msgpack for serialization/deserialization of a ClientIVC::Proof, instead of our custom serialization lib. This was motivated by the desire to gracefully handle (reject) invalid proof buffers (in the form of fully random bytes) in native verification. Our custom serialization library is not meant to handle a fully random buffer because it relies on 4-byte chunks containing size data that indicate how much to read from an address. When the size bytes are corrupted, the code may attempt to read into uninitialized memory. Msgpack on the other hand will throw a meaningful and consistent error when the proof structure is not as expected. This results in verification failure by default. Note: if the proof has valid structure but is not itself valid, verification will proceed as normal and return failure in a time less than or equal to that required for successful verification. --------- Co-authored-by: PhilWindle <[email protected]> Co-authored-by: cody <[email protected]>
DanielKotov
pushed a commit
that referenced
this pull request
Mar 27, 2025
🤖 I have created a new Aztec Packages release --- ## [0.82.1](v0.82.0...v0.82.1) (2025-03-24) ### Features * **avm:** Port field gt to vm2 ([#12883](#12883)) ([0ae6891](0ae6891)) * use msgpack for ClientIvc::Proof in API ([#12911](#12911)) ([1a01602](1a01602)) ### Bug Fixes * disable proving on vite box ([#12971](#12971)) ([69a0fb6](69a0fb6)) * no hardcoded versions in bbup ([#12944](#12944)) ([397144f](397144f)) * pull CRS data ahead of time ([#12945](#12945)) ([43155d6](43155d6)) * Remove workaround ([#12952](#12952)) ([c3337af](c3337af)) * set the correct env var ([#12959](#12959)) ([bd0f4b2](bd0f4b2)) * yolo add bunch of test flakes ([13c19da](13c19da)) * yolo e2e_p2p tests now fully skipped due to huge speed regression ([9141410](9141410)) * yolo txe binds just to localhost by default. ([3933b35](3933b35)) ### Miscellaneous * Change `/bin/bash` shebang to be env based ([#12834](#12834)) ([7843a67](7843a67)) * clean up avm codeowners ([#12860](#12860)) ([35a8f46](35a8f46)) * deflake the kind smoke test ([#12955](#12955)) ([1a37d6d](1a37d6d)), closes [#11177](#11177) * fee cleanup ([#12941](#12941)) ([fdf1da4](fdf1da4)) * Increase bot count ([#12963](#12963)) ([16edd06](16edd06)) * L2 chain config for alpha testnet ([#12962](#12962)) ([e13edb8](e13edb8)) * Reduce bots ([#12953](#12953)) ([4bbc5da](4bbc5da)) * remove selector from public call request ([#12828](#12828)) ([18bcc1b](18bcc1b)) * replace relative paths to noir-protocol-circuits ([61cf4b6](61cf4b6)) * replace relative paths to noir-protocol-circuits ([4356c17](4356c17)) * replace relative paths to noir-protocol-circuits ([f73f47d](f73f47d)) * Set default proving config to true ([#12964](#12964)) ([75c1549](75c1549)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
DanielKotov
pushed a commit
that referenced
this pull request
Mar 27, 2025
Switches to using msgpack for serialization/deserialization of a ClientIVC::Proof, instead of our custom serialization lib. This was motivated by the desire to gracefully handle (reject) invalid proof buffers (in the form of fully random bytes) in native verification. Our custom serialization library is not meant to handle a fully random buffer because it relies on 4-byte chunks containing size data that indicate how much to read from an address. When the size bytes are corrupted, the code may attempt to read into uninitialized memory. Msgpack on the other hand will throw a meaningful and consistent error when the proof structure is not as expected. This results in verification failure by default. Note: if the proof has valid structure but is not itself valid, verification will proceed as normal and return failure in a time less than or equal to that required for successful verification. --------- Co-authored-by: PhilWindle <[email protected]> Co-authored-by: cody <[email protected]>
DanielKotov
pushed a commit
that referenced
this pull request
Mar 27, 2025
🤖 I have created a new Aztec Packages release --- ## [0.82.1](v0.82.0...v0.82.1) (2025-03-24) ### Features * **avm:** Port field gt to vm2 ([#12883](#12883)) ([0ae6891](0ae6891)) * use msgpack for ClientIvc::Proof in API ([#12911](#12911)) ([1a01602](1a01602)) ### Bug Fixes * disable proving on vite box ([#12971](#12971)) ([69a0fb6](69a0fb6)) * no hardcoded versions in bbup ([#12944](#12944)) ([397144f](397144f)) * pull CRS data ahead of time ([#12945](#12945)) ([43155d6](43155d6)) * Remove workaround ([#12952](#12952)) ([c3337af](c3337af)) * set the correct env var ([#12959](#12959)) ([bd0f4b2](bd0f4b2)) * yolo add bunch of test flakes ([13c19da](13c19da)) * yolo e2e_p2p tests now fully skipped due to huge speed regression ([9141410](9141410)) * yolo txe binds just to localhost by default. ([3933b35](3933b35)) ### Miscellaneous * Change `/bin/bash` shebang to be env based ([#12834](#12834)) ([7843a67](7843a67)) * clean up avm codeowners ([#12860](#12860)) ([35a8f46](35a8f46)) * deflake the kind smoke test ([#12955](#12955)) ([1a37d6d](1a37d6d)), closes [#11177](#11177) * fee cleanup ([#12941](#12941)) ([fdf1da4](fdf1da4)) * Increase bot count ([#12963](#12963)) ([16edd06](16edd06)) * L2 chain config for alpha testnet ([#12962](#12962)) ([e13edb8](e13edb8)) * Reduce bots ([#12953](#12953)) ([4bbc5da](4bbc5da)) * remove selector from public call request ([#12828](#12828)) ([18bcc1b](18bcc1b)) * replace relative paths to noir-protocol-circuits ([61cf4b6](61cf4b6)) * replace relative paths to noir-protocol-circuits ([4356c17](4356c17)) * replace relative paths to noir-protocol-circuits ([f73f47d](f73f47d)) * Set default proving config to true ([#12964](#12964)) ([75c1549](75c1549)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Switches to using msgpack for serialization/deserialization of a ClientIVC::Proof, instead of our custom serialization lib.
This was motivated by the desire to gracefully handle (reject) invalid proof buffers (in the form of fully random bytes) in native verification. Our custom serialization library is not meant to handle a fully random buffer because it relies on 4-byte chunks containing size data that indicate how much to read from an address. When the size bytes are corrupted, the code may attempt to read into uninitialized memory. Msgpack on the other hand will throw a meaningful and consistent error when the proof structure is not as expected. This results in verification failure by default.
Note: if the proof has valid structure but is not itself valid, verification will proceed as normal and return failure in a time less than or equal to that required for successful verification.