aboutsummaryrefslogtreecommitdiffstats
path: root/params/config.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-12-18 20:25:58 +0800
committerWei-Ning Huang <w@dexon.org>2018-12-19 20:54:27 +0800
commitcdc9c57f0bebe2c38e9cd3f77ae445f5701086fa (patch)
treea65e162dde04660f625f9e7b9194c93c4a134801 /params/config.go
parent9ba7171a5b018a5365240c32acf8cbb9a438cd8e (diff)
downloaddexon-cdc9c57f0bebe2c38e9cd3f77ae445f5701086fa.tar.gz
dexon-cdc9c57f0bebe2c38e9cd3f77ae445f5701086fa.tar.zst
dexon-cdc9c57f0bebe2c38e9cd3f77ae445f5701086fa.zip
core: vm: add undelegate fund lockup mechanism (#94)
Only allow a user to withdraw funds after a certain lockup period. This way, the fund of a bad actor could be confiscated before he could escape.
Diffstat (limited to 'params/config.go')
-rw-r--r--params/config.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/params/config.go b/params/config.go
index 22a4d1e7e..3b12b6101 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("0xc8e4d0c33d92b7751fe3747f778aa27600508c8c922be1dbbc7db6ee967f4e6c")
- TestnetGenesisHash = common.HexToHash("0x63b758fa30bf833430171514448288d4e67c1d6a989d1474fdd5c5888dfe77fd")
+ MainnetGenesisHash = common.HexToHash("0x5fc1fdb2eca492d256600c0d96a2ca7bdfd9412ac8557bcab54e05332260e26b")
+ TestnetGenesisHash = common.HexToHash("0x252c41c125e4a9137a39a20b810ddcd33a8023c407cac863ad2326a521375d0f")
)
// TODO(jimmy): Add DMoment in the config.
@@ -48,6 +48,7 @@ var (
GenesisCRSText: "In DEXON, we trust.",
Owner: common.HexToAddress("BF8C48A620bacc46907f9B89732D25E47A2D7Cf7"),
MinStake: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e5)),
+ LockupPeriod: 86400 * 3 * 1000,
BlockReward: big.NewInt(1e18),
BlockGasLimit: 40000000,
NumChains: 4,
@@ -86,6 +87,7 @@ var (
GenesisCRSText: "In DEXON, we trust.",
Owner: common.HexToAddress("BF8C48A620bacc46907f9B89732D25E47A2D7Cf7"),
MinStake: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e5)),
+ LockupPeriod: 86400 * 3 * 1000,
BlockReward: big.NewInt(1e18),
BlockGasLimit: 40000000,
NumChains: 6,
@@ -115,6 +117,7 @@ var (
GenesisCRSText: "In DEXON, we trust.",
Owner: common.HexToAddress("BF8C48A620bacc46907f9B89732D25E47A2D7Cf7"),
MinStake: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e5)),
+ LockupPeriod: 86400 * 3 * 1000,
BlockReward: big.NewInt(1e18),
BlockGasLimit: 40000000,
NumChains: 6,
@@ -256,6 +259,7 @@ type DexconConfig struct {
GenesisCRSText string `json:"genesisCRSText"`
Owner common.Address `json:"owner"`
MinStake *big.Int `json:"minStake"`
+ LockupPeriod uint64 `json:"lockupPeriod"`
BlockReward *big.Int `json:"blockReward"`
BlockGasLimit uint64 `json:"blockGasLimit"`
NumChains uint32 `json:"numChains"`
@@ -276,10 +280,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 MinStake: %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}",
d.GenesisCRSText,
d.Owner,
d.MinStake,
+ d.LockupPeriod,
d.BlockReward,
d.BlockGasLimit,
d.NumChains,