Documentation ¶
Overview ¶
Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Copyright (c) 2018-2019 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Index ¶
- Constants
- Variables
- func PublishEvent(aim EventCode, data interface{}) error
- func ReturnBroadCastType() (bType map[string]bool)
- func SubscribeEvent(aim EventCode, ch interface{}) (event.Subscription, error)
- type Alternative
- type BCIntervalInfo
- func (info *BCIntervalInfo) GetBackupEnableNumber() uint64
- func (info *BCIntervalInfo) GetBroadcastInterval() uint64
- func (info *BCIntervalInfo) GetLastBroadcastNumber() uint64
- func (info *BCIntervalInfo) GetLastReElectionNumber() uint64
- func (info *BCIntervalInfo) GetNextBroadcastNumber(number uint64) uint64
- func (info *BCIntervalInfo) GetNextReElectionNumber(number uint64) uint64
- func (info *BCIntervalInfo) GetReElectionInterval() uint64
- func (info *BCIntervalInfo) IsBroadcastNumber(number uint64) bool
- func (info *BCIntervalInfo) IsReElectionNumber(number uint64) bool
- func (info *BCIntervalInfo) SetBackupBCInterval(interval uint64, enableNumber uint64)
- func (info *BCIntervalInfo) SetLastBCNumber(number uint64)
- func (info *BCIntervalInfo) SetLastReelectNumber(number uint64)
- func (info *BCIntervalInfo) UsingBackupInterval()
- type BlkRewardCfg
- type BlockData
- type BlockGenor_BroadcastMiningReqMsg
- type BlockLocalVerifyOK
- type BlockPOSFinishedNotify
- type BlockProduceSlashBlackList
- type BlockProduceSlashCfg
- type BlockProduceSlashStatsStatus
- type BlockProduceStats
- type BlockToBucket
- type BlockToLinker
- type BroadCastEvent
- type Center
- type ConsensusTurnInfo
- type DepositDetail
- type ElectConfigInfo
- type ElectConfigInfo_All
- type ElectGenTimeStruct
- type ElectGraph
- type ElectMinerNumStruct
- type ElectNodeInfo
- type ElectOnlineStatus
- type ElectWhiteListSwitcher
- type ElectionEvent
- type EntrustInfo
- type EventCode
- type EveryBlockSeedRspMsg
- type HD_BlkConsensusReqMsg
- type HD_BlockInsertNotify
- type HD_BroadcastMiningRspMsg
- type HD_ConsensusVote
- type HD_FullBlockReqMsg
- type HD_FullBlockRspMsg
- type HD_MiningReqMsg
- type HD_MiningRspMsg
- type HD_OnlineConsensusReqs
- type HD_OnlineConsensusVoteResultMsg
- type HD_OnlineConsensusVotes
- type HD_ReelectBroadcastMsg
- type HD_ReelectBroadcastRspMsg
- type HD_ReelectInquiryReqMsg
- type HD_ReelectInquiryRspMsg
- type HD_ReelectLeaderConsensus
- type HD_ReelectLeaderReqMsg
- type HdRev
- type InterestCfg
- type LeaderChangeNotify
- type LeaderConfig
- type LeaderStateMsg
- type LocalBlockVerifyConsensusReq
- type LotteryCfg
- type LotteryFrom
- type LotteryInfo
- type MasterMinerReElectionReqMsg
- type MasterMinerReElectionRsp
- type MasterMinerReElectionRspMsg
- type MasterValidatorReElectionReqMsg
- type MasterValidatorReElectionRspMsg
- type MasterValidatorReElectionRsq
- type MinerOutReward
- type NewBlockReadyMsg
- type OnlineConsensusReq
- type OnlineState
- type PreBroadStateRoot
- type RandomInfoStruct
- type RandomRequest
- type RecoveryStateMsg
- type RecoveryType
- type ReelectRSPType
- type RewardRateCfg
- type RoleUpdatedMsg
- type SlashCfg
- type SortVIPConfig
- type SuperBlkCfg
- type SyncIdEvent
- type TopologyGraph
- func (self *TopologyGraph) AccountIsInGraph(account common.Address) bool
- func (self *TopologyGraph) CheckAccountRole(account common.Address, role common.RoleType) bool
- func (self *TopologyGraph) FindNextValidator(account common.Address) common.Address
- func (self *TopologyGraph) Transfer2NextGraph(number uint64, blockTopology *common.NetTopology) (*TopologyGraph, error)
- type TopologyNodeInfo
- type TxsRewardCfg
- type UserBlockProduceNum
- type UserBlockProduceSlash
- type VIPConfig
- type VrfMsg
Constants ¶
const ( MSKeyVersionInfo = "version_info" // 版本信息 MSKeyBroadcastTx = "broad_txs" // 广播交易 MSKeyTopologyGraph = "topology_graph" // 拓扑图 MSKeyElectGraph = "elect_graph" // 选举图 MSKeyElectOnlineState = "elect_state" // 选举节点在线信息 //通用 MSKeyBroadcastInterval = "broad_interval" // 广播区块周期 MSKeyElectGenTime = "elect_gen_time" // 选举生成时间 MSKeyElectMinerNum = "elect_miner_num" // 选举矿工数量 MSKeyElectConfigInfo = "elect_details_info" // 选举配置 MSKeyElectBlackList = "elect_black_list" // 选举黑名单 MSKeyElectWhiteList = "elect_white_list" // 选举白名单 MSKeyElectWhiteListSwitcher = "elect_white_list_switcher" // 选举白名单生效开关 MSKeyAccountBroadcasts = "account_broadcasts" // 广播账户 []common.Address MSKeyAccountInnerMiners = "account_inner_miners" // 基金会矿工 []common.Address MSKeyAccountFoundation = "account_foundation" // 基金会账户 common.Address MSKeyAccountVersionSupers = "account_version_supers" // 版本签名账户 []common.Address MSKeyAccountBlockSupers = "account_block_supers" // 超级区块签名账户 []common.Address MSKeyAccountMultiCoinSupers = "account_multicoin_supers" // 超级多币种签名账户 []common.Address MSKeyAccountSubChainSupers = "account_subchain_supers" // 子链签名账户 []common.Address MSKeyVIPConfig = "vip_config" // VIP配置信息 MSKeyPreBroadcastRoot = "pre_broadcast_Root" // 前广播区块root信息 MSKeyLeaderConfig = "leader_config" // leader服务配置信息 MSKeyMinHash = "pre_100_min_hash" // 最小hash MSKeySuperBlockCfg = "super_block_config" // 超级区块配置 //奖励配置 MSKeyBlkRewardCfg = "blk_reward" // 区块奖励配置 MSKeyTxsRewardCfg = "txs_reward" // 交易奖励配置 MSKeyInterestCfg = "interest_reward" // 利息配置 MSKeyLotteryCfg = "lottery_reward" // 彩票配置 MSKeySlashCfg = "slash_reward" // 惩罚配置 MSKeyPreMinerBlkReward = "preMiner_blkreward" // 上一矿工区块奖励金额 MSKeyPreMinerTxsReward = "preMiner_txsreward" // 上一矿工交易奖励金额 MSKeyUpTimeNum = "upTime_num" // upTime状态 MSKeyLotteryNum = "lottery_num" // 彩票状态 MSKeyLotteryAccount = "lottery_from" // 彩票候选账户 MSKeyInterestCalcNum = "interest_calc_num" // 利息计算状态 MSKeyInterestPayNum = "interest_pay_num" // 利息支付状态 MSKeySlashNum = "slash_num" // 惩罚状态 //奖励算法配置 MSKeyBlkCalc = "blk_calc" MSKeyTxsCalc = "txs_calc" MSKeyInterestCalc = "interest_calc" MSKeyLotteryCalc = "lottery_calc" MSKeySlashCalc = "slash_calc" //未出块选举惩罚配置相关 MSKeyBlockProduceStatsStatus = "block_produce_stats_status" // MSKeyBlockProduceSlashCfg = "block_produce_slash_cfg" // MSKeyBlockProduceStats = "block_produce_stats" // MSKeyBlockProduceBlackList = "block_produce_blacklist" // //交易配置 MSTxpoolGasLimitCfg = "man_TxpoolGasLimitCfg" //入池gas配置 MSCurrencyConfig = "man_CurrencyConfig" //币种配置 MSAccountBlackList = "man_AccountBlackList" //账户黑名单设置 )
const ( Heartbeat = "Heartbeat" // 心跳交易(广播区块Hash对99取余) Publickey = "SeedProof" // 公钥交易 Privatekey = "Seed" // 私钥交易 CallTheRoll = "CallTheRoll" //点名交易 (广播节点随机连接1000个点) )
by // 2018-08-18由tx_pool.go转移到此
const ReelectionTimes = uint64(3) // 选举周期的倍数(广播周期*ReelectionTimes = 选举周期)
const (
RewardFullRate = uint64(10000)
)
Variables ¶
var ( SubErrorNoThisEvent = errors.New("SubscribeEvent Failed No This Event") PostErrorNoThisEvent = errors.New("PostEvent Failed No This Event") )
Functions ¶
func PublishEvent ¶
func ReturnBroadCastType ¶ added in v1.1.1
func SubscribeEvent ¶
func SubscribeEvent(aim EventCode, ch interface{}) (event.Subscription, error)
Types ¶
type Alternative ¶
type BCIntervalInfo ¶ added in v1.1.1
type BCIntervalInfo struct { LastBCNumber uint64 // 最后的广播区块高度 LastReelectNumber uint64 // 最后的选举区块高度 BCInterval uint64 // 广播周期 BackupEnableNumber uint64 // 预备广播周期启用高度 BackupBCInterval uint64 // 预备广播周期 }
func (*BCIntervalInfo) GetBackupEnableNumber ¶ added in v1.1.1
func (info *BCIntervalInfo) GetBackupEnableNumber() uint64
func (*BCIntervalInfo) GetBroadcastInterval ¶ added in v1.1.1
func (info *BCIntervalInfo) GetBroadcastInterval() uint64
func (*BCIntervalInfo) GetLastBroadcastNumber ¶ added in v1.1.1
func (info *BCIntervalInfo) GetLastBroadcastNumber() uint64
func (*BCIntervalInfo) GetLastReElectionNumber ¶ added in v1.1.1
func (info *BCIntervalInfo) GetLastReElectionNumber() uint64
func (*BCIntervalInfo) GetNextBroadcastNumber ¶ added in v1.1.1
func (info *BCIntervalInfo) GetNextBroadcastNumber(number uint64) uint64
func (*BCIntervalInfo) GetNextReElectionNumber ¶ added in v1.1.1
func (info *BCIntervalInfo) GetNextReElectionNumber(number uint64) uint64
func (*BCIntervalInfo) GetReElectionInterval ¶ added in v1.1.1
func (info *BCIntervalInfo) GetReElectionInterval() uint64
func (*BCIntervalInfo) IsBroadcastNumber ¶ added in v1.1.1
func (info *BCIntervalInfo) IsBroadcastNumber(number uint64) bool
func (*BCIntervalInfo) IsReElectionNumber ¶ added in v1.1.1
func (info *BCIntervalInfo) IsReElectionNumber(number uint64) bool
func (*BCIntervalInfo) SetBackupBCInterval ¶ added in v1.1.1
func (info *BCIntervalInfo) SetBackupBCInterval(interval uint64, enableNumber uint64)
func (*BCIntervalInfo) SetLastBCNumber ¶ added in v1.1.1
func (info *BCIntervalInfo) SetLastBCNumber(number uint64)
func (*BCIntervalInfo) SetLastReelectNumber ¶ added in v1.1.1
func (info *BCIntervalInfo) SetLastReelectNumber(number uint64)
func (*BCIntervalInfo) UsingBackupInterval ¶ added in v1.1.1
func (info *BCIntervalInfo) UsingBackupInterval()
type BlkRewardCfg ¶ added in v1.1.1
type BlockGenor_BroadcastMiningReqMsg ¶
type BlockGenor_BroadcastMiningReqMsg struct {
BlockMainData *BlockData
}
type BlockLocalVerifyOK ¶
type BlockLocalVerifyOK struct { Header *types.Header // 包含签名列表的header BlockHash common.Hash OriginalTxs []types.CoinSelfTransaction // 原始交易列表 FinalTxs []types.CoinSelfTransaction // 最终交易列表(含奖励交易) Receipts []types.CoinReceipts // 收据 State *state.StateDBManage // apply state changes here 状态数据库 }
type BlockPOSFinishedNotify ¶
type BlockPOSFinishedNotify struct { Number uint64 Header *types.Header // 包含签名列表的header ConsensusTurn ConsensusTurnInfo TxsCode []*common.RetCallTxN }
type BlockProduceSlashBlackList ¶ added in v1.1.1
type BlockProduceSlashBlackList struct {
BlackList []UserBlockProduceSlash
}
type BlockProduceSlashCfg ¶ added in v1.1.1
type BlockProduceSlashStatsStatus ¶ added in v1.1.1
type BlockProduceSlashStatsStatus struct {
Number uint64
}
type BlockProduceStats ¶ added in v1.1.1
type BlockProduceStats struct {
StatsList []UserBlockProduceNum
}
type BlockToBucket ¶
type BlockToLinker ¶
type BlockToLinker struct { Height *big.Int BroadCastInterval *BCIntervalInfo Role common.RoleType }
type ConsensusTurnInfo ¶ added in v1.1.1
type ConsensusTurnInfo struct { PreConsensusTurn uint32 // 前一次共识轮次 UsedReelectTurn uint32 // 完成共识花费的重选轮次 }
func (*ConsensusTurnInfo) Cmp ¶ added in v1.1.1
func (info *ConsensusTurnInfo) Cmp(target ConsensusTurnInfo) int64
if < target, return -1 if == target, return 0 if > target, return 1
func (*ConsensusTurnInfo) String ¶ added in v1.1.1
func (info *ConsensusTurnInfo) String() string
///////////////////////////////////////////////////////////////////////////////////////////////////
func (*ConsensusTurnInfo) TotalTurns ¶ added in v1.1.1
func (info *ConsensusTurnInfo) TotalTurns() uint32
type DepositDetail ¶
type DepositDetail struct { Address common.Address NodeID discover.NodeID Deposit *big.Int WithdrawH *big.Int OnlineTime *big.Int }
拓扑生成模块
type ElectConfigInfo ¶ added in v1.1.1
type ElectConfigInfo_All ¶ added in v1.1.1
type ElectGenTimeStruct ¶ added in v1.1.1
type ElectGraph ¶ added in v1.1.1
type ElectGraph struct { Number uint64 ElectList []ElectNodeInfo NextMinerElect []ElectNodeInfo NextValidatorElect []ElectNodeInfo }
func (*ElectGraph) TransferElect2CommonElect ¶ added in v1.1.1
func (eg *ElectGraph) TransferElect2CommonElect() []common.Elect
///////////////////////////////////////////////////////////////////////////////////////////////////
func (*ElectGraph) TransferNextElect2CommonElect ¶ added in v1.1.1
func (eg *ElectGraph) TransferNextElect2CommonElect() []common.Elect
type ElectMinerNumStruct ¶ added in v1.1.1
type ElectMinerNumStruct struct {
MinerNum uint16
}
type ElectNodeInfo ¶ added in v1.1.1
type ElectOnlineStatus ¶ added in v1.1.1
type ElectOnlineStatus struct { Number uint64 ElectOnline []ElectNodeInfo }
func (*ElectOnlineStatus) FindNodeElectOnlineState ¶ added in v1.1.1
func (eos *ElectOnlineStatus) FindNodeElectOnlineState(node common.Address) *ElectNodeInfo
type ElectWhiteListSwitcher ¶ added in v1.1.1
type ElectWhiteListSwitcher struct {
Switcher bool
}
type EntrustInfo ¶ added in v1.1.1
type EventCode ¶
type EventCode int
const ( NewBlockMessage EventCode = iota SendBroadCastTx HD_MiningReq HD_MiningRsp HD_BroadcastMiningReq HD_BroadcastMiningRsp //CA CA_RoleUpdated // RoleUpdatedMsg CA_ReqCurrentBlock //P2P P2P_BlkVerifyRequest // BlockVerifyReqMsg //Leader service Leader_LeaderChangeNotify // LeaderChangeNotify Leader_RecoveryState //BlockVerify service HD_BlkConsensusReq HD_BlkConsensusVote BlkVerify_VerifyConsensusOK //BlockVerifyConsensusOK BlkVerify_POSFinishedNotify //BlockPOSFinishedNotify //BlockGenor service BlockGenor_HeaderGenerateReq HD_NewBlockInsert BlockGenor_HeaderVerifyReq BlockGenor_NewBlockReady HD_FullBlockReq HD_FullBlockRsp //topnode online HD_TopNodeConsensusReq HD_TopNodeConsensusVote HD_TopNodeConsensusVoteResult //leader HD_LeaderReelectInquiryReq HD_LeaderReelectInquiryRsp HD_LeaderReelectReq HD_LeaderReelectVote HD_LeaderReelectBroadcast HD_LeaderReelectBroadcastRsp //Topology ReElec_MasterMinerReElectionReq ReElec_MasterValidatorElectionReq Topo_MasterMinerElectionRsp Topo_MasterValidatorElectionRsp //random ReElec_TopoSeedReq Random_TopoSeedRsp P2P_HDMSG BlockToBuckets BlockToLinkers SendUdpTx SendSyncRole //lb TxPoolManager //1030_scf EveryBlockSeedRsp LastEventCode )
type EveryBlockSeedRspMsg ¶ added in v1.1.1
type HD_BlkConsensusReqMsg ¶
type HD_BlkConsensusReqMsg struct { From common.Address Header *types.Header ConsensusTurn ConsensusTurnInfo TxsCode []*common.RetCallTxN OnlineConsensusResults []*HD_OnlineConsensusVoteResultMsg }
block verify server
func (*HD_BlkConsensusReqMsg) TxsCodeCount ¶ added in v1.1.1
func (req *HD_BlkConsensusReqMsg) TxsCodeCount() int
///////////////////////////////////////////////////////////////////////////////////////////////////
type HD_BlockInsertNotify ¶
BolckGenor
type HD_ConsensusVote ¶
type HD_ConsensusVote struct { SignHash common.Hash Number uint64 Sign common.Signature From common.Address }
共识投票消息
type HD_FullBlockReqMsg ¶
type HD_FullBlockRspMsg ¶
type HD_MiningReqMsg ¶
Miner Module
type HD_MiningRspMsg ¶
type HD_OnlineConsensusReqs ¶
type HD_OnlineConsensusReqs struct { From common.Address ReqList []*OnlineConsensusReq //请求结构 }
在线状态共识请求消息
type HD_OnlineConsensusVoteResultMsg ¶
type HD_OnlineConsensusVoteResultMsg struct { Req *OnlineConsensusReq //请求结构 SignList []common.Signature //签名列表 From common.Address }
共识结果
func (*HD_OnlineConsensusVoteResultMsg) IsValidity ¶ added in v1.1.1
func (msg *HD_OnlineConsensusVoteResultMsg) IsValidity(curNumber uint64, validityTime uint64) bool
type HD_OnlineConsensusVotes ¶
type HD_OnlineConsensusVotes struct {
Votes []HD_ConsensusVote
}
type HD_ReelectBroadcastMsg ¶ added in v1.1.1
type HD_ReelectBroadcastMsg struct { Number uint64 Type ReelectRSPType POSResult *HD_BlkConsensusReqMsg RLResult *HD_ReelectLeaderConsensus TimeStamp uint64 From common.Address }
type HD_ReelectBroadcastRspMsg ¶ added in v1.1.1
type HD_ReelectInquiryReqMsg ¶
type HD_ReelectInquiryRspMsg ¶
type HD_ReelectInquiryRspMsg struct { Number uint64 ReqHash common.Hash Type ReelectRSPType AgreeSign common.Signature POSResult *HD_BlkConsensusReqMsg RLResult *HD_ReelectLeaderConsensus NewBlock *types.Header From common.Address }
type HD_ReelectLeaderConsensus ¶
type HD_ReelectLeaderConsensus struct { Req *HD_ReelectLeaderReqMsg Votes []common.Signature }
type HD_ReelectLeaderReqMsg ¶
type HD_ReelectLeaderReqMsg struct { InquiryReq *HD_ReelectInquiryReqMsg AgreeSigns []common.Signature TimeStamp uint64 }
type InterestCfg ¶ added in v1.1.1
type LeaderChangeNotify ¶
type LeaderConfig ¶ added in v1.1.1
type LeaderStateMsg ¶
type LocalBlockVerifyConsensusReq ¶
type LocalBlockVerifyConsensusReq struct { BlkVerifyConsensusReq *HD_BlkConsensusReqMsg OriginalTxs []types.CoinSelfTransaction // 原始交易列表 FinalTxs []types.CoinSelfTransaction // 最终交易列表(含奖励交易) Receipts []types.CoinReceipts // 收据 State *state.StateDBManage // apply state changes here 状态数据库 }
type LotteryCfg ¶ added in v1.1.1
type LotteryCfg struct {
LotteryInfo []LotteryInfo
}
type LotteryFrom ¶ added in v1.1.1
type LotteryInfo ¶ added in v1.1.1
type MasterMinerReElectionReqMsg ¶
type MasterMinerReElectionReqMsg struct { SeqNum uint64 RandSeed *big.Int MinerList []vm.DepositDetail ElectConfig ElectConfigInfo_All }
矿工主节点生成请求
type MasterMinerReElectionRsp ¶
type MasterMinerReElectionRsp struct { SeqNum uint64 MasterMiner []ElectNodeInfo }
矿工主节点生成响应
type MasterMinerReElectionRspMsg ¶
type MasterMinerReElectionRspMsg struct {
SeqNum uint64
}
Election Module
type MasterValidatorReElectionReqMsg ¶
type MasterValidatorReElectionReqMsg struct { SeqNum uint64 RandSeed *big.Int ValidatorList []vm.DepositDetail FoundationValidatorList []vm.DepositDetail ElectConfig ElectConfigInfo_All VIPList []VIPConfig BlockProduceBlackList BlockProduceSlashBlackList }
验证者主节点生成请求
type MasterValidatorReElectionRspMsg ¶
type MasterValidatorReElectionRspMsg struct {
SeqNum uint64
}
type MasterValidatorReElectionRsq ¶
type MasterValidatorReElectionRsq struct { SeqNum uint64 MasterValidator []ElectNodeInfo BackUpValidator []ElectNodeInfo CandidateValidator []ElectNodeInfo }
验证者主节点生成响应
type MinerOutReward ¶ added in v1.1.1
type NewBlockReadyMsg ¶
type NewBlockReadyMsg struct { Header *types.Header State *state.StateDBManage }
type OnlineConsensusReq ¶
type OnlineConsensusReq struct { Number uint64 // 高度 LeaderTurn uint32 // leader轮次 Leader common.Address // leader地址 Node common.Address // node 地址 OnlineState OnlineState //在线状态 }
在线状态共识请求
type OnlineState ¶ added in v1.1.1
type OnlineState uint8
const ( OnLine OnlineState = iota + 1 OffLine )
func (OnlineState) String ¶ added in v1.1.1
func (os OnlineState) String() string
type PreBroadStateRoot ¶ added in v1.1.1
type RandomInfoStruct ¶ added in v1.1.1
type RandomRequest ¶
type RandomRequest struct { MinHash common.Hash PrivateMap map[common.Address][]byte PublicMap map[common.Address][]byte }
随机数生成请求
type RecoveryStateMsg ¶
type RecoveryType ¶
type RecoveryType uint8
const ( RecoveryTypePOS RecoveryType = iota RecoveryTypeFullHeader )
type ReelectRSPType ¶
type ReelectRSPType uint8
const ( ReelectRSPTypeNone ReelectRSPType = iota ReelectRSPTypePOS ReelectRSPTypeAlreadyRL ReelectRSPTypeAgree ReelectRSPTypeNewBlockReady )
type RewardRateCfg ¶ added in v1.1.1
type RewardRateCfg struct { MinerOutRate uint64 //出块矿工奖励 ElectedMinerRate uint64 //当选矿工奖励 FoundationMinerRate uint64 //基金会网络奖励 LeaderRate uint64 //出块验证者(leader)奖励 ElectedValidatorsRate uint64 //当选验证者奖励 FoundationValidatorRate uint64 //基金会网络奖励 OriginElectOfflineRate uint64 //初选下线验证者奖励 BackupRewardRate uint64 //当前替补验证者奖励 }
type RoleUpdatedMsg ¶
type SortVIPConfig ¶ added in v1.1.1
type SortVIPConfig []VIPConfig
func (SortVIPConfig) Len ¶ added in v1.1.1
func (self SortVIPConfig) Len() int
func (SortVIPConfig) Less ¶ added in v1.1.1
func (self SortVIPConfig) Less(i, j int) bool
func (SortVIPConfig) Swap ¶ added in v1.1.1
func (self SortVIPConfig) Swap(i, j int)
type SuperBlkCfg ¶ added in v1.1.1
type SyncIdEvent ¶ added in v1.1.1
type TopologyGraph ¶
type TopologyGraph struct { NodeList []TopologyNodeInfo CurNodeNumber uint8 }
func NewGenesisTopologyGraph ¶
func NewGenesisTopologyGraph(number uint64, netTopology common.NetTopology) (*TopologyGraph, error)
func (*TopologyGraph) AccountIsInGraph ¶ added in v1.1.1
func (self *TopologyGraph) AccountIsInGraph(account common.Address) bool
func (*TopologyGraph) CheckAccountRole ¶ added in v1.1.1
func (*TopologyGraph) FindNextValidator ¶ added in v1.1.1
func (self *TopologyGraph) FindNextValidator(account common.Address) common.Address
func (*TopologyGraph) Transfer2NextGraph ¶
func (self *TopologyGraph) Transfer2NextGraph(number uint64, blockTopology *common.NetTopology) (*TopologyGraph, error)
type TopologyNodeInfo ¶
type TxsRewardCfg ¶ added in v1.1.1
type TxsRewardCfg struct { MinersRate uint64 //矿工网络奖励 ValidatorsRate uint64 //验证者网络奖励 RewardRate RewardRateCfg }