"encoding/binary"
"fmt"
- "github.com/vapor/protocol/bc"
+ "github.com/bytom/vapor/protocol/bc"
)
// basic constant
Subsidy uint64
}
+// MovRewardProgram is a reward address corresponding to the range of the specified block height when matching transactions
+type MovRewardProgram struct {
+ BeginBlock uint64
+ EndBlock uint64
+ Program string
+}
+
// Params store the config for different network
type Params struct {
// Name defines a human-readable identifier for the network.
ProducerSubsidys []ProducerSubsidy
SoftForkPoint map[uint64]uint64
+
+ // Mov will only start when the block height is greater than this value
+ MovStartHeight uint64
+
+ // Used to receive rewards for matching transactions
+ MovRewardPrograms []MovRewardProgram
}
// ActiveNetParams is the active NetParams
ProducerSubsidys: []ProducerSubsidy{
{BeginBlock: 1, EndBlock: 63072000, Subsidy: 9512938},
},
- SoftForkPoint: map[uint64]uint64{SoftFork001: 10461600},
+ SoftForkPoint: map[uint64]uint64{SoftFork001: 10461600},
+ MovStartHeight: 43354800,
+ MovRewardPrograms: []MovRewardProgram{
+ {
+ BeginBlock: 1,
+ EndBlock: 126144000,
+ Program: "00141d00f85e220e35a23282cfc7f91fe7b34bf6dc18",
+ },
+ },
}
// TestNetParams is the config for vapor-testnet
DNSSeeds: []string{"www.testnetseed.vapor.io"},
BasicConfig: BasicConfig{
MaxBlockGas: uint64(10000000),
- MaxGasAmount: int64(200000),
+ MaxGasAmount: int64(640000),
DefaultGasCredit: int64(160000),
StorageGasRate: int64(1),
VMGasRate: int64(200),
- VotePendingBlockNumber: uint64(10000),
- CoinbasePendingBlockNumber: uint64(1200),
+ VotePendingBlockNumber: uint64(3456000),
+ CoinbasePendingBlockNumber: uint64(7200),
CoinbaseArbitrarySizeLimit: 128,
},
DPOSConfig: DPOSConfig{
return &Params{Bech32HRPSegwit: bech32HRPSegwit}
}
+// InitActiveNetParams load the config by chain ID
func InitActiveNetParams(chainID string) error {
var exist bool
if ActiveNetParams, exist = NetParams[chainID]; !exist {