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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markblundeberg created this revision.Feb 10 2020, 02:48
Herald added a reviewer: Restricted Project. · View Herald TranscriptFeb 10 2020, 02:48

better IsMine comment

markblundeberg added inline comments.Feb 10 2020, 02:55
src/test/sigencoding_tests.cpp
369 ↗(On Diff #16201)

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

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