diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-11 17:04:08 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | 09f36aa74abce5a14a3b289f9f7ae18346a106e3 (patch) | |
tree | 265c798d6a114e888ac4521aaf2050bb86f370bd /params | |
parent | 92bb88eee90bc2e5aca19c9aedc618652f834c81 (diff) | |
download | dexon-09f36aa74abce5a14a3b289f9f7ae18346a106e3.tar dexon-09f36aa74abce5a14a3b289f9f7ae18346a106e3.tar.gz dexon-09f36aa74abce5a14a3b289f9f7ae18346a106e3.tar.bz2 dexon-09f36aa74abce5a14a3b289f9f7ae18346a106e3.tar.lz dexon-09f36aa74abce5a14a3b289f9f7ae18346a106e3.tar.xz dexon-09f36aa74abce5a14a3b289f9f7ae18346a106e3.tar.zst dexon-09f36aa74abce5a14a3b289f9f7ae18346a106e3.zip |
core: populate dexon configuration in SetupGenesisBlock
Diffstat (limited to 'params')
-rw-r--r-- | params/config.go | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/params/config.go b/params/config.go index e84fc6350..7e5d99f28 100644 --- a/params/config.go +++ b/params/config.go @@ -43,7 +43,7 @@ var ( EIP158Block: big.NewInt(2675000), ByzantiumBlock: big.NewInt(4370000), ConstantinopleBlock: big.NewInt(7080000), - Ethash: new(EthashConfig), + Dexcon: &DexconConfig{}, } // MainnetTrustedCheckpoint contains the light client trusted checkpoint for the main network. @@ -186,12 +186,32 @@ func (c *CliqueConfig) String() string { // DexconConfig is the consensus engine configs for DEXON consensus. type DexconConfig struct { - GovernanceContractAddress string + NumChains uint32 `json:"numChains"` + LambdaBA uint64 `json:"lambdaBA"` + LambdaDKG uint64 `json:"lambdaDKG"` + K int `json:"k"` + PhiRatio float32 `json:"phiRatio"` + NotarySetSize uint32 `json:"notarySetSize"` + DKGSetSize uint32 `json:"dkgSetSize"` + RoundInterval uint64 `json:"roundInterval"` + MinBlockInterval uint64 `json:"minBlockInterval"` + MaxBlockInterval uint64 `json:"maxBlockInterval"` } // String implements the stringer interface, returning the consensus engine details. -func (c *DexconConfig) String() string { - return "dexcon" +func (d *DexconConfig) String() string { + return fmt.Sprintf("{NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v MaxBlockInterval: %v", + d.NumChains, + d.LambdaBA, + d.LambdaDKG, + d.K, + d.PhiRatio, + d.NotarySetSize, + d.DKGSetSize, + d.RoundInterval, + d.MinBlockInterval, + d.MaxBlockInterval, + ) } // String implements the fmt.Stringer interface. |