aboutsummaryrefslogtreecommitdiffstats
path: root/params
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-04-09 21:32:49 +0800
commit6502e150041903b8b7e9395c27e4d1b115cff379 (patch)
tree194e0d057db5516ddcb20310d0baba9ea9079046 /params
parent9b6a659b4de7c9b1c2f331b880a1397159181600 (diff)
downloadgo-tangerine-6502e150041903b8b7e9395c27e4d1b115cff379.tar
go-tangerine-6502e150041903b8b7e9395c27e4d1b115cff379.tar.gz
go-tangerine-6502e150041903b8b7e9395c27e4d1b115cff379.tar.bz2
go-tangerine-6502e150041903b8b7e9395c27e4d1b115cff379.tar.lz
go-tangerine-6502e150041903b8b7e9395c27e4d1b115cff379.tar.xz
go-tangerine-6502e150041903b8b7e9395c27e4d1b115cff379.tar.zst
go-tangerine-6502e150041903b8b7e9395c27e4d1b115cff379.zip
core: populate dexon configuration in SetupGenesisBlock
Diffstat (limited to 'params')
-rw-r--r--params/config.go28
1 files changed, 24 insertions, 4 deletions
diff --git a/params/config.go b/params/config.go
index b10a47004..0c64fb6bf 100644
--- a/params/config.go
+++ b/params/config.go
@@ -45,7 +45,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.
@@ -219,12 +219,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.