Repository navigation
fix(mmr): enforce exact int types and strict schema validation in InclusionProof/ConsistencyProof.from_dict (#160) - #165
Open
drk-ram wants to merge 1 commit into
Conversation
…lusionProof/ConsistencyProof.from_dict (agentrust-io#160) Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
drk-ram
force-pushed
the
drk-ram-fix-mmr-proofs-160
branch
from
October 29, 2026 17:14
ab6fa7f to
84a68b5
Compare
This branch has not been deployed
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.
Closes #160
Summary
int(type(value) is int) inpeaks,inclusion_proof,consistency_proof,verify_inclusion, andverify_consistencyso booleans andIntEnumvalues are rejected.InclusionProof.from_dictandConsistencyProof.from_dict(requiring exact field sets,v == 1, matchingkind, exact non-negative integers, andlistof 64-char lowercase hex strings forwitnessandold_peaks) and convert any decodingKeyError/TypeError/ValueErrorintoInvalidArgumentError.subTest-isolated unit tests intests/test_mmr_core.py.Validation
pytest tests/test_mmr_core.py tests/test_mmr_checkpoint_adversarial.py -q— passed (19 passed, 19 subtests passed)