Page MenuHomePhabricator

[ecash-lib] Add support for LEGACY sighash
ClosedPublic

Authored by tobias_ruck on Fri, Nov 29, 19:19.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC05f362591ab6: [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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Please update the README.md in ecash-lib (just the changelog at the bottom to following the format of earlier updates is sufficient)

This revision is now accepted and ready to land.Fri, Nov 29, 21:44