aboutsummaryrefslogtreecommitdiffstats
path: root/params/config.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-11 17:04:08 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commit2720479e78c0f4a61a958f73199bedf4b8ce6313 (patch)
tree3b5b37d29fc57bd59f6d09867428611a9e015eae /params/config.go
parent3e3089a27d917f4bb1327c5e8b5892927d2c7cfb (diff)
downloaddexon-2720479e78c0f4a61a958f73199bedf4b8ce6313.tar
dexon-2720479e78c0f4a61a958f73199bedf4b8ce6313.tar.gz
dexon-2720479e78c0f4a61a958f73199bedf4b8ce6313.tar.bz2
dexon-2720479e78c0f4a61a958f73199bedf4b8ce6313.tar.lz
dexon-2720479e78c0f4a61a958f73199bedf4b8ce6313.tar.xz
dexon-2720479e78c0f4a61a958f73199bedf4b8ce6313.tar.zst
dexon-2720479e78c0f4a61a958f73199bedf4b8ce6313.zip
core: populate dexon configuration in SetupGenesisBlock
Diffstat (limited to 'params/config.go')
-rw-r--r--params/config.go28
1 files changed, 24 insertions, 4 deletions
diff --git a/params/config.go b/params/config.go
index 3e938d661..901a93a9f 100644
--- a/params/config.go
+++ b/params/config.go
@@ -44,7 +44,7 @@ var (
ByzantiumBlock: big.NewInt(4370000),
ConstantinopleBlock: big.NewInt(7280000),
PetersburgBlock: big.NewInt(7280000),
- Ethash: new(EthashConfig),
+ Dexcon: &DexconConfig{},
}
// MainnetTrustedCheckpoint contains the light client trusted checkpoint for the main network.
@@ -218,12 +218,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.