FIXME: we disable standardness checks for the non-PAK node in the PAK tests.
This is because of a bug in Elements which causes non-PAK nodes to reject
pegouts for standardness reasons. Need to fix it after the rebase.
This adds a new `SigVersion::TAPSCRIPT`, makes the necessary interpreter
changes to make it implement BIP342, and uses them for leaf version 0xc0
in Taproot script path spends.
19ef5e3cb Add link to pak authorization design in secp-zpk (Gregory Sanders)
1cb252e01 Descriptor support in PAK infrastructure and tests (Gregory Sanders)
636673447 Properly encode parent witness addresses (Gregory Sanders)
7e63ce39e Extend validateaddress to check parent address validity. (Gregory Sanders)
85bcda52f pak mempool removal: don't modify the vector you are taking range over (Gregory Sanders)
8de42370d fixup mempool clearing of peg-outs on block commitment (Gregory Sanders)
542b826c9 ScriptHasvalidPAKProof: Allow any standard single-key output script type (Gregory Sanders)
71acfb359 Add IsPayToWitnessPubkeyHash convenience function (Gregory Sanders)
1241343bd testproposedblock: Reject blocks with non-matching pak commitments (Gregory Sanders)
47ea638b4 miner adds commitment when pak enforcement is set only (Gregory Sanders)
3fc3ac340 disallow pak enforcement arg when nonstandard tx are possible (Gregory Sanders)
dfe5331db Miner adds PAK commitments when config 'disagress' with block commits (Gregory Sanders)
bcd8db972 functional test for pak feature (Gregory Sanders)
5b6d767b6 Load PAK arguments from config and disk on startup (Gregory Sanders)
d391782cd Add getwalletpakinfo RPC call (Gregory Sanders)
f06e6f648 Wallet offline_counter starts at -1 (Gregory Sanders)
0e52456f3 Return status of pak enforcement on the blockchain in (Gregory Sanders)
050bb4905 Add getpakinfo RPC call, without wallet state (Gregory Sanders)
3cfe2d49e Add sendtomainchain RPC call which is used when -pak_enforce is enabled (Gregory Sanders)
567de67af Break out sendtomainchain to call functions based on -enforce_pak (Gregory Sanders)
070be0f5c add initpegout RPC for peg-out wallet initialization (Gregory Sanders)
47422e71d Write and load peg-out wallet functions on wallet load (Gregory Sanders)
4e631bd77 Add derivation helpers for peg-out wallet infrastructure (Gregory Sanders)
1559cc9c3 C(Pub)Key::Derive: Return optional tweak vector for peg-out wallets (Gregory Sanders)
f1dbd1cf3 -multi_data_permitted: Allow >1 op_return output by policy (Gregory Sanders)
9f5cc03f9 Read PAK list from connected blocks, save list, and boot transactions not conforming (Gregory Sanders)
86fbc2418 GetPAKKeysFromCommitment utility function (Gregory Sanders)
bf66d77a8 Add Read/Write functions to txdb for PAK lists (Gregory Sanders)
2b4899dd3 PAK enforcement via standardness, drop multi-op_return restriction (Gregory Sanders)
6679823fc Create global PAK lists for config and blockchain state (Gregory Sanders)
8c7746c4d Add CScript::IsPayToPubkeyHash convienience function (Gregory Sanders)
43424cbf7 Add PAK proof validation function (Gregory Sanders)
378e59461 Define PAKList structure and operations (Gregory Sanders)
40571ab6d Turn on secp-zkp experimental modules for PAK (Gregory Sanders)
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 more easy to implement.
As a side-effect, it also gets rid of the pseudo opcodes hack.
ad1ae7a Check and enable -Wshadow by default. (Pavel Janík)
9de90bb Do not shadow variables (gcc set) (Pavel Janík)
Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8
Previously only one PUSHDATA was allowed, needlessly limiting
applications such as matching OP_RETURN contents with bloom filters that
operate on a per-PUSHDATA level. Now any combination that passes
IsPushOnly() is allowed, so long as the total size of the scriptPubKey
is less than 42 bytes. (unchanged modulo non-minimal PUSHDATA encodings)
Also, this fixes the odd bug where previously the PUSHDATA could be
replaced by any single opcode, even sigops consuming opcodes such as
CHECKMULTISIG. (20 sigops!)
These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts.
This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa.