Versions in this module Expand all Collapse all v1 v1.0.0 Jul 13, 2019 Changes in this version + const GrpcHost + const GrpcPort + const HeartbeatInterval + const PoWDoubleSha256 + const PoWEthash + const PoWNone + const PoWQkchash + const PoWSimulate + var DefaultNumSlaves = 4 + var QuarkashToJiaozi = big.NewInt(1000000000000000000) + func LoadtestAccounts(genesisDir string) []*account.Account + func UpdateGenesisAlloc(cluserConfig *ClusterConfig) error + type ChainConfig struct + ChainID uint32 + CoinbaseAddress account.Address + CoinbaseAmount *big.Int + ConsensusConfig *POWConfig + ConsensusType string + DefaultChainToken string + DifficultyAdjustmentCutoffTime uint32 + DifficultyAdjustmentFactor uint32 + ExtraShardBlocksInRootBlock uint32 + GasLimitAdjustmentFactor uint32 + GasLimitEmaDenominator uint32 + GasLimitMaximum uint64 + GasLimitMinimum uint64 + GasLimitUsageAdjustmentDenominator uint32 + GasLimitUsageAdjustmentNumerator uint32 + Genesis *ShardGenesis + PoswConfig *POSWConfig + ShardSize uint32 + func NewChainConfig() *ChainConfig + func (c *ChainConfig) MarshalJSON() ([]byte, error) + func (c *ChainConfig) UnmarshalJSON(input []byte) error + type ChainConfigAlias ChainConfig + type ClusterConfig struct + Clean bool + DbPathRoot string + EnableTransactionHistory bool + GenesisDir string + JSONRPCPort uint16 + LogLevel string + Master *MasterConfig + Monitoring *MonitoringConfig + P2P *P2PConfig + P2PPort uint16 + PrivateJSONRPCPort uint16 + Quarkchain *QuarkChainConfig + SimpleNetwork *SimpleNetwork + SlaveList []*SlaveConfig + StartSimulatedMining bool + func NewClusterConfig() *ClusterConfig + func (c *ClusterConfig) GetSlaveConfig(id string) (*SlaveConfig, error) + type GenesisAddress struct + Address string + PrivKey string + type MasterConfig struct + MasterToSlaveConnectRetryDelay float32 + func NewMasterConfig() *MasterConfig + type MonitoringConfig struct + ClusterID string + Errors string + KafkaRestAddress string + MinerTopic string + NetworkName string + PropagationTopic string + func NewMonitoringConfig() *MonitoringConfig + type NetWorkId struct + Mainnet uint32 + TestnetPorsche uint32 + type P2PConfig struct + AllowDialInRatio float32 + BootNodes string + MaxPeers uint64 + PreferredNodes string + PrivKey string + UPnP bool + func NewP2PConfig() *P2PConfig + func (s *P2PConfig) GetBootNodes() []string + type POSWConfig struct + DiffDivider uint32 + Enabled bool + TotalStakePerBlock *big.Int + WindowSize uint32 + func NewPOSWConfig() *POSWConfig + type POWConfig struct + RemoteMine bool + TargetBlockTime uint32 + func NewPOWConfig() *POWConfig + type QuarkChainConfig struct + BlockExtraDataSizeLimit uint32 + ChainSize uint32 + Chains map[uint32]*ChainConfig + GenesisToken string + GuardianPrivateKey []byte + GuardianPublicKey string + MaxNeighbors uint32 + NetworkID uint32 + P2PCommandSizeLimit uint32 + P2PProtocolVersion uint32 + RewardTaxRate *big.Rat + Root *RootConfig + SkipMinorDifficultyCheck bool + SkipRootCoinbaseCheck bool + SkipRootDifficultyCheck bool + TransactionQueueSizeLimitPerShard uint64 + func NewQuarkChainConfig() *QuarkChainConfig + func (q *QuarkChainConfig) GasLimit(fullShardID uint32) (*big.Int, error) + func (q *QuarkChainConfig) GetFullShardIdByFullShardKey(fullShardKey uint32) (uint32, error) + func (q *QuarkChainConfig) GetGenesisRootHeight(fullShardId uint32) uint32 + func (q *QuarkChainConfig) GetGenesisShardIds() []uint32 + func (q *QuarkChainConfig) GetInitializedShardIdsBeforeRootHeight(rootHeight uint32) []uint32 + func (q *QuarkChainConfig) GetShardConfigByFullShardID(fullShardID uint32) *ShardConfig + func (q *QuarkChainConfig) GetShardSizeByChainId(ID uint32) (uint32, error) + func (q *QuarkChainConfig) MarshalJSON() ([]byte, error) + func (q *QuarkChainConfig) SetShardsAndValidate(shards map[uint32]*ShardConfig) + func (q *QuarkChainConfig) UnmarshalJSON(input []byte) error + func (q *QuarkChainConfig) Update(chainSize, shardSizePerChain, rootBlockTime, minorBlockTime uint32) + type QuarkChainConfigAlias QuarkChainConfig + type RootConfig struct + CoinbaseAddress account.Address + CoinbaseAmount *big.Int + ConsensusConfig *POWConfig + ConsensusType string + DifficultyAdjustmentCutoffTime uint32 + DifficultyAdjustmentFactor uint32 + GRPCHost string + GRPCPort uint16 + Genesis *RootGenesis + MaxStaleRootBlockHeightDiff uint64 + func NewRootConfig() *RootConfig + func (r *RootConfig) MarshalJSON() ([]byte, error) + func (r *RootConfig) MaxRootBlocksInMemory() uint64 + func (r *RootConfig) UnmarshalJSON(input []byte) error + type RootConfigAlias RootConfig + type RootGenesis struct + Difficulty uint64 + HashMerkleRoot string + HashPrevBlock string + Height uint32 + Nonce uint32 + Timestamp uint64 + Version uint32 + func NewRootGenesis() *RootGenesis + type ShardConfig struct + ShardID uint32 + func NewShardConfig(chainCfg *ChainConfig) *ShardConfig + func (s *ShardConfig) GetFullShardId() uint32 + func (s *ShardConfig) GetRootConfig() *RootConfig + func (s *ShardConfig) MaxBlocksPerShardInOneRootBlock() uint32 + func (s *ShardConfig) MaxMinorBlocksInMemory() uint64 + func (s *ShardConfig) MaxStaleMinorBlockHeightDiff() uint64 + func (s *ShardConfig) SetRootConfig(value *RootConfig) + type ShardGenesis struct + Alloc map[account.Address]*big.Int + Difficulty uint64 + ExtraData []byte + GasLimit uint64 + HashMerkleRoot string + HashPrevMinorBlock string + Height uint64 + Nonce uint32 + RootHeight uint32 + Timestamp uint64 + Version uint32 + func NewShardGenesis() *ShardGenesis + func (s *ShardGenesis) MarshalJSON() ([]byte, error) + func (s *ShardGenesis) UnmarshalJSON(input []byte) error + type ShardGenesisAlias ShardGenesis + type SimpleNetwork struct + BootstrapHost string + BootstrapPort uint64 + func NewSimpleNetwork() *SimpleNetwork + type SlaveConfig struct + ChainMaskList []*types.ChainMask + ID string + IP string + Port uint16 + func NewDefaultSlaveConfig() *SlaveConfig + func (s *SlaveConfig) MarshalJSON() ([]byte, error) + func (s *SlaveConfig) UnmarshalJSON(input []byte) error + type SlaveConfigAlias SlaveConfig