refactor(stm): harden legacy decoders and key registration#3429
Open
damrobi wants to merge 4 commits into
Open
refactor(stm): harden legacy decoders and key registration#3429damrobi wants to merge 4 commits into
damrobi wants to merge 4 commits into
Conversation
Test Results 5 files ± 0 209 suites ±0 34m 1s ⏱️ - 2h 41m 5s Results for commit 7b4d7f8. ± Comparison against base commit 936eadd. This pull request removes 73 and adds 2 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
damrobi
force-pushed
the
damrobi/msnark/refactor-stm-codec-and-keyreg
branch
from
July 21, 2026 16:41
25ced7c to
005d085
Compare
damrobi
temporarily deployed
to
testing-2-preview
July 21, 2026 17:07 — with
GitHub Actions
Inactive
damrobi
force-pushed
the
damrobi/msnark/refactor-stm-codec-and-keyreg
branch
2 times, most recently
from
July 22, 2026 08:42
426aa37 to
79c7c92
Compare
damrobi
marked this pull request as ready for review
July 22, 2026 08:43
damrobi
requested review from
curiecrypt,
hjeljeli32 and
jpraynaud
as code owners
July 22, 2026 08:43
damrobi
force-pushed
the
damrobi/msnark/refactor-stm-codec-and-keyreg
branch
from
July 22, 2026 08:53
79c7c92 to
f65e932
Compare
damrobi
temporarily deployed
to
testing-2-preview
July 22, 2026 09:16 — with
GitHub Actions
Inactive
There was a problem hiding this comment.
Pull request overview
This PR hardens mithril-stm’s legacy byte decoders against malformed inputs and strengthens key registration by enforcing uniqueness on verification keys (rather than on full registration entries that include stake).
Changes:
- Hardened legacy
from_bytes_legacydeserializers to use checked arithmetic and safe slice access. - Updated
KeyRegistrationto track registered verification keys via dedicated maps and reject duplicates even if stake differs. - Bumped
mithril-stmto0.11.3and propagated the version update through workspace dependencies and changelog.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| mithril-stm/src/protocol/key_registration/register.rs | Enforces key-level uniqueness during registration (and adds tests for duplicate-key scenarios). |
| mithril-stm/src/proof_system/concatenation/aggregate_key.rs | Hardens legacy aggregate key decoding by avoiding unchecked slice indexing. |
| mithril-stm/src/membership_commitment/merkle_tree/path.rs | Hardens legacy Merkle path/batch path decoding with checked offsets and safe slicing. |
| mithril-stm/CHANGELOG.md | Adds 0.11.3 entry describing the decoder and key registration hardening. |
| mithril-stm/Cargo.toml | Bumps crate version to 0.11.3. |
| mithril-common/Cargo.toml | Updates dependency on mithril-stm to 0.11.3. |
| Cargo.lock | Updates lockfile for mithril-stm version bump. |
damrobi
force-pushed
the
damrobi/msnark/refactor-stm-codec-and-keyreg
branch
from
July 22, 2026 13:48
f65e932 to
7b4d7f8
Compare
damrobi
temporarily deployed
to
testing-2-preview
July 22, 2026 14:37 — with
GitHub Actions
Inactive
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.
Content
This PR includes some updates of legacy decoders and of the key registration. The updates harden the robustness of the decoders and of the key registration.
Changes
Pre-submit checklist
Comments
Issue(s)