HomePhabricator

[ecash-lib] Add support for LEGACY sighash

Description

[ecash-lib] Add support for LEGACY sighash

Summary:
This is the OG pre-UAHF sighash from Bitcoin, which is invalid on eCash, but still can be used on Bitcoin, Dogecoin and others.

We don't have functional tests for this, as eCash regtest disables legacy signatures.

We could use the regtest of another blockchain node, but this introduces weird interdependencies. Instead, we just assert the preimage for the sighash matches expected contents, and that the correct signature algorithm (ECDSA, instead of Schnorr) is used.

In the future we either may wanna add a legacy mode to Bitcoin ABC or download binaries from other blockchains to test this.

Test Plan: npm test

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D17255

Details

Provenance
tobias_ruckAuthored on Fri, Nov 29, 19:17
tobias_ruckPushed on Fri, Nov 29, 21:50
Reviewer
Restricted Project
Differential Revision
D17255: [ecash-lib] Add support for LEGACY sighash
Parents
rABC32d75fea7fa3: Fix missing endef in native_cctools.mk
Branches
Unknown
Tags
Unknown