Page MenuHomePhabricator

remove SCRIPT_VERIFY_COMPRESSED_PUBKEYTYPE (aka WITNESS_PUBKEYTYPE)
ClosedPublic

Authored by markblundeberg on Feb 10 2020, 02:48.

Details

Summary

This flag is unused and poorly maintained (we lack all of the tests
that Core has about this, since they used segwit). It also seems to
cause confusion among everyone who sees it for the first time, as nobody
expects we have a flag that we never use.

Enabling this flag at any point in future would render millions of BCH
unspendable, unless we start introducing separate script version
systems (like segwit), in which case reverting this diff will be a very
tiny part of the overall complexity. Even then, it's not clear that we
would borrow the same script interpreter subsystem instead of making a
whole new script.

And in fact there's nothing wrong with uncompressed keys. Even though
taking more space, they're faster to verify, especially in batch
verification where key decompression could perhaps take as much as 20%
of the CPU time when doing large batches.

Test Plan

ninja check-all

Diff Detail

Repository
rABC Bitcoin ABC
Branch
rm_compressedonly
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9378
Build 16687: Default Diff Build & Tests
Build 16686: arc lint + arc unit

Event Timeline

src/test/sigencoding_tests.cpp
369 ↗(On Diff #16201)

hmm this is conspicuously lacking tests of hybrid keys...

This revision is now accepted and ready to land.Feb 10 2020, 14:04