mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge #484: [0.17] PAK Enforcement, as policy
19ef5e3cbAdd link to pak authorization design in secp-zpk (Gregory Sanders)1cb252e01Descriptor support in PAK infrastructure and tests (Gregory Sanders)636673447Properly encode parent witness addresses (Gregory Sanders)7e63ce39eExtend validateaddress to check parent address validity. (Gregory Sanders)85bcda52fpak mempool removal: don't modify the vector you are taking range over (Gregory Sanders)8de42370dfixup mempool clearing of peg-outs on block commitment (Gregory Sanders)542b826c9ScriptHasvalidPAKProof: Allow any standard single-key output script type (Gregory Sanders)71acfb359Add IsPayToWitnessPubkeyHash convenience function (Gregory Sanders)1241343bdtestproposedblock: Reject blocks with non-matching pak commitments (Gregory Sanders)47ea638b4miner adds commitment when pak enforcement is set only (Gregory Sanders)3fc3ac340disallow pak enforcement arg when nonstandard tx are possible (Gregory Sanders)dfe5331dbMiner adds PAK commitments when config 'disagress' with block commits (Gregory Sanders)bcd8db972functional test for pak feature (Gregory Sanders)5b6d767b6Load PAK arguments from config and disk on startup (Gregory Sanders)d391782cdAdd getwalletpakinfo RPC call (Gregory Sanders)f06e6f648Wallet offline_counter starts at -1 (Gregory Sanders)0e52456f3Return status of pak enforcement on the blockchain in (Gregory Sanders)050bb4905Add getpakinfo RPC call, without wallet state (Gregory Sanders)3cfe2d49eAdd sendtomainchain RPC call which is used when -pak_enforce is enabled (Gregory Sanders)567de67afBreak out sendtomainchain to call functions based on -enforce_pak (Gregory Sanders)070be0f5cadd initpegout RPC for peg-out wallet initialization (Gregory Sanders)47422e71dWrite and load peg-out wallet functions on wallet load (Gregory Sanders)4e631bd77Add derivation helpers for peg-out wallet infrastructure (Gregory Sanders)1559cc9c3C(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)9f5cc03f9Read PAK list from connected blocks, save list, and boot transactions not conforming (Gregory Sanders)86fbc2418GetPAKKeysFromCommitment utility function (Gregory Sanders)bf66d77a8Add Read/Write functions to txdb for PAK lists (Gregory Sanders)2b4899dd3PAK enforcement via standardness, drop multi-op_return restriction (Gregory Sanders)6679823fcCreate global PAK lists for config and blockchain state (Gregory Sanders)8c7746c4dAdd CScript::IsPayToPubkeyHash convienience function (Gregory Sanders)43424cbf7Add PAK proof validation function (Gregory Sanders)378e59461Define PAKList structure and operations (Gregory Sanders)40571ab6dTurn on secp-zkp experimental modules for PAK (Gregory Sanders)
This commit is contained in:
commit
9308a7f388
38 changed files with 1737 additions and 23 deletions
|
|
@ -239,6 +239,23 @@ bool CScript::IsPegoutScript(const uint256& genesis_hash_check) const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool CScript::IsPayToPubkeyHash() const
|
||||
{
|
||||
// Extra-fast test for pay-to-pubkey-hash CScripts:
|
||||
return (this->size() == 25 &&
|
||||
(*this)[0] == OP_DUP &&
|
||||
(*this)[1] == OP_HASH160 &&
|
||||
(*this)[2] == 0x14 &&
|
||||
(*this)[23] == OP_EQUALVERIFY &&
|
||||
(*this)[24] == OP_CHECKSIG);
|
||||
}
|
||||
bool CScript::IsPayToWitnessPubkeyHash() const
|
||||
{
|
||||
return (this->size() == 22 &&
|
||||
(*this)[0] == 0x00 &&
|
||||
(*this)[1] == 0x14);
|
||||
}
|
||||
|
||||
// END ELEMENTS
|
||||
//
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue