diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-02-22 13:14:55 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:22 +0800 |
commit | 2354d4aa747616a8fd4fb9482ada8042fd362139 (patch) | |
tree | 46fe0953c0258591c2cd415c3760764ff613a5bb /params/config.go | |
parent | 81193a683d6328b627ee0e5f0f3689b3473e29ea (diff) | |
download | go-tangerine-2354d4aa747616a8fd4fb9482ada8042fd362139.tar.gz go-tangerine-2354d4aa747616a8fd4fb9482ada8042fd362139.tar.zst go-tangerine-2354d4aa747616a8fd4fb9482ada8042fd362139.zip |
core: Remove K, Phi and NumChains from Governance (#198)
* change default sync_core.sh
* vendor: sync to latest core
* core: Remove K, Phi and NumChain
Diffstat (limited to 'params/config.go')
-rw-r--r-- | params/config.go | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/params/config.go b/params/config.go index a1881ecb7..c109e6ac7 100644 --- a/params/config.go +++ b/params/config.go @@ -26,8 +26,8 @@ import ( // Genesis hashes to enforce below configs on. var ( - MainnetGenesisHash = common.HexToHash("0xe972af2797b02f4dab95ffa229714c35d5c55685f20261b9498c8b8a3fe33856") - TestnetGenesisHash = common.HexToHash("0x9fab095bee4b3dc7dcde324beb6c791bc21025a33d50793ed995d8ef1739f35b") + MainnetGenesisHash = common.HexToHash("0x09fd8e9d8db083831e0793a41643721d5becc0f9742b5344021a06b20b5a7fed") + TestnetGenesisHash = common.HexToHash("0x713fca1f1a31ad516f05945ae9bc1455c39d442db57c9f3c85ee593cc40ea239") ) // TrustedCheckpoints associates each known checkpoint with the genesis hash of @@ -61,14 +61,11 @@ var ( NextHalvingSupply: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(2.5e9)), LastHalvedAmount: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1.5e9)), BlockGasLimit: 40000000, - NumChains: 6, LambdaBA: 250, LambdaDKG: 2500, - K: 0, - PhiRatio: 0.667, NotarySetSize: 4, DKGSetSize: 4, - RoundInterval: 600000, + RoundLength: 600, MinBlockInterval: 1000, FineValues: []*big.Int{ new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e4)), @@ -109,14 +106,11 @@ var ( NextHalvingSupply: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(2e7)), LastHalvedAmount: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(4e6)), BlockGasLimit: 40000000, - NumChains: 4, LambdaBA: 250, LambdaDKG: 10000, - K: 0, - PhiRatio: 0.667, NotarySetSize: 4, DKGSetSize: 4, - RoundInterval: 1200000, + RoundLength: 1200, MinBlockInterval: 1000, FineValues: []*big.Int{ new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e4)), @@ -148,14 +142,11 @@ var ( NextHalvingSupply: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(2e7)), LastHalvedAmount: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(4e6)), BlockGasLimit: 40000000, - NumChains: 4, LambdaBA: 250, LambdaDKG: 10000, - K: 0, - PhiRatio: 0.667, NotarySetSize: 4, DKGSetSize: 4, - RoundInterval: 1200000, + RoundLength: 1200000, MinBlockInterval: 1000, FineValues: []*big.Int{ new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e4)), @@ -301,14 +292,11 @@ type DexconConfig struct { NextHalvingSupply *big.Int `json:"nextHalvingSupply"` LastHalvedAmount *big.Int `json:"lastHalvedAmount"` BlockGasLimit uint64 `json:"blockGasLimit"` - NumChains uint32 `json:"numChains"` LambdaBA uint64 `json:"lambdaBA"` LambdaDKG uint64 `json:"lambdaDKG"` - K uint32 `json:"k"` - PhiRatio float32 `json:"phiRatio"` NotarySetSize uint32 `json:"notarySetSize"` DKGSetSize uint32 `json:"dkgSetSize"` - RoundInterval uint64 `json:"roundInterval"` + RoundLength uint64 `json:"roundLength"` MinBlockInterval uint64 `json:"minBlockInterval"` FineValues []*big.Int `json:"fineValues"` } @@ -322,7 +310,7 @@ type dexconConfigSpecMarshaling struct { // String implements the stringer interface, returning the consensus engine details. func (d *DexconConfig) String() string { - return fmt.Sprintf("{GenesisCRSText: %v Owner: %v MinStake: %v LockupPeriod: %v MiningVelocity: %v NextHalvingSupply: %v LastHalvedAmount: %v BlockGasLimit: %v NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v FineValues: %v}", + return fmt.Sprintf("{GenesisCRSText: %v Owner: %v MinStake: %v LockupPeriod: %v MiningVelocity: %v NextHalvingSupply: %v LastHalvedAmount: %v BlockGasLimit: %v LambdaBA: %v LambdaDKG: %v NotarySetSize: %v DKGSetSize: %v RoundLength: %v MinBlockInterval: %v FineValues: %v}", d.GenesisCRSText, d.Owner, d.MinStake, @@ -331,14 +319,11 @@ func (d *DexconConfig) String() string { d.NextHalvingSupply, d.LastHalvedAmount, d.BlockGasLimit, - d.NumChains, d.LambdaBA, d.LambdaDKG, - d.K, - d.PhiRatio, d.NotarySetSize, d.DKGSetSize, - d.RoundInterval, + d.RoundLength, d.MinBlockInterval, d.FineValues, ) |