From 4adc9c0fdcb0c7abc1107ddc036551b0d70ccf82 Mon Sep 17 00:00:00 2001 From: Anil Chinchawale Date: Mon, 1 Apr 2019 14:33:59 +0530 Subject: [PATCH 1/7] Update tx_pool.go --- core/tx_pool.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/tx_pool.go b/core/tx_pool.go index 3d7be4c11d..2a66d9c2a1 100644 --- a/core/tx_pool.go +++ b/core/tx_pool.go @@ -630,10 +630,10 @@ func (pool *TxPool) validateTx(tx *types.Transaction, local bool) error { } } - minGasDeploySMC := new(big.Int).Mul(new(big.Int).SetUint64(10), new(big.Int).SetUint64(params.Ether)) - if tx.To() == nil && (tx.Cost().Cmp(minGasDeploySMC) < 0 || tx.GasPrice().Cmp(new(big.Int).SetUint64(10000*params.Shannon)) < 0) { - return ErrMinDeploySMC - } + // minGasDeploySMC := new(big.Int).Mul(new(big.Int).SetUint64(10), new(big.Int).SetUint64(params.Ether)) + // if tx.To() == nil && (tx.Cost().Cmp(minGasDeploySMC) < 0 || tx.GasPrice().Cmp(new(big.Int).SetUint64(10000*params.Shannon)) < 0) { + // return ErrMinDeploySMC + // } return nil } From f1a9ceae5447d91cba4ffd64b2754a6aaa246131 Mon Sep 17 00:00:00 2001 From: parmarrushabh Date: Thu, 18 Apr 2019 12:10:42 +0530 Subject: [PATCH 2/7] change in params for swap wallet) --- cmd/puppeth/wizard_genesis.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index daf6d27022..987a71ad7b 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -312,10 +312,10 @@ func (w *wizard) makeGenesis() { } fmt.Println() - fmt.Println("What is swap wallet address for fund 55m XDC?") + fmt.Println("What is swap wallet address for fund 37.5Billion XDC?") swapAddr := *w.readAddress() - baseBalance := big.NewInt(0) // 55m - baseBalance.Add(baseBalance, big.NewInt(55*1000*1000)) + baseBalance := big.NewInt(0) // 37.5Billion + baseBalance.Add(baseBalance, big.NewInt(375*1000*1000*100)) baseBalance.Mul(baseBalance, big.NewInt(1000000000000000000)) genesis.Alloc[swapAddr] = core.GenesisAccount{ Balance: baseBalance, From 3f5196c0564810d5dc8e917fcefffc726a518833 Mon Sep 17 00:00:00 2001 From: parmarrushabh Date: Mon, 22 Apr 2019 14:26:50 +0530 Subject: [PATCH 3/7] Added new hard coded reward --- cmd/puppeth/wizard_genesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index 987a71ad7b..3c2dfbe0fe 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -122,7 +122,7 @@ func (w *wizard) makeGenesis() { genesis.Config.XDPoS.Period = uint64(w.readDefaultInt(2)) fmt.Println() - fmt.Println("How many XDC should be rewarded to masternode? (default = 100)") + fmt.Println("How many XDC should be rewarded to masternode? (default = 350)") genesis.Config.XDPoS.Reward = uint64(w.readDefaultInt(100)) fmt.Println() From 44e1e35a0f375a1bea68553853051a4648676b09 Mon Sep 17 00:00:00 2001 From: parmarrushabh Date: Mon, 22 Apr 2019 18:03:59 +0530 Subject: [PATCH 4/7] changes in params due to large data --- common/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/constants.go b/common/constants.go index 8d755d2e7d..a870e07de0 100644 --- a/common/constants.go +++ b/common/constants.go @@ -22,7 +22,7 @@ const ( MinimunMinerBlockPerEpoch = 1 ) -var TIP2019Block = big.NewInt(1050000) +var TIP2019Block = big.NewInt(1) var TIPSigning = big.NewInt(3000000) var IsTestnet bool = false var StoreRewardFolder string From a5325f346f07f628e76c08062601f414cb78aa85 Mon Sep 17 00:00:00 2001 From: parmarrushabh Date: Tue, 23 Apr 2019 11:15:00 +0530 Subject: [PATCH 5/7] changes in foundation wallet address) --- cmd/puppeth/wizard_genesis.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index 3c2dfbe0fe..dd2e55e298 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -232,7 +232,7 @@ func (w *wizard) makeGenesis() { storage = make(map[common.Hash]common.Hash) contractBackend.ForEachStorageAt(ctx, multiSignWalletAddr, nil, f) fBalance := big.NewInt(0) // 16m - fBalance.Add(fBalance, big.NewInt(16*1000*1000)) + fBalance.Add(fBalance, big.NewInt(10*0)) fBalance.Mul(fBalance, big.NewInt(1000000000000000000)) genesis.Alloc[common.HexToAddress(common.FoudationAddr)] = core.GenesisAccount{ Balance: fBalance, @@ -299,10 +299,10 @@ func (w *wizard) makeGenesis() { contractBackend.ForEachStorageAt(ctx, multiSignWalletTeamAddr, nil, f) // Team balance. balance := big.NewInt(0) // 12m - balance.Add(balance, big.NewInt(12*1000*1000)) + balance.Add(balance, big.NewInt(12*0)) balance.Mul(balance, big.NewInt(1000000000000000000)) subBalance := big.NewInt(0) // i * 50k - subBalance.Add(subBalance, big.NewInt(int64(len(signers))*50*1000)) + subBalance.Add(subBalance, big.NewInt(int64(len(signers))*50*0)) subBalance.Mul(subBalance, big.NewInt(1000000000000000000)) balance.Sub(balance, subBalance) // 12m - i * 50k genesis.Alloc[common.HexToAddress(common.TeamAddr)] = core.GenesisAccount{ From 51298b5264efe857979d7fa0d68b14660f0188c6 Mon Sep 17 00:00:00 2001 From: parmarrushabh Date: Tue, 23 Apr 2019 12:03:31 +0530 Subject: [PATCH 6/7] default balance 350 --- cmd/puppeth/wizard_genesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index dd2e55e298..12fce8ebda 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -123,7 +123,7 @@ func (w *wizard) makeGenesis() { fmt.Println() fmt.Println("How many XDC should be rewarded to masternode? (default = 350)") - genesis.Config.XDPoS.Reward = uint64(w.readDefaultInt(100)) + genesis.Config.XDPoS.Reward = uint64(w.readDefaultInt(350)) fmt.Println() fmt.Println("Who own the first masternodes? (mandatory)") From 384f548c773d84236e1bcaa2300be6383a84c18d Mon Sep 17 00:00:00 2001 From: parmarrushabh Date: Tue, 23 Apr 2019 18:15:19 +0530 Subject: [PATCH 7/7] Added new Params --- cmd/puppeth/wizard_genesis.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/cmd/puppeth/wizard_genesis.go b/cmd/puppeth/wizard_genesis.go index 12fce8ebda..d8bb199a50 100644 --- a/cmd/puppeth/wizard_genesis.go +++ b/cmd/puppeth/wizard_genesis.go @@ -231,8 +231,8 @@ func (w *wizard) makeGenesis() { code, _ = contractBackend.CodeAt(ctx, multiSignWalletAddr, nil) storage = make(map[common.Hash]common.Hash) contractBackend.ForEachStorageAt(ctx, multiSignWalletAddr, nil, f) - fBalance := big.NewInt(0) // 16m - fBalance.Add(fBalance, big.NewInt(10*0)) + fBalance := big.NewInt(0) // 3 billion + fBalance.Add(fBalance, big.NewInt(3*1000*1000*1000)) fBalance.Mul(fBalance, big.NewInt(1000000000000000000)) genesis.Alloc[common.HexToAddress(common.FoudationAddr)] = core.GenesisAccount{ Balance: fBalance, @@ -298,24 +298,24 @@ func (w *wizard) makeGenesis() { storage = make(map[common.Hash]common.Hash) contractBackend.ForEachStorageAt(ctx, multiSignWalletTeamAddr, nil, f) // Team balance. - balance := big.NewInt(0) // 12m - balance.Add(balance, big.NewInt(12*0)) - balance.Mul(balance, big.NewInt(1000000000000000000)) - subBalance := big.NewInt(0) // i * 50k - subBalance.Add(subBalance, big.NewInt(int64(len(signers))*50*0)) - subBalance.Mul(subBalance, big.NewInt(1000000000000000000)) - balance.Sub(balance, subBalance) // 12m - i * 50k - genesis.Alloc[common.HexToAddress(common.TeamAddr)] = core.GenesisAccount{ + balance := big.NewInt(0) // 20 billion + balance.Add(balance, big.NewInt(20*1000*1000*1000)) + balance.Mul(balance, big.NewInt(1000000000000000000)) + subBalance := big.NewInt(0) // i * 50k + subBalance.Add(subBalance, big.NewInt(int64(len(signers))*50*1000)) + subBalance.Mul(subBalance, big.NewInt(1000000000000000000)) + balance.Sub(balance, subBalance) // 12m - i * 50k + genesis.Alloc[common.HexToAddress(common.TeamAddr)] = core.GenesisAccount{ Balance: balance, Code: code, Storage: storage, } fmt.Println() - fmt.Println("What is swap wallet address for fund 37.5Billion XDC?") + fmt.Println("What is swap wallet address for fund 14.5Billion XDC?") swapAddr := *w.readAddress() - baseBalance := big.NewInt(0) // 37.5Billion - baseBalance.Add(baseBalance, big.NewInt(375*1000*1000*100)) + baseBalance := big.NewInt(0) // 14.5Billion + baseBalance.Add(baseBalance, big.NewInt(145*1000*1000*100)) baseBalance.Mul(baseBalance, big.NewInt(1000000000000000000)) genesis.Alloc[swapAddr] = core.GenesisAccount{ Balance: baseBalance,