<commit_before>// Copyright (c) 2009-2015 <NAME>
// Copyright (c) 2009-2015 The Bitcoin developers
// Copyright (c) 2015 The DarkSilk developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef DARKSILK_MAIN_H
#define DARKSILK_MAIN_H

#include "core.h"
#include "bignum.h"
#include "sync.h"
#include "txmempool.h"
#include "net.h"
#include "script.h"
#include "scrypt.h"

#include <list>

class CValidationState;

static const int STORMNODE_PAYMENT_START = 82002; // Block 82002
static const int TESTNET_STORMNODE_PAYMENT_START = 100; // Block 100

static const int64_t SANDSTORM_COLLATERAL = (0.01*COIN);
static const int64_t SANDSTORM_FEE = (0.01*COIN); // SandStorm sending fee of 0.01DRKSLK
static const int64_t SANDSTORM_POOL_MAX = (999.99*COIN);

static const int64_t STATIC_POS_REWARD = COIN * 1; // Static Reward of 1 DRKSLK 

/*
    At 15 signatures, 1/2 of the stormnode network can be owned by
    one party without comprimising the security of InstantX
    (1000/2150.0)**15 = 1.031e-05
*/
#define INSTANTX_SIGNATURES_REQUIRED           20
#define INSTANTX_SIGNATURES_TOTAL              30

#define STORMNODE_NOT_PROCESSED               0 // Initial state
#define STORMNODE_IS_CAPABLE                  1
#define STORMNODE_NOT_CAPABLE                 2
#define STORMNODE_STOPPED                     3
#define STORMNODE_INPUT_TOO_NEW               4
#define STORMNODE_PORT_NOT_OPEN               6
#define STORMNODE_PORT_OPEN                   7
#define STORMNODE_SYNC_IN_PROCESS             8
#define STORMNODE_REMOTELY_ENABLED            9

#define STORMNODE_MIN_CONFIRMATIONS           15
#define STORMNODE_MIN_DSEEP_SECONDS           (30*60)
#define STORMNODE_MIN_DSEE_SECONDS            (5*60)
#define STORMNODE_PING_SECONDS                (1*60)
#define STORMNODE_EXPIRATION_SECONDS          (65*60)
#define STORMNODE_REMOVAL_SECONDS             (70*60)


class CBlock;
class CBlockIndex;
class CInv;
class CKeyItem;
class CNode;
class CReserveKey;
class CWallet;


/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 50000000; // 50MB Maximum Block Size (50x Bitcoin Core)
/** The maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
/** The maximum size for transactions we're willing to relay/mine **/
static const unsigned int MAX_STANDARD_TX_SIZE = MAX_BLOCK_SIZE_GEN/5;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Maxiumum number of signature check operations in an IsStandard() P2SH script */
static const unsigned int MAX_P2SH_SIGOPS = 15;
/** The maximum number of sigops we're willing to relay/mine in a single tx */
static const unsigned int MAX_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
/** The maximum number of orphan transactions kept in memory */
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/10;
/** Default for -maxorphanblocks, maximum number of orphan blocks kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_BLOCKS = 7500;
/** The maximum number of entries in an 'inv' protocol message */
static const unsigned int MAX_INV_SZ = 50000;
/** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
static const int64_t MIN_TX_FEE = 10000; // 0.0001DRKSLK Minimum Transaction Fee
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying) */
static const int64_t MIN_RELAY_TX_FEE = MIN_TX_FEE;
/** No amount larger than this (in satoshi) is valid */
static const int64_t MAX_MONEY = 90000000 * COIN; // 45,000,000 instamined from blocks 1 & 2 for Weaver Collateral (main.cpp lines 1129-1143) | 1,679,958 PoW Generated Coins  
inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5th 00:53:20 1985 UTC

static const unsigned int TARGET_TIME_SPAN = 16 * 60;  // 16 mins
static const unsigned int POW_TARGET_SPACING = 240;
static const unsigned int TARGET_SPACING = 64;
static const int64_t DRIFT = 480;
inline int64_t FutureDrift(int64_t nTime) { return nTime + DRIFT; }

extern CScript COINBASE_FLAGS;<commit_msg>Update main.h<commit_after>// Copyright (c) 2009-2015 <NAME>oto
// Copyright (c) 2009-2015 The Bitcoin developers
// Copyright (c) 2015 The DarkSilk developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef DARKSILK_MAIN_H
#define DARKSILK_MAIN_H

#include "core.h"
#include "bignum.h"
#include "sync.h"
#include "txmempool.h"
#include "net.h"
#include "script.h"
#include "scrypt.h"

#include <list>

class CValidationState;

static const int STORMNODE_PAYMENT_START = 82002; // Block 82002
static const int TESTNET_STORMNODE_PAYMENT_START = 100; // Block 100

static const int64_t SANDSTORM_COLLATERAL = (0.01*COIN);
static const int64_t SANDSTORM_FEE = (0.01*COIN); // SandStorm sending fee of 0.01DRKSLK
static const int64_t SANDSTORM_POOL_MAX = (999.99*COIN);

static const int64_t STATIC_POS_REWARD = COIN * 1; // Static Reward of 1 DRKSLK 

/*
    At 15 signatures, 1/2 of the stormnode network can be owned by
    one party without comprimising the security of InstantX
    (1000/2150.0)**15 = 1.031e-05
*/
#define INSTANTX_SIGNATURES_REQUIRED           20
#define INSTANTX_SIGNATURES_TOTAL              30

#define STORMNODE_NOT_PROCESSED               0 // Initial state
#define STORMNODE_IS_CAPABLE                  1
#define STORMNODE_NOT_CAPABLE                 2
#define STORMNODE_STOPPED                     3
#define STORMNODE_INPUT_TOO_NEW               4
#define STORMNODE_PORT_NOT_OPEN               6
#define STORMNODE_PORT_OPEN                   7
#define STORMNODE_SYNC_IN_PROCESS             8
#define STORMNODE_REMOTELY_ENABLED            9

#define STORMNODE_MIN_CONFIRMATIONS           15
#define STORMNODE_MIN_DSEEP_SECONDS           (30*60)
#define STORMNODE_MIN_DSEE_SECONDS            (5*60)
#define STORMNODE_PING_SECONDS                (1*60)
#define STORMNODE_EXPIRATION_SECONDS          (65*60)
#define STORMNODE_REMOVAL_SECONDS             (70*60)


class CBlock;
class CBlockIndex;
class CInv;
class CKeyItem;
class CNode;
class CReserveKey;
class CWallet;


/** The maximum allowed size for a serialized block, in bytes (network rule) */
static const unsigned int MAX_BLOCK_SIZE = 50000000; // 50MB Maximum Block Size (50x Bitcoin Core)
/** The maximum size for mined blocks */
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;
/** The maximum size for transactions we're willing to relay/mine **/
static const unsigned int MAX_STANDARD_TX_SIZE = MAX_BLOCK_SIZE_GEN/5;
/** The maximum allowed number of signature check operations in a block (network rule) */
static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
/** Maxiumum number of signature check operations in an IsStandard() P2SH script */
static const unsigned int MAX_P2SH_SIGOPS = 15;
/** The maximum number of sigops we're willing to relay/mine in a single tx */
static const unsigned int MAX_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
/** The maximum number of orphan transactions kept in memory */
static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/10;
/** Default for -maxorphanblocks, maximum number of orphan blocks kept in memory */
static const unsigned int DEFAULT_MAX_ORPHAN_BLOCKS = 7500;
/** The maximum number of entries in an 'inv' protocol message */
static const unsigned int MAX_INV_SZ = 50000;
/** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
static const int64_t MIN_TX_FEE = 10000; // 0.0001DRKSLK Minimum Transaction Fee
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying) */
static const int64_t MIN_RELAY_TX_FEE = MIN_TX_FEE;
/** No amount larger than this (in satoshi) is valid */
static const int64_t MAX_MONEY = 90000000 * COIN; // 45,000,000 instamined from blocks 1 & 2 for Weaver Collateral (main.cpp lines 1129-1143) | 1,679,958 PoW Generated Coins  
inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
/** Threshold for nLockTime: below this value it is interpreted as block number, otherwise as UNIX timestamp. */
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5th 00:53:20 1985 UTC

static const unsigned int TARGET_TIME_SPAN = 16 * 60;  // 16 mins
static const unsigned int POW_TARGET_SPACING = 240;
static const unsigned int TARGET_SPACING = 240;
static const int64_t DRIFT = 480;
inline int64_t FutureDrift(int64_t nTime) { return nTime + DRIFT; }

extern CScript COINBASE_FLAGS;
{'fraction_non_alphanumeric': 0.0758828788556102, 'fraction_numerical': 0.053755029056772465, 'mean_word_length': 3.8715296679368536, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7405189', 'n_tokens_mistral': 3226, 'n_tokens_neox': 2823, 'n_words': 968}