diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-01-06 23:21:54 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-01-14 15:26:26 +0800 |
commit | 9784978baf9bcc04515ce19302b52392b8e2ab0b (patch) | |
tree | c11d088c3e5572ce3c8fc556cf007b8e495e4186 /params/config.go | |
parent | 5c62912be828cf1a480f51e78213c3bfcfda2295 (diff) | |
download | dexon-9784978baf9bcc04515ce19302b52392b8e2ab0b.tar dexon-9784978baf9bcc04515ce19302b52392b8e2ab0b.tar.gz dexon-9784978baf9bcc04515ce19302b52392b8e2ab0b.tar.bz2 dexon-9784978baf9bcc04515ce19302b52392b8e2ab0b.tar.lz dexon-9784978baf9bcc04515ce19302b52392b8e2ab0b.tar.xz dexon-9784978baf9bcc04515ce19302b52392b8e2ab0b.tar.zst dexon-9784978baf9bcc04515ce19302b52392b8e2ab0b.zip |
core: vm: implement byzantine reporting mechanism (#128)
Diffstat (limited to 'params/config.go')
-rw-r--r-- | params/config.go | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/params/config.go b/params/config.go index 103677ece..87874beb4 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("0xf0510808109583b9ef62f846886179f2fb40d1d4f1872d33529947bdd03e9bc1") - TestnetGenesisHash = common.HexToHash("0x3e14e72125f46254853814b6e9f0b79d296e16b1d60d312516002bf8cfad62f8") + MainnetGenesisHash = common.HexToHash("0x81abe3e66f63afe3806b64e7529d2a3f2ae9be7ba3e6fca2a561808bf7875a03") + TestnetGenesisHash = common.HexToHash("0x3fe7a48aca63addc5e502fe60a37a865b454c649e106d07d3cd810e086e1fc6d") ) // TODO(jimmy): Add DMoment in the config. @@ -60,6 +60,11 @@ var ( DKGSetSize: 4, RoundInterval: 600000, MinBlockInterval: 900, + FineValues: []*big.Int{ + new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e4)), + new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e4)), + new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e5)), + }, }, } @@ -99,6 +104,11 @@ var ( DKGSetSize: 4, RoundInterval: 600000, MinBlockInterval: 900, + FineValues: []*big.Int{ + new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e4)), + new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e4)), + new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e5)), + }, }, } @@ -129,6 +139,11 @@ var ( DKGSetSize: 13, RoundInterval: 3600000, MinBlockInterval: 900, + FineValues: []*big.Int{ + new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e4)), + new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e4)), + new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e5)), + }, }, } @@ -271,16 +286,18 @@ type DexconConfig struct { DKGSetSize uint32 `json:"dkgSetSize"` RoundInterval uint64 `json:"roundInterval"` MinBlockInterval uint64 `json:"minBlockInterval"` + FineValues []*big.Int `json:"fineValues"` } type dexconConfigSpecMarshaling struct { MinStake *math.HexOrDecimal256 BlockReward *math.HexOrDecimal256 + FineValues []*math.HexOrDecimal256 } // 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 BlockReward: %v BlockGasLimit: %v NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v}", + return fmt.Sprintf("{GenesisCRSText: %v Owner: %v MinStake: %v LockupPeriod: %v BlockReward: %v BlockGasLimit: %v NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v FineValues: %v}", d.GenesisCRSText, d.Owner, d.MinStake, @@ -296,6 +313,7 @@ func (d *DexconConfig) String() string { d.DKGSetSize, d.RoundInterval, d.MinBlockInterval, + d.FineValues, ) } |