Hush Delayed Proof Of Work Dragon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

228 lines
7.4 KiB

/******************************************************************************
* Copyright © 2018-2020 The Hush Developers *
* Copyright © 2014-2018 The SuperNET Developers. *
* *
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at *
* the top-level directory of this distribution for the individual copyright *
* holder information and the developer policies on copyright and licensing. *
* *
* Unless otherwise agreed in a custom licensing agreement, no part of the *
* SuperNET software, including this file may be copied, modified, propagated *
* or distributed except according to the terms contained in the LICENSE file *
* *
* Removal or modification of this copyright notice is prohibited. *
* *
******************************************************************************/
#ifndef H_DRAGONDEFINES_H
#define H_DRAGONDEFINES_H
#define SPARSECOUNT(x) ((x) << 1)
#define DRAGON_MAXSCRIPTSIZE 10001
#define DRAGON_SERIALIZE_SPENDVECTORGEN
//#define DRAGON_DISABLEPEERS
#define _DRAGON_MAXSTUCKTIME 10
#ifdef __PNACL__
#define DRAGON_MAXITERATIONS 77
#else
#define DRAGON_MAXITERATIONS 555
#endif
#define DRAGON_DEFAULTLAG 7
#define DRAGON_MAXHEIGHT (1 << 30)
#define DRAGON_MAXCOINS 64
#define DRAGON_MAXDELAY_MILLIS (3600 * 1000 * 24)
#define DRAGON_DEFAULT_POLLTIMEOUT 10
#define DRAGON_SEQUENCEID_FINAL 0xfffffffe
#define DRAGON_EXCHANGEIDLE 10
#define IGUANS_JSMILLIS 100
#define DRAGON_WIDTH 1024
#define DRAGON_HEIGHT 200
#define DRAGON_HEADPERCENTAGE 0.
#define DRAGON_TAILPERCENTAGE 1.0
#define DRAGON_MAXPENDHDRS 1
#define DRAGON_BTCPENDINGREQUESTS 3
#define DRAGON_PENDINGREQUESTS 64
#define DRAGON_MINPENDBUNDLES 4
#define DRAGON_MAXPENDBUNDLES 64
#define DRAGON_RPCPORT 5555
#define DRAGON_NOTARYPORT 5556
#define DRAGON_NOTARYPORT2 5557
#define DRAGON_MAXRAMCHAINSIZE ((uint64_t)1024L * 1024L * 1024L * 16)
#define DRAGON_MAPHASHTABLES 1
#define DRAGON_DEFAULTRAM 4
#define DRAGON_MAXRECVCACHE ((int64_t)1024L * 1024 * 1024L)
#define DRAGON_MAXBUNDLES (50000000 / 500)
#define DRAGON_MINPEERS 64
#define DRAGON_LOG2MAXPEERS 11 // cant exceed 13 bits as ramchain unspents has bitfield
#define DRAGON_MAXPEERS (1 << DRAGON_LOG2MAXPEERS)
#ifndef DRAGON_MAXPACKETSIZE
#define DRAGON_MAXPACKETSIZE (1 << DRAGON_LOG2PACKETSIZE)
#endif
//#define DRAGON_MAXFILEITEMS 8192
#define DRAGON_RECENTPEER (3600 * 24 * 7)
#define DRAGON_PERMTHREAD 0
#define DRAGON_CONNTHREAD 1
#define DRAGON_SENDTHREAD 2
#define DRAGON_RECVTHREAD 3
#define DRAGON_HELPERTHREAD 4
#define DRAGON_EXCHANGETHREAD 5
#define DRAGON_DEDICATED_THREADS
#ifdef DRAGON_DEDICATED_THREADS
#define DRAGON_MAXCONNTHREADS 16
#define DRAGON_MAXSENDTHREADS (DRAGON_MAXPEERS>>2)
#define DRAGON_MAXRECVTHREADS (DRAGON_MAXPEERS>>2)
#else
#define DRAGON_MAXCONNTHREADS 16
#define DRAGON_MAXSENDTHREADS 16
#define DRAGON_MAXRECVTHREADS 16
#endif
#define BASILISK_MAXRELAYS 64
#define DRAGON_SUBDIRDIVISOR 28000
#define NTARGETSPACING 60
#define DRAGON_PROTOCOL_BITCOIN 'b'
#ifdef __PNACL
void PNACL_message(const char* format, ...);
#endif
extern int32_t DRAGON_NUMHELPERS;
#ifdef __PNACL
#define printf PNACL_message
#define MS_ASYNC 1 /* Sync memory asynchronously. */
#define MS_SYNC 4 /* Synchronous memory sync. */
#else
#define PNACL_message printf
#endif
#ifndef WIN32
#ifndef MSG_NOSIGNAL
#define MSG_NOSIGNAL 0x4000 // Do not generate SIGPIPE
#endif
#else
#define MSG_NOSIGNAL 0
#endif
#define BIP0031_VERSION 60000
#define CADDR_TIME_VERSION 31402
#define MIN_PROTO_VERSION 209
#define MAX_BLOCK_SIZE 1000000
//#define COINBASE_MATURITY 100
#define _DRAGON_HDRSCOUNT 2000
#define _DRAGON_BLOCKHASHES 500
#define DRAGON_MAXBUNDLESIZE _DRAGON_HDRSCOUNT
#define NODE_NETWORK (1 << 0)
#define NODE_GETUTXO (1 << 1)
#define NODE_BLOOM (1 << 2)
#define INIT_PROTO_VERSION 209 // initial proto version, to be increased after version/verack negotiation
#define GETHEADERS_VERSION 31800 // In this version, 'getheaders' was introduced.
#define MIN_PEER_PROTO_VERSION GETHEADERS_VERSION // disconnect from peers older than this proto version
// nTime field added to CAddress, starting with this version, if possible, avoid requesting addresses nodes older than this
#define CADDR_TIME_VERSION 31402
// only request blocks from nodes outside this range of versions
#define NOBLKS_VERSION_START 32000
#define NOBLKS_VERSION_END 32400
#define BIP0031_VERSION 60000 // BIP 0031, pong message, is enabled for all versions AFTER this one
#define MEMPOOL_GD_VERSION 60002 // "mempool" command, enhanced "getdata" behavior starts with this version
#define NO_BLOOM_VERSION 70011 // "filter*" disabled without NODE_BLOOM after and including this version
#define PROTOCOL_HEADERS_VERSION 70012
#define PROTOCOL_VERSION 70003
//#define PROTOCOL_VERSION PROTOCOL_HEADERS_VERSION
#define MSG_TX 1
#define MSG_BLOCK 2
#define MSG_FILTERED_BLOCK 3
//#define MSG_QUOTE 253
#define MSG_BUNDLE 254
#define MSG_BUNDLE_HEADERS 255
#define DRAGON_MAXLOCATORS 64
#define DRAGON_MAXINV 50000
#define DRAGON_VOLATILE 1
#define DRAGON_ITEMIND_DATA 2
#define DRAGON_MAPPED_ITEM 4
#define DRAGON_SHA256 0x80
#define DRAGON_ALLOC_MULT 1.1
#define DRAGON_ALLOC_INCR 1000
#define DRAGON_JSONTIMEOUT 10000
#define DRAGON_MAPRECVDATA 1
#define DRAGON_MAPTXIDITEMS 2
#define DRAGON_MAPPKITEMS 4
#define DRAGON_MAPBLOCKITEMS 8
#define DRAGON_MAPPEERITEMS 16
#define DRAGON_PEER_ELIGIBLE 1
#define DRAGON_PEER_CONNECTING 2
#define DRAGON_PEER_READY 3
#define DRAGON_PEER_KILLED 4
#define DRAGON_NORMAL_TXVERSION 1
#define DRAGON_LOCKTIME_TXVERSION 1
#define DRAGON_SEARCHBUNDLE 1
#define DRAGON_SEARCHNOLAST (DRAGON_SEARCHBUNDLE | 2)
#define DRAGON_SEARCHPREV 4
#define DRAGON_SEARCHNEXT 8
#define DRAGON_SEARCHALL (DRAGON_SEARCHBUNDLE | DRAGON_SEARCHPREV | DRAGON_SEARCHNEXT)
#define SUPERNET_MAXEXCHANGES 64
#define SUPERNET_APIVERSION 0
#define DRAGON_SCRIPT_NULL 0
#define DRAGON_SCRIPT_76AC 1
#define DRAGON_SCRIPT_76A988AC 2
#define DRAGON_SCRIPT_P2SH 3
#define DRAGON_SCRIPT_OPRETURN 4
#define DRAGON_SCRIPT_3of3 5
#define DRAGON_SCRIPT_2of3 6
#define DRAGON_SCRIPT_1of3 7
#define DRAGON_SCRIPT_2of2 8
#define DRAGON_SCRIPT_1of2 9
#define DRAGON_SCRIPT_MSIG 10
#define DRAGON_SCRIPT_DATA 11
#define DRAGON_SCRIPT_AC 12
#define DRAGON_SCRIPT_1of1 13
#define DRAGON_SCRIPT_STRANGE 15
#define DRAGON_MAXSCRIPTSIZE 10001
#define RESET "\033[0m"
#define BLACK "\033[30m" /* Black */
#define RED "\033[31m" /* Red */
#define GREEN "\033[32m" /* Green */
#define YELLOW "\033[33m" /* Yellow */
#define BLUE "\033[34m" /* Blue */
#define MAGENTA "\033[35m" /* Magenta */
#define CYAN "\033[36m" /* Cyan */
#define WHITE "\033[37m" /* White */
#define BOLDBLACK "\033[1m\033[30m" /* Bold Black */
#define BOLDRED "\033[1m\033[31m" /* Bold Red */
#define BOLDGREEN "\033[1m\033[32m" /* Bold Green */
#define BOLDYELLOW "\033[1m\033[33m" /* Bold Yellow */
#define BOLDBLUE "\033[1m\033[34m" /* Bold Blue */
#define BOLDMAGENTA "\033[1m\033[35m" /* Bold Magenta */
#define BOLDCYAN "\033[1m\033[36m" /* Bold Cyan */
#define BOLDWHITE "\033[1m\033[37m" /* Bold White */
#endif