OSDN Git Service

genesis is ready for mainnet
[bytom/bytom.git] / consensus / general.go
index 9b032f2..2f2af76 100644 (file)
@@ -8,21 +8,24 @@ import (
 
 //consensus variables
 const (
-       // define the Max transaction size and Max block size
-       MaxTxSize   = uint64(1048576)
-       MaxBlockGas = uint64(100000000)
+       // Max gas that one block contains
+       MaxBlockGas      = uint64(10000000)
+       VMGasRate        = int64(200)
+       StorageGasRate   = int64(1)
+       MaxGasAmount     = int64(200000)
+       DefaultGasCredit = int64(30000)
 
        //config parameter for coinbase reward
-       CoinbasePendingBlockNumber = uint64(6)
-       subsidyReductionInterval   = uint64(560640)
-       baseSubsidy                = uint64(624000000000)
-       InitialBlockSubsidy        = uint64(1470000000000000000)
+       CoinbasePendingBlockNumber = uint64(100)
+       subsidyReductionInterval   = uint64(840000)
+       baseSubsidy                = uint64(41250000000)
+       InitialBlockSubsidy        = uint64(147000041250000000)
 
        // config for pow mining
-       PowMinBits            = uint64(2161727821138738707)
-       BlocksPerRetarget     = uint64(1024)
-       TargetSecondsPerBlock = uint64(60)
-       SeedPerRetarget       = uint64(128)
+       PowMinBits            = uint64(2305843009213861724)
+       BlocksPerRetarget     = uint64(2016)
+       TargetSecondsPerBlock = uint64(150)
+       SeedPerRetarget       = uint64(256)
 
        // MaxTimeOffsetSeconds is the maximum number of seconds a block time is allowed to be ahead of the current time
        MaxTimeOffsetSeconds = uint64(60 * 60)
@@ -30,18 +33,9 @@ const (
 
        PayToWitnessPubKeyHashDataSize = 20
        PayToWitnessScriptHashDataSize = 32
+       CoinbaseArbitrarySizeLimit     = 128
 
-       CoinbaseArbitrarySizeLimit = 128
-
-       VMGasRate        = int64(1000)
-       StorageGasRate   = int64(10)
-       MaxGasAmount     = int64(100000)
-       DefaultGasCredit = int64(80000)
-
-       BTMAlias       = "BTM"
-       BTMSymbol      = "BTM"
-       BTMDecimals    = 8
-       BTMDescription = `Bytom Official Issue`
+       BTMAlias = "BTM"
 )
 
 // BTMAssetID is BTM's asset id, the soul asset of Bytom
@@ -63,9 +57,9 @@ var InitialSeed = &bc.Hash{
 // BTMDefinitionMap is the ....
 var BTMDefinitionMap = map[string]interface{}{
        "name":        BTMAlias,
-       "symbol":      BTMSymbol,
-       "decimals":    BTMDecimals,
-       "description": BTMDescription,
+       "symbol":      BTMAlias,
+       "decimals":    8,
+       "description": `Bytom Official Issue`,
 }
 
 // BlockSubsidy calculate the coinbase rewards on given block height
@@ -91,6 +85,14 @@ type Params struct {
        Bech32HRPSegwit string
 }
 
+var ActiveNetParams = MainNetParams
+
+// NetParams is the correspondence between chain_id and Params
+var NetParams = map[string]Params{
+       "mainnet": MainNetParams,
+       "testnet": TestNetParams,
+}
+
 // MainNetParams is the config for production
 var MainNetParams = Params{
        Name:            "main",