Skip to content

feat(u32): add checked zero predicate - #23

Merged
RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:feat/u32-zero
Sep 18, 2026
Merged

RobinLinus merged 1 commit into
solving-bitcoin:mainfrom
brenorb:feat/u32-zero

Conversation

@brenorb

@brenorb brenorb commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a checked u32 zero predicate that consumes four most-significant-byte-first byte limbs and returns one numeric Boolean without lookup-table memory.

The fragment:

  • rejects values outside 0..=255 for every limb
  • handles zero, nonzero, signed-boundary, and all-ones words
  • records 53 script bytes, 13 witness bytes across four data items, 6 strict stack items, and 37 static non-push opcodes

Validation

  • python3 tools/kb.py validate
  • cargo test --locked arithmetic::u32::zero
  • cargo test --locked --test primitive_metrics u32_zero_metrics_are_current
  • git diff --check

Full-repository tests were intentionally not run.

@RobinLinus
RobinLinus merged commit a1a6f34 into solving-bitcoin:main Sep 18, 2026
@brenorb
brenorb deleted the feat/u32-zero 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