Skip to content

Add BCH_2027 VM with OP_SIGHASH (CHIP-2026-06) - #164

Draft
jimtendo wants to merge 1 commit into
bitauth:nextfrom
jimtendo:bch-2027-sighash
Draft

jimtendo wants to merge 1 commit into
bitauth:nextfrom
jimtendo:bch-2027-sighash

Conversation

@jimtendo

Copy link
Copy Markdown
Contributor

(DRAFT: Do not review yet.)

Introduce the draft BCH_2027_05 instruction set, adding OP_SIGHASH at 0xbd. The operation pops a sighash-type byte, validates it against the same types as OP_CHECKSIG, computes the identical sighash preimage, and pushes the single-SHA256 digest (dropping straight into OP_CHECKDATASIG).

  • Retarget BCH_SPEC onto BCH_2027_05
  • Extend VMB test plumbing (2027 sets, 2026_invalid override) and add core.sighash test sources
  • Enable BCH_2027_05 in standard templates and unit tests

Generated VMB vectors and BCHN expected-test results are deferred to ease review and will come in a follow-up commit.

Introduce the draft BCH_2027_05 instruction set, adding OP_SIGHASH at
0xbd. The operation pops a sighash-type byte, validates it against the
same types as OP_CHECKSIG, computes the identical sighash preimage, and
pushes the single-SHA256 digest (dropping straight into OP_CHECKDATASIG).

- Retarget BCH_SPEC onto BCH_2027_05
- Extend VMB test plumbing (2027 sets, 2026_invalid override) and add
  core.sighash test sources
- Enable BCH_2027_05 in standard templates and unit tests

Generated VMB vectors and BCHN expected-test results are deferred and
will come in a follow-up commit.

Signed-off-by: James Zuccon <zuccon@gmail.com>
@changeset-bot

changeset-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: da9acf7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bitauth/libauth Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.12500% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.12%. Comparing base (0534f9b) to head (da9acf7).

Files with missing lines Patch % Lines
...b/vm/instruction-sets/bch/2027/bch-2027-sighash.ts 59.21% 31 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #164      +/-   ##
==========================================
- Coverage   95.82%   94.12%   -1.70%     
==========================================
  Files         161      170       +9     
  Lines       54119    54806     +687     
  Branches     1820     1680     -140     
==========================================
- Hits        51857    51588     -269     
- Misses       2261     3216     +955     
- Partials        1        2       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant