ZIP 225 tx format constants
This commit is contained in:
parent
e6dd9550e1
commit
e8748f89d3
|
@ -20,6 +20,10 @@ static const int32_t OVERWINTER_MAX_TX_VERSION = 3;
|
|||
static const int32_t SAPLING_MIN_TX_VERSION = 4;
|
||||
/** The maximum allowed Sapling transaction version (network rule) */
|
||||
static const int32_t SAPLING_MAX_TX_VERSION = 4;
|
||||
/** The minimum allowed ZIP225 transaction version (network rule) */
|
||||
static const int32_t ZIP225_MIN_TX_VERSION = 5;
|
||||
/** The maximum allowed ZIP225 transaction version (network rule) */
|
||||
static const int32_t ZIP225_MAX_TX_VERSION = 5;
|
||||
/** The maximum allowed size for a serialized block, in bytes (network rule) */
|
||||
static const unsigned int MAX_BLOCK_SIZE = 2000000;
|
||||
/** The maximum allowed number of signature check operations in a block (network rule) */
|
||||
|
|
|
@ -46,6 +46,18 @@ static_assert(SAPLING_TX_VERSION >= SAPLING_MIN_TX_VERSION,
|
|||
static_assert(SAPLING_TX_VERSION <= SAPLING_MAX_TX_VERSION,
|
||||
"Sapling tx version must not be higher than maximum");
|
||||
|
||||
// ZIP225 transaction version group id
|
||||
// (defined in section 7.1 of the protocol spec)
|
||||
static constexpr uint32_t ZIP225_VERSION_GROUP_ID = 0x26A7270A;
|
||||
static_assert(ZIP225_VERSION_GROUP_ID != 0, "version group id must be non-zero as specified in ZIP 202");
|
||||
|
||||
// ZIP225 transaction version
|
||||
static const int32_t ZIP225_TX_VERSION = 5;
|
||||
static_assert(ZIP225_TX_VERSION >= ZIP225_MIN_TX_VERSION,
|
||||
"ZIP225 tx version must not be lower than minimum");
|
||||
static_assert(ZIP225_TX_VERSION <= ZIP225_MAX_TX_VERSION,
|
||||
"ZIP225 tx version must not be higher than maximum");
|
||||
|
||||
// Future transaction version group id
|
||||
static constexpr uint32_t ZFUTURE_VERSION_GROUP_ID = 0xFFFFFFFF;
|
||||
static_assert(ZFUTURE_VERSION_GROUP_ID != 0, "version group id must be non-zero as specified in ZIP 202");
|
||||
|
|
Loading…
Reference in New Issue