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
Branch
minpushoutputs
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7058
Build 12163: Bitcoin ABC Buildbot (legacy)
Build 12162: arc lint + arc unit

Event Timeline

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

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
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
This revision is now accepted and ready to land.Aug 8 2019, 19:40

rebase for conflict (standard.cpp in D3807)