primitives: peel scriptnum and pack-ints (Q-56) - #639
Merged
Merged
Conversation
Move encode/decode/is_minimal and CompactSize/ULEB into rbitcoin-primitives. Interpreter, store, and mempool map errors; signet CompactSize walks the same decoder. Local copies deleted. Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Hero-Gamer <92864860+Hero-Gamer@users.noreply.github.com>
Miri stays primitives-only (Q-53). R-10 no longer lists Q-56 as the open seam; Q-67 moves to rank 5. Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Hero-Gamer <92864860+Hero-Gamer@users.noreply.github.com>
rearden-grok
Bot
force-pushed
the
primitives/q56-peel
branch
from
September 19, 2026 15:07
a4511d3 to
51b5ec9
Compare
Same-signature wrappers hid the move. Interpreter, store, and mempool import primitives; From maps crate errors. Signet uses read_compact_size_from and primitives hex_decode. Amount/flags and check_minimal_push stay put. Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Hero-Gamer <92864860+Hero-Gamer@users.noreply.github.com>
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.
Summary
rbitcoin-primitives.Frommaps crate errors). Signet walks CompactSize withread_compact_size_fromand decodes the default challenge with primitives hex.check_minimal_pushstay put (schema / R-10).cfg(miri)extra loops (non-minimal, width 5, 5/9-byte CompactSize, ULEB truncated/overflow). Nightlymiri.ymlstays primitives-only (Q-53).Hero-Gamer's copies were the right seam; production now calls those functions.
Test plan
cargo test -p rbitcoin-primitives --libscriptnum_minimal_encoding/ CLTV negative-zeroamount_exp_mantissa_strips_trailing_tens/pack_error_is_corruptpacked_roundtrip_serialize_equals_admitted_rawcompact_size_and_solution_parse_errorscargo clippy --workspace --all-targets -- -D warningsMade with Cursor