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.
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)
Switches to named constants, because numeric_limits calls can be harder to read
and less portable.
Change was suggested by James O'Beirne <james.obeirne@gmail.com> in
https://github.com/bitcoin/bitcoin/pull/10973#discussion_r213473620
There are no changes in behavior except on some platforms we don't support
(ILP64, IP16L32, I16LP32), where SignalsOptInRBF() and MutateTxAddInput()
functions would now work correctly.
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.
This adds a READWRITEAS(type, obj) macro which serializes obj as if it
were casted to (const type&) when const, and to (type&) when non-const.
This makes it usable in serialization code that uses a single
implementation for both serialization and deserializing, which doesn't
know the constness of the object involved.
9ad6746ccd Use static_cast instead of C-style casts for non-fundamental types (practicalswift)
Pull request description:
A C-style cast is equivalent to try casting in the following order:
1. `const_cast(...)`
2. `static_cast(...)`
3. `const_cast(static_cast(...))`
4. `reinterpret_cast(...)`
5. `const_cast(reinterpret_cast(...))`
By using `static_cast<T>(...)` explicitly we avoid the possibility of an unintentional and dangerous `reinterpret_cast`. Furthermore `static_cast<T>(...)` allows for easier grepping of casts.
For a more thorough discussion, see ["ES.49: If you must use a cast, use a named cast"](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#es49-if-you-must-use-a-cast-use-a-named-cast) in the C++ Core Guidelines (Stroustrup & Sutter).
Tree-SHA512: bd6349b7ea157da93a47b8cf238932af5dff84731374ccfd69b9f732fabdad1f9b1cdfca67497040f14eaa85346391404f4c0495e22c467f26ca883cd2de4d3c
A C-style cast is equivalent to try casting in the following order:
1. const_cast(...)
2. static_cast(...)
3. const_cast(static_cast(...))
4. reinterpret_cast(...)
5. const_cast(reinterpret_cast(...))
By using static_cast<T>(...) explicitly we avoid the possibility
of an unintentional and dangerous reinterpret_cast. Furthermore
static_cast<T>(...) allows for easier grepping of casts.
08f71c29e [Trivial] Add a comment on the use of prevector in script. (Gregory Maxwell)
Pull request description:
Tree-SHA512: 020981516e67e576685eb9a8532178fb97d1780af409fc86d869cd05c293c0c823c26e838cf544d18610f5a3f479ce3e47d2ccb95fb1c4e55fe9e7ceb354f20b
ad1ae7a Check and enable -Wshadow by default. (Pavel Janík)
9de90bb Do not shadow variables (gcc set) (Pavel Janík)
Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8