github.com/ZuluSpl0it/Sia@v1.3.7/modules/transactionpool/consts.go (about) 1 package transactionpool 2 3 import ( 4 "time" 5 6 "github.com/NebulousLabs/Sia/build" 7 "github.com/NebulousLabs/Sia/persist" 8 "github.com/NebulousLabs/Sia/types" 9 ) 10 11 // Consts related to the persisting structures of the transactoin pool. 12 const ( 13 dbFilename = "transactionpool.db" 14 logFile = "transactionpool.log" 15 ) 16 17 // Constants related to the size and ease-of-entry of the transaction pool. 18 const ( 19 // maxTxnAge determines the maximum age of a transaction (in block height) 20 // allowed before the transaction is pruned from the transaction pool. 21 maxTxnAge = types.BlockHeight(24) 22 23 // TransactionPoolFeeExponentiation defines the polynomial rate of growth 24 // required to keep putting transactions into the transaction pool. If the 25 // exponentiation is 2, then doubling the size of the transaction pool 26 // requires quadrupling the fees of the transactions being added. A higher 27 // number makes it harder for the transaction pool to grow beyond its 28 // default size during times of congestion. 29 TransactionPoolExponentiation = 3 30 31 // TransactionPoolSizeForFee defines how large the transaction pool needs to 32 // be before it starts expecting fees to be on the transaction. This initial 33 // limit is to help the network grow and provide some wiggle room for 34 // wallets that are not yet able to operate via a fee market. 35 TransactionPoolSizeForFee = 500e3 36 37 // TransactionPoolSizeTarget defines the target size of the pool when the 38 // transactions are paying 1 SC / kb in fees. 39 TransactionPoolSizeTarget = 3e6 40 ) 41 42 // Constants related to fee estimation. 43 const ( 44 // blockFeeEstimationDepth defines how far backwards in the blockchain the 45 // fee estimator looks when using blocks to figure out the appropriate fees 46 // to add to transactions. 47 blockFeeEstimationDepth = 6 48 49 // maxMultiplier defines the general gap between the maximum recommended fee 50 // and the minimum recommended fee. 51 maxMultiplier = 3 52 53 // minExtendMultiplier defines the amount we multiply into the minimum 54 // amount required to extend the fee pool when coming up with a min fee 55 // recommendation. 56 minExtendMultiplier = 1.2 57 ) 58 59 // Variables related to the persisting structures of the transaction pool. 60 var ( 61 dbMetadata = persist.Metadata{ 62 Header: "Sia Transaction Pool DB", 63 Version: "0.6.0", 64 } 65 ) 66 67 // Variables related to the size and ease-of-entry of the transaction pool. 68 var ( 69 // minEstimation defines a sane minimum fee per byte for transactions. This 70 // will typically be only suggested as a fee in the absence of congestion. 71 minEstimation = types.SiacoinPrecision.Div64(100).Div64(1e3) 72 ) 73 74 // Variables related to propagating transactions through the network. 75 var ( 76 // relayTransactionSetTimeout establishes the timeout for a relay 77 // transaction set call. 78 relayTransactionSetTimeout = build.Select(build.Var{ 79 Standard: 3 * time.Minute, 80 Dev: 20 * time.Second, 81 Testing: 3 * time.Second, 82 }).(time.Duration) 83 )