Bitcoin ABC 0.30.7
P2P Digital Currency
script_flags.h
Go to the documentation of this file.
1// Copyright (c) 2009-2010 Satoshi Nakamoto
2// Copyright (c) 2009-2016 The Bitcoin Core developers
3// Copyright (c) 2017-2020 The Bitcoin developers
4// Distributed under the MIT software license, see the accompanying
5// file COPYING or http://www.opensource.org/licenses/mit-license.php.
6
7#ifndef BITCOIN_SCRIPT_SCRIPT_FLAGS_H
8#define BITCOIN_SCRIPT_SCRIPT_FLAGS_H
9
11enum {
13
14 // Evaluate P2SH subscripts (softfork safe, BIP16).
15 // Note: The Segwit Recovery feature is an exception to P2SH
16 SCRIPT_VERIFY_P2SH = (1U << 0),
17
18 // Passing a non-strict-DER signature or one with undefined hashtype to a
19 // checksig operation causes script failure. Evaluating a pubkey that is not
20 // (0x04 + 64 bytes) or (0x02 or 0x03 + 32 bytes) by checksig causes script
21 // failure.
23
24 // Passing a non-strict-DER signature to a checksig operation causes script
25 // failure (BIP62 rule 1)
27
28 // Passing a non-strict-DER signature or one with S > order/2 to a checksig
29 // operation causes script failure
30 // (BIP62 rule 5).
32
33 // Using a non-push operator in the scriptSig causes script failure
34 // (BIP62 rule 2).
36
37 // Require minimal encodings for all push operations (OP_0... OP_16,
38 // OP_1NEGATE where possible, direct pushes up to 75 bytes, OP_PUSHDATA up
39 // to 255 bytes, OP_PUSHDATA2 for anything larger). Evaluating any other
40 // push causes the script to fail (BIP62 rule 3). In addition, whenever a
41 // stack element is interpreted as a number, it must be of minimal length
42 // (BIP62 rule 4).
44
45 // Discourage use of NOPs reserved for upgrades (NOP1-10)
46 //
47 // Provided so that nodes can avoid accepting or mining transactions
48 // containing executed NOP's whose meaning may change after a soft-fork,
49 // thus rendering the script invalid; with this flag set executing
50 // discouraged NOPs fails the script. This verification flag will never be a
51 // mandatory flag applied to scripts in a block. NOPs that are not executed,
52 // e.g. within an unexecuted IF ENDIF block, are *not* rejected.
54
55 // Require that only a single stack element remains after evaluation. This
56 // changes the success criterion from "At least one stack element must
57 // remain, and when interpreted as a boolean, it must be true" to "Exactly
58 // one stack element must remain, and when interpreted as a boolean, it must
59 // be true".
60 // (BIP62 rule 6)
61 // Note: CLEANSTACK should never be used without P2SH.
62 // Note: The Segwit Recovery feature is an exception to CLEANSTACK
64
65 // Verify CHECKLOCKTIMEVERIFY
66 //
67 // See BIP65 for details.
69
70 // support CHECKSEQUENCEVERIFY opcode
71 //
72 // See BIP112 for details
74
75 // Require the argument of OP_IF/NOTIF to be exactly 0x01 or empty vector
76 //
78
79 // Signature(s) must be empty vector if an CHECK(MULTI)SIG operation failed
80 //
82
83 // Do we accept signature using SIGHASH_FORKID
84 //
86
87 // Do we accept activate replay protection using a different fork id.
88 //
90
91 // The exception to CLEANSTACK and P2SH for the recovery of coins sent
92 // to p2sh segwit addresses is not allowed.
94
95 // Whether to allow new OP_CHECKMULTISIG logic to trigger. (new multisig
96 // logic verifies faster, and only allows Schnorr signatures)
98
99 // Require the number of sigchecks in an input to satisfy a specific
100 // bound, defined by scriptSig length.
101 // Note: The Segwit Recovery feature is a (currently moot) exception to
102 // VERIFY_INPUT_SIGCHECKS
104
105 // A utility flag to decide whether we must enforce sigcheck limits.
107};
108
109#endif // BITCOIN_SCRIPT_SCRIPT_FLAGS_H
@ SCRIPT_VERIFY_P2SH
Definition: script_flags.h:16
@ SCRIPT_VERIFY_SIGPUSHONLY
Definition: script_flags.h:35
@ SCRIPT_VERIFY_MINIMALIF
Definition: script_flags.h:77
@ SCRIPT_VERIFY_LOW_S
Definition: script_flags.h:31
@ SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY
Definition: script_flags.h:68
@ SCRIPT_ENABLE_REPLAY_PROTECTION
Definition: script_flags.h:89
@ SCRIPT_ENABLE_SCHNORR_MULTISIG
Definition: script_flags.h:97
@ SCRIPT_VERIFY_STRICTENC
Definition: script_flags.h:22
@ SCRIPT_VERIFY_NULLFAIL
Definition: script_flags.h:81
@ SCRIPT_VERIFY_DERSIG
Definition: script_flags.h:26
@ SCRIPT_ENFORCE_SIGCHECKS
Definition: script_flags.h:106
@ SCRIPT_VERIFY_CLEANSTACK
Definition: script_flags.h:63
@ SCRIPT_VERIFY_NONE
Definition: script_flags.h:12
@ SCRIPT_VERIFY_MINIMALDATA
Definition: script_flags.h:43
@ SCRIPT_DISALLOW_SEGWIT_RECOVERY
Definition: script_flags.h:93
@ SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS
Definition: script_flags.h:53
@ SCRIPT_VERIFY_CHECKSEQUENCEVERIFY
Definition: script_flags.h:73
@ SCRIPT_ENABLE_SIGHASH_FORKID
Definition: script_flags.h:85
@ SCRIPT_VERIFY_INPUT_SIGCHECKS
Definition: script_flags.h:103