aboutsummaryrefslogtreecommitdiffstats
path: root/params
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-10-31 14:00:13 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:17 +0800
commit0cbf04193ea79661f191cdaaca8f179d8b5db999 (patch)
tree07be18996fb0524204cd4f58567297350fae933a /params
parent0f189998574d54b8e2d64642b6b689f35a09d23a (diff)
downloadgo-tangerine-0cbf04193ea79661f191cdaaca8f179d8b5db999.tar
go-tangerine-0cbf04193ea79661f191cdaaca8f179d8b5db999.tar.gz
go-tangerine-0cbf04193ea79661f191cdaaca8f179d8b5db999.tar.bz2
go-tangerine-0cbf04193ea79661f191cdaaca8f179d8b5db999.tar.lz
go-tangerine-0cbf04193ea79661f191cdaaca8f179d8b5db999.tar.xz
go-tangerine-0cbf04193ea79661f191cdaaca8f179d8b5db999.tar.zst
go-tangerine-0cbf04193ea79661f191cdaaca8f179d8b5db999.zip
dex: add block gas limit into governance
Diffstat (limited to 'params')
-rw-r--r--params/config.go6
-rw-r--r--params/gen_dexcon_config.go6
2 files changed, 11 insertions, 1 deletions
diff --git a/params/config.go b/params/config.go
index 3e9db27f2..11d25f9ef 100644
--- a/params/config.go
+++ b/params/config.go
@@ -55,6 +55,7 @@ var (
GenesisCRSText: "In DEXON, we trust.",
Owner: common.HexToAddress("7C3c31B19395A5e2627F921Cc2802560B71f1caB"),
BlockReward: big.NewInt(1e18),
+ BlockGasLimit: 80000000,
NumChains: 4,
LambdaBA: 250,
LambdaDKG: 2500,
@@ -93,6 +94,7 @@ var (
GenesisCRSText: "In DEXON, we trust.",
Owner: common.HexToAddress("7C3c31B19395A5e2627F921Cc2802560B71f1caB"),
BlockReward: big.NewInt(1e18),
+ BlockGasLimit: 80000000,
NumChains: 4,
LambdaBA: 250,
LambdaDKG: 2500,
@@ -202,6 +204,7 @@ type DexconConfig struct {
GenesisCRSText string `json:"genesisCRSText"`
Owner common.Address `json:"owner"`
BlockReward *big.Int `json:"blockReward"`
+ BlockGasLimit uint64 `json:"blockGasLimit"`
NumChains uint32 `json:"numChains"`
LambdaBA uint64 `json:"lambdaBA"`
LambdaDKG uint64 `json:"lambdaDKG"`
@@ -220,10 +223,11 @@ 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 BlockReward: %v NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v MaxBlockInterval: %v BlockReward: %v",
+ return fmt.Sprintf("{GenesisCRSText: %v Owner: %v BlockReward: %v BlockGasLimit: %v NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v MaxBlockInterval: %v BlockReward: %v",
d.GenesisCRSText,
d.Owner,
d.BlockReward,
+ d.BlockGasLimit,
d.NumChains,
d.LambdaBA,
d.LambdaDKG,
diff --git a/params/gen_dexcon_config.go b/params/gen_dexcon_config.go
index f81951140..f378b4588 100644
--- a/params/gen_dexcon_config.go
+++ b/params/gen_dexcon_config.go
@@ -18,6 +18,7 @@ func (d DexconConfig) MarshalJSON() ([]byte, error) {
GenesisCRSText string `json:"genesisCRSText"`
Owner common.Address `json:"owner"`
BlockReward *math.HexOrDecimal256 `json:"blockReward"`
+ BlockGasLimit uint64 `json:"blockGasLimit"`
NumChains uint32 `json:"numChains"`
LambdaBA uint64 `json:"lambdaBA"`
LambdaDKG uint64 `json:"lambdaDKG"`
@@ -33,6 +34,7 @@ func (d DexconConfig) MarshalJSON() ([]byte, error) {
enc.GenesisCRSText = d.GenesisCRSText
enc.Owner = d.Owner
enc.BlockReward = (*math.HexOrDecimal256)(d.BlockReward)
+ enc.BlockGasLimit = d.BlockGasLimit
enc.NumChains = d.NumChains
enc.LambdaBA = d.LambdaBA
enc.LambdaDKG = d.LambdaDKG
@@ -52,6 +54,7 @@ func (d *DexconConfig) UnmarshalJSON(input []byte) error {
GenesisCRSText *string `json:"genesisCRSText"`
Owner *common.Address `json:"owner"`
BlockReward *math.HexOrDecimal256 `json:"blockReward"`
+ BlockGasLimit *uint64 `json:"blockGasLimit"`
NumChains *uint32 `json:"numChains"`
LambdaBA *uint64 `json:"lambdaBA"`
LambdaDKG *uint64 `json:"lambdaDKG"`
@@ -76,6 +79,9 @@ func (d *DexconConfig) UnmarshalJSON(input []byte) error {
if dec.BlockReward != nil {
d.BlockReward = (*big.Int)(dec.BlockReward)
}
+ if dec.BlockGasLimit != nil {
+ d.BlockGasLimit = *dec.BlockGasLimit
+ }
if dec.NumChains != nil {
d.NumChains = *dec.NumChains
}