Page MenuHomePhabricator

Merge #13194: Remove template matching and pseudo opcodes
ClosedPublic

Authored by markblundeberg on Aug 6 2019, 19:02.

Details

Summary

PR13194 backport https://github.com/bitcoin/bitcoin/pull/13194/files
c814e2e7e81fd01fcb07f4a28435741bdc463801 Remove template matching and pseudo opcodes (Pieter Wuille)

Pull request description:

The current code contains a rather complex script template matching engine, which is only used for 3 particular script types (P2PK, P2PKH, multisig). The first two of these are trivial to match for otherwise, and a specialized matcher for multisig is both more compact and more efficient than a generic one.

The goal is being more flexible, so that for example larger standard multisigs inside SegWit outputs are easier to implement.

As a side-effect, it also gets rid of the pseudo opcodes hack.

Depends on D3808

Test Plan

make check

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.Aug 6 2019, 19:02
Herald added a reviewer: Restricted Project. · View Herald TranscriptAug 6 2019, 19:02
markblundeberg edited the summary of this revision. (Show Details)Aug 6 2019, 19:03
markblundeberg added inline comments.
src/script/script.h
196 ↗(On Diff #10639)

as Wladimir says in original PR, it's so nice to get rid of these =D

jasonbcox requested changes to this revision.Aug 6 2019, 19:24
jasonbcox added inline comments.
src/script/standard.cpp
76 ↗(On Diff #10639)

Brackets throughout this function

137 ↗(On Diff #10639)

both comments need to be on the line above rather than inline

This revision now requires changes to proceed.Aug 6 2019, 19:24
markblundeberg marked 2 inline comments as done.

move comments up a line

rebase for landed parent

nakihito accepted this revision.Aug 6 2019, 22:30
nakihito requested changes to this revision.Aug 6 2019, 23:05

Guess it was updated while I was reviewing. Going to take another look while the teamcity error is fixed.

This revision now requires changes to proceed.Aug 6 2019, 23:05
nakihito accepted this revision.Aug 7 2019, 00:11
This revision now requires review to proceed.Aug 7 2019, 00:11
jasonbcox added a child revision: Restricted Differential Revision.Aug 7 2019, 17:43
jasonbcox accepted this revision.Aug 8 2019, 19:40
This revision is now accepted and ready to land.Aug 8 2019, 19:40

rebase for conflict (standard.cpp in D3807)

markblundeberg added a child revision: Restricted Differential Revision.Aug 14 2019, 23:10