diff --git a/src/hush_defs.h b/src/hush_defs.h index 2264a7160..a31e68029 100644 --- a/src/hush_defs.h +++ b/src/hush_defs.h @@ -32,6 +32,15 @@ #define CRYPTO555_PUBSECPSTR "038a1bd41a08f38edda51042988022933c5775dfce81f7bae0b32a9179650352ac" #define CRYPTO555_HUSHADDR "RFetqf8WUfWnwNeXdknkm8ojk7EXnYFzrv" #define CRYPTO555_RMD160STR "deadbeefbadcaca748c4986b240ff7d7bc3fffb0" +// DragonX: block time at/after which the inherited CRYPTO555/notary transparent-vout exemption on +// the fully-private chain is removed, so those vouts become invalid like any other taddr. Dropping +// a previously-accepted output is a consensus change, so it is activated by block time (same +// mechanism as HUSH_SAPING_ACTIVATION) to let the whole network upgrade before it bites. +// 0xFFFFFFFF is a SENTINEL meaning "never active": the operator sets a real future timestamp once +// the upgrade window has passed AND they have confirmed no active dPoW notarization posts +// transparent notary vouts on-chain (which this ban would otherwise reject). Until then this commit +// is a no-op and changes no validation behavior. +#define DRAGONX_NOTARYVOUT_BAN_TIME 0xFFFFFFFF #define HUSH_FIRSTFUNGIBLEID 100 #define HUSH_SAPING_ACTIVATION 1544832000 // Dec 15th, 2018 #define HUSH_SAPING_DEADLINE 1550188800 // Feb 15th, 2019 diff --git a/src/main.cpp b/src/main.cpp index c82e8c25c..d71cb2309 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1598,7 +1598,14 @@ bool CheckTransactionWithoutProofVerification(uint32_t tiptime,const CTransactio char destaddr[65]; Getscriptaddress(destaddr,txout.scriptPubKey); - if ( hush_isnotaryvout(destaddr,tiptime) == 0 ) + // The CRYPTO555/notary allowlist exempts those transparent vouts from the private-chain + // ban, leaving a public UTXO on a chain users treat as fully shielded. At/after the + // activation time that exemption is dropped and such vouts are rejected like any other + // taddr (time-gated + default-off via the sentinel so the whole network upgrades first). + // The gate is checked first so the allowlist lookup is skipped entirely once active. + int32_t isNotaryVout = ( tiptime >= DRAGONX_NOTARYVOUT_BAN_TIME ) + ? 0 : hush_isnotaryvout(destaddr,tiptime); + if ( isNotaryVout == 0 ) { const bool isburn = (strcmp(destaddr,BURN_ADDRESS) == 0); if ((ASSETCHAINS_BURN == 1) && isburn && tx.vin.empty()) {