Skip to content

feat(u4): add batch nibble packing - #205

Merged
RobinLinus merged 6 commits into
solving-bitcoin:mainfrom
brenorb:feat/u4-batch-pack-next
Sep 18, 2026
Merged

RobinLinus merged 6 commits into
solving-bitcoin:mainfrom
brenorb:feat/u4-batch-pack-next

Conversation

@brenorb

@brenorb brenorb commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a checked even-width u4-to-byte batch packer
  • reuse the existing checked high/low nibble pair boundary
  • preserve pair order with altstack staging and document the composition cost

Evidence

  • 448-byte policy-compiled script for 32 nibbles
  • witness: 65 bytes across 32 items
  • peak stack: 50 items
  • static instruction count: 288 non-push opcodes
  • output: 16 byte-valued ScriptNums
  • hint items: none
  • inspected locally; execution class remains unclassified

Validation

  • cargo fmt --all -- --check
  • python3 tools/kb.py validate
  • git diff --check

The focused Rust test could not complete because dependency archiving exhausted the host filesystem; CI is authoritative. No consensus, policy, or cryptographic-security claim is made.

@RobinLinus
RobinLinus merged commit d27cac8 into solving-bitcoin:main Sep 18, 2026
3 checks passed
@brenorb
brenorb deleted the feat/u4-batch-pack-next branch October 28, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants