Repository navigation
Conversation
Fixture-only SHA256/append/prepend evaluator and corrupted-operand control. No Bitcoin header authentication or mainnet time claim. Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
Merged
5 of 6 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.
Scope and limits
Author-adoption companion to agentrust-io#143 at 04f60f8. This fork PR isolates two changed files without duplicating the author's upstream packet submission. The original author can cherry-pick the one signed commit, or this can become an upstream follow-up after agentrust-io#143 lands.
The existing packet test checks hashes and OTS metadata but does not execute the path. This adds a fixture-only reader for SHA256, append and prepend, evaluates all captured branches, and compares the Bitcoin leaf with the author-reported root at height 972264. It refuses unsupported operations, truncated/trailing data and resource limits. It is not a general OTS verifier or an authentication of a Bitcoin header, chain, witness independence or mainnet time.
Validation
Python 3.12.14 in the existing locked witness environment: five new tests pass; full unittest discovery reports 420 tests, OK; Ruff and whitespace checks pass. A changed first append operand preserves the digest header and Bitcoin attestation bytes but changes the computed root. Separate fixed-result, append-as-prepend and skip-hash mutants each cause two assertion failures and zero errors. Small independently constructed sibling branches check append/prepend/hash evaluation and branch isolation. Initial depth limit 64 rejected the captured proof; final bounded limit is 128.
References
Format semantics checked against python-opentimestamps core, especially timestamp.py, op.py and notary.py. The root comparison target comes from the packet author, not an independently authenticated header. No new dependency is introduced.
DCO
Signed-off-by: Srinivasa Dinakar Jainti dinakarjs@gmail.com