Merge pull request #82 from XinFinOrg/main-net

Main net
This commit is contained in:
rushabh parmar 2019-04-24 16:30:01 +05:30 committed by GitHub
commit 2454030063
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 20 deletions

View file

@ -122,8 +122,8 @@ func (w *wizard) makeGenesis() {
genesis.Config.XDPoS.Period = uint64(w.readDefaultInt(2)) genesis.Config.XDPoS.Period = uint64(w.readDefaultInt(2))
fmt.Println() 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)) genesis.Config.XDPoS.Reward = uint64(w.readDefaultInt(350))
fmt.Println() fmt.Println()
fmt.Println("Who own the first masternodes? (mandatory)") fmt.Println("Who own the first masternodes? (mandatory)")
@ -231,8 +231,8 @@ func (w *wizard) makeGenesis() {
code, _ = contractBackend.CodeAt(ctx, multiSignWalletAddr, nil) code, _ = contractBackend.CodeAt(ctx, multiSignWalletAddr, nil)
storage = make(map[common.Hash]common.Hash) storage = make(map[common.Hash]common.Hash)
contractBackend.ForEachStorageAt(ctx, multiSignWalletAddr, nil, f) contractBackend.ForEachStorageAt(ctx, multiSignWalletAddr, nil, f)
fBalance := big.NewInt(0) // 16m fBalance := big.NewInt(0) // 3 billion
fBalance.Add(fBalance, big.NewInt(16*1000*1000)) fBalance.Add(fBalance, big.NewInt(3*1000*1000*1000))
fBalance.Mul(fBalance, big.NewInt(1000000000000000000)) fBalance.Mul(fBalance, big.NewInt(1000000000000000000))
genesis.Alloc[common.HexToAddress(common.FoudationAddr)] = core.GenesisAccount{ genesis.Alloc[common.HexToAddress(common.FoudationAddr)] = core.GenesisAccount{
Balance: fBalance, Balance: fBalance,
@ -298,24 +298,24 @@ func (w *wizard) makeGenesis() {
storage = make(map[common.Hash]common.Hash) storage = make(map[common.Hash]common.Hash)
contractBackend.ForEachStorageAt(ctx, multiSignWalletTeamAddr, nil, f) contractBackend.ForEachStorageAt(ctx, multiSignWalletTeamAddr, nil, f)
// Team balance. // Team balance.
balance := big.NewInt(0) // 12m balance := big.NewInt(0) // 20 billion
balance.Add(balance, big.NewInt(12*1000*1000)) balance.Add(balance, big.NewInt(20*1000*1000*1000))
balance.Mul(balance, big.NewInt(1000000000000000000)) balance.Mul(balance, big.NewInt(1000000000000000000))
subBalance := big.NewInt(0) // i * 50k 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*1000))
subBalance.Mul(subBalance, big.NewInt(1000000000000000000)) subBalance.Mul(subBalance, big.NewInt(1000000000000000000))
balance.Sub(balance, subBalance) // 12m - i * 50k balance.Sub(balance, subBalance) // 12m - i * 50k
genesis.Alloc[common.HexToAddress(common.TeamAddr)] = core.GenesisAccount{ genesis.Alloc[common.HexToAddress(common.TeamAddr)] = core.GenesisAccount{
Balance: balance, Balance: balance,
Code: code, Code: code,
Storage: storage, Storage: storage,
} }
fmt.Println() fmt.Println()
fmt.Println("What is swap wallet address for fund 55m XDC?") fmt.Println("What is swap wallet address for fund 14.5Billion XDC?")
swapAddr := *w.readAddress() swapAddr := *w.readAddress()
baseBalance := big.NewInt(0) // 55m baseBalance := big.NewInt(0) // 14.5Billion
baseBalance.Add(baseBalance, big.NewInt(55*1000*1000)) baseBalance.Add(baseBalance, big.NewInt(145*1000*1000*100))
baseBalance.Mul(baseBalance, big.NewInt(1000000000000000000)) baseBalance.Mul(baseBalance, big.NewInt(1000000000000000000))
genesis.Alloc[swapAddr] = core.GenesisAccount{ genesis.Alloc[swapAddr] = core.GenesisAccount{
Balance: baseBalance, Balance: baseBalance,

View file

@ -22,7 +22,7 @@ const (
MinimunMinerBlockPerEpoch = 1 MinimunMinerBlockPerEpoch = 1
) )
var TIP2019Block = big.NewInt(1050000) var TIP2019Block = big.NewInt(1)
var TIPSigning = big.NewInt(3000000) var TIPSigning = big.NewInt(3000000)
var TIPRandomize = big.NewInt(3464000) var TIPRandomize = big.NewInt(3464000)
var IsTestnet bool = false var IsTestnet bool = false

View file

@ -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)) // 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) { // if tx.To() == nil && (tx.Cost().Cmp(minGasDeploySMC) < 0 || tx.GasPrice().Cmp(new(big.Int).SetUint64(10000*params.Shannon)) < 0) {
return ErrMinDeploySMC // return ErrMinDeploySMC
} // }
return nil return nil
} }