Documentation ¶
Index ¶
- Constants
- func GetName() string
- func Init(name string, cfg *types.Chain33Config, sub []byte)
- func InitExecType()
- func Key(id string) (key []byte)
- func TopNKey(id string) (key []byte)
- type Action
- func (action *Action) CancelRegist(req *dty.DposCandidatorCancelRegist) (*types.Receipt, error)
- func (action *Action) CancelVote(vote *dty.DposCancelVote) (*types.Receipt, error)
- func (action *Action) CheckExecAccountBalance(fromAddr string, ToFrozen, ToActive int64) bool
- func (action *Action) ReRegist(regist *dty.DposCandidatorRegist) (*types.Receipt, error)
- func (action *Action) RecordCB(cbInfo *dty.DposCBInfo) (*types.Receipt, error)
- func (action *Action) Regist(regist *dty.DposCandidatorRegist) (*types.Receipt, error)
- func (action *Action) RegistTopN(regist *dty.TopNCandidatorRegist) (*types.Receipt, error)
- func (action *Action) RegistVrfM(vrfMReg *dty.DposVrfMRegist) (*types.Receipt, error)
- func (action *Action) RegistVrfRP(vrfRPReg *dty.DposVrfRPRegist) (*types.Receipt, error)
- func (action *Action) Vote(vote *dty.DposVote) (*types.Receipt, error)
- type CycleInfo
- type DPos
- func (g *DPos) CheckReceiptExecOk() bool
- func (d *DPos) ExecDelLocal_CancelRegist(payload *dty.DposCandidatorCancelRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecDelLocal_CancelVote(payload *dty.DposCancelVote, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecDelLocal_ReRegist(payload *dty.DposCandidatorRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecDelLocal_RecordCB(payload *dty.DposCBInfo, tx *types.Transaction, receiptData *types.ReceiptData, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecDelLocal_Regist(payload *dty.DposCandidatorRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecDelLocal_RegistTopN(payload *dty.TopNCandidatorRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecDelLocal_Vote(payload *dty.DposVote, tx *types.Transaction, receiptData *types.ReceiptData, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecDelLocal_VrfMRegist(payload *dty.DposVrfMRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecDelLocal_VrfRPRegist(payload *dty.DposVrfRPRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecLocal_CancelRegist(payload *dty.DposCandidatorCancelRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecLocal_CancelVote(payload *dty.DposCancelVote, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecLocal_ReRegist(payload *dty.DposCandidatorRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecLocal_RecordCB(payload *dty.DposCBInfo, tx *types.Transaction, receiptData *types.ReceiptData, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecLocal_Regist(payload *dty.DposCandidatorRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecLocal_RegistTopN(payload *dty.TopNCandidatorRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecLocal_RegistVrfM(payload *dty.DposVrfMRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecLocal_RegistVrfRP(payload *dty.DposVrfRPRegist, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (d *DPos) ExecLocal_Vote(payload *dty.DposVote, tx *types.Transaction, receiptData *types.ReceiptData, ...) (*types.LocalDBSet, error)
- func (d *DPos) Exec_CancelRegist(payload *dty.DposCandidatorCancelRegist, tx *types.Transaction, index int) (*types.Receipt, error)
- func (d *DPos) Exec_CancelVote(payload *dty.DposCancelVote, tx *types.Transaction, index int) (*types.Receipt, error)
- func (d *DPos) Exec_ReRegist(payload *dty.DposCandidatorRegist, tx *types.Transaction, index int) (*types.Receipt, error)
- func (d *DPos) Exec_RecordCB(payload *dty.DposCBInfo, tx *types.Transaction, index int) (*types.Receipt, error)
- func (d *DPos) Exec_Regist(payload *dty.DposCandidatorRegist, tx *types.Transaction, index int) (*types.Receipt, error)
- func (d *DPos) Exec_RegistTopN(payload *dty.TopNCandidatorRegist, tx *types.Transaction, index int) (*types.Receipt, error)
- func (d *DPos) Exec_RegistVrfM(payload *dty.DposVrfMRegist, tx *types.Transaction, index int) (*types.Receipt, error)
- func (d *DPos) Exec_RegistVrfRP(payload *dty.DposVrfRPRegist, tx *types.Transaction, index int) (*types.Receipt, error)
- func (d *DPos) Exec_Vote(payload *dty.DposVote, tx *types.Transaction, index int) (*types.Receipt, error)
- func (g *DPos) ExecutorOrder() int64
- func (g *DPos) GetDriverName() string
- func (d *DPos) Query_QueryCBInfoByCycle(in *dty.DposCBQuery) (types.Message, error)
- func (d *DPos) Query_QueryCBInfoByHash(in *dty.DposCBQuery) (types.Message, error)
- func (d *DPos) Query_QueryCBInfoByHeight(in *dty.DposCBQuery) (types.Message, error)
- func (d *DPos) Query_QueryCandidatorByPubkeys(in *dty.CandidatorQuery) (types.Message, error)
- func (d *DPos) Query_QueryCandidatorByTopN(in *dty.CandidatorQuery) (types.Message, error)
- func (d *DPos) Query_QueryTopNByVersion(in *dty.TopNCandidatorsQuery) (types.Message, error)
- func (d *DPos) Query_QueryVote(in *dty.DposVoteQuery) (types.Message, error)
- func (d *DPos) Query_QueryVrfByCycle(in *dty.DposVrfQuery) (types.Message, error)
- func (d *DPos) Query_QueryVrfByCycleForPubkeys(in *dty.DposVrfQuery) (types.Message, error)
- func (d *DPos) Query_QueryVrfByCycleForTopN(in *dty.DposVrfQuery) (types.Message, error)
- func (d *DPos) Query_QueryVrfByTime(in *dty.DposVrfQuery) (types.Message, error)
Constants ¶
const ( //ListDESC 表示记录降序排列 ListDESC = int32(0) //ListASC 表示记录升序排列 ListASC = int32(1) //DefaultCount 默认一次获取的记录数 DefaultCount = int32(10) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
Action 具体动作执行
func NewAction ¶
func NewAction(dpos *DPos, tx *types.Transaction, index int) *Action
NewAction 生成Action对象
func (*Action) CancelRegist ¶
CancelRegist 撤销一个候选节点的注册
func (*Action) CancelVote ¶
CancelVote 撤销对某个候选节点的投票
func (*Action) CheckExecAccountBalance ¶
CheckExecAccountBalance 检查地址在Dpos合约中的余额是否足够
func (*Action) RegistTopN ¶
RegistTopN 注册TopN节点
func (*Action) RegistVrfM ¶
RegistVrfM 注册受托节点的Vrf M信息(输入信息)
func (*Action) RegistVrfRP ¶
RegistVrfRP 注册受托节点的Vrf R/P信息
type CycleInfo ¶
type CycleInfo struct {
// contains filtered or unexported fields
}
CycleInfo indicates the start and stop of a cycle
type DPos ¶
type DPos struct {
drivers.DriverBase
}
DPos 执行器,用于Dpos候选节点注册、投票,VRF信息注册管理等功能
func (*DPos) CheckReceiptExecOk ¶
CheckReceiptExecOk return true to check if receipt ty is ok
func (*DPos) ExecDelLocal_CancelRegist ¶
func (d *DPos) ExecDelLocal_CancelRegist(payload *dty.DposCandidatorCancelRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_CancelRegist method
func (*DPos) ExecDelLocal_CancelVote ¶
func (d *DPos) ExecDelLocal_CancelVote(payload *dty.DposCancelVote, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_CancelVote method
func (*DPos) ExecDelLocal_ReRegist ¶
func (d *DPos) ExecDelLocal_ReRegist(payload *dty.DposCandidatorRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_ReRegist method
func (*DPos) ExecDelLocal_RecordCB ¶
func (d *DPos) ExecDelLocal_RecordCB(payload *dty.DposCBInfo, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_RecordCB method
func (*DPos) ExecDelLocal_Regist ¶
func (d *DPos) ExecDelLocal_Regist(payload *dty.DposCandidatorRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_Regist method
func (*DPos) ExecDelLocal_RegistTopN ¶
func (d *DPos) ExecDelLocal_RegistTopN(payload *dty.TopNCandidatorRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_RegistTopN method
func (*DPos) ExecDelLocal_Vote ¶
func (d *DPos) ExecDelLocal_Vote(payload *dty.DposVote, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_Vote method
func (*DPos) ExecDelLocal_VrfMRegist ¶
func (d *DPos) ExecDelLocal_VrfMRegist(payload *dty.DposVrfMRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_VrfMRegist method
func (*DPos) ExecDelLocal_VrfRPRegist ¶
func (d *DPos) ExecDelLocal_VrfRPRegist(payload *dty.DposVrfRPRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_VrfRPRegist method
func (*DPos) ExecLocal_CancelRegist ¶
func (d *DPos) ExecLocal_CancelRegist(payload *dty.DposCandidatorCancelRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_CancelRegist method
func (*DPos) ExecLocal_CancelVote ¶
func (d *DPos) ExecLocal_CancelVote(payload *dty.DposCancelVote, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_CancelVote method
func (*DPos) ExecLocal_ReRegist ¶
func (d *DPos) ExecLocal_ReRegist(payload *dty.DposCandidatorRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_ReRegist method
func (*DPos) ExecLocal_RecordCB ¶
func (d *DPos) ExecLocal_RecordCB(payload *dty.DposCBInfo, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_RecordCB method
func (*DPos) ExecLocal_Regist ¶
func (d *DPos) ExecLocal_Regist(payload *dty.DposCandidatorRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_Regist method
func (*DPos) ExecLocal_RegistTopN ¶
func (d *DPos) ExecLocal_RegistTopN(payload *dty.TopNCandidatorRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_RegistTopN method
func (*DPos) ExecLocal_RegistVrfM ¶
func (d *DPos) ExecLocal_RegistVrfM(payload *dty.DposVrfMRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_RegistVrfM method
func (*DPos) ExecLocal_RegistVrfRP ¶
func (d *DPos) ExecLocal_RegistVrfRP(payload *dty.DposVrfRPRegist, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_RegistVrfRP method
func (*DPos) ExecLocal_Vote ¶
func (d *DPos) ExecLocal_Vote(payload *dty.DposVote, tx *types.Transaction, receiptData *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_Vote method
func (*DPos) Exec_CancelRegist ¶
func (d *DPos) Exec_CancelRegist(payload *dty.DposCandidatorCancelRegist, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_CancelRegist DPos执行器取消注册候选节点
func (*DPos) Exec_CancelVote ¶
func (d *DPos) Exec_CancelVote(payload *dty.DposCancelVote, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_CancelVote DPos执行器撤销对一个候选节点的投票
func (*DPos) Exec_ReRegist ¶
func (d *DPos) Exec_ReRegist(payload *dty.DposCandidatorRegist, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_ReRegist DPos执行器重新注册候选节点
func (*DPos) Exec_RecordCB ¶
func (d *DPos) Exec_RecordCB(payload *dty.DposCBInfo, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_RecordCB DPos执行器记录CycleBoundary信息
func (*DPos) Exec_Regist ¶
func (d *DPos) Exec_Regist(payload *dty.DposCandidatorRegist, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_Regist DPos执行器注册候选节点
func (*DPos) Exec_RegistTopN ¶
func (d *DPos) Exec_RegistTopN(payload *dty.TopNCandidatorRegist, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_RegistTopN DPos执行器注册某一cycle中的TOPN信息
func (*DPos) Exec_RegistVrfM ¶
func (d *DPos) Exec_RegistVrfM(payload *dty.DposVrfMRegist, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_RegistVrfM DPos执行器注册一个受托节点的Vrf M信息
func (*DPos) Exec_RegistVrfRP ¶
func (d *DPos) Exec_RegistVrfRP(payload *dty.DposVrfRPRegist, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_RegistVrfRP DPos执行器注册一个受托节点的Vrf R/P信息
func (*DPos) Exec_Vote ¶
func (d *DPos) Exec_Vote(payload *dty.DposVote, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_Vote DPos执行器为候选节点投票
func (*DPos) ExecutorOrder ¶
ExecutorOrder Exec 的时候 同时执行 ExecLocal
func (*DPos) Query_QueryCBInfoByCycle ¶
Query_QueryCBInfoByCycle method
func (*DPos) Query_QueryCBInfoByHash ¶
Query_QueryCBInfoByHash method
func (*DPos) Query_QueryCBInfoByHeight ¶
Query_QueryCBInfoByHeight method
func (*DPos) Query_QueryCandidatorByPubkeys ¶
Query_QueryCandidatorByPubkeys method
func (*DPos) Query_QueryCandidatorByTopN ¶
Query_QueryCandidatorByTopN method
func (*DPos) Query_QueryTopNByVersion ¶
Query_QueryTopNByVersion method
func (*DPos) Query_QueryVote ¶
Query_QueryVote method
func (*DPos) Query_QueryVrfByCycle ¶
Query_QueryVrfByCycle method
func (*DPos) Query_QueryVrfByCycleForPubkeys ¶
Query_QueryVrfByCycleForPubkeys method
func (*DPos) Query_QueryVrfByCycleForTopN ¶
Query_QueryVrfByCycleForTopN method
func (*DPos) Query_QueryVrfByTime ¶
Query_QueryVrfByTime method