Versions in this module Expand all Collapse all v0 v0.7.2 Apr 16, 2020 v0.7.1 Apr 9, 2020 Changes in this version + const ADD_INIT_POS + const APPROVE_CANDIDATE + const AUTHORIZE_FOR_PEER + const AUTHORIZE_FOR_PEER_TRANSFER_FROM + const BLACK_LIST + const BLACK_NODE + const CANDIDITE_INDEX + const CHANGE_MAX_AUTHORIZATION + const COMMIT_DPOS + const GAS_ADDRESS + const GLOBAL_PARAM + const GLOBAL_PARAM2 + const GOVERNANCE_VIEW + const INIT_CONFIG + const NEW_VERSION_BLOCK + const NEW_VERSION_VIEW + const NEW_WITHDRAW_BLOCK + const PEER_ATTRIBUTES + const PEER_INDEX + const PEER_POOL + const PENALTY_STAKE + const PRECISE + const PRE_CONFIG + const PROMISE_POS + const QUIT_NODE + const REDUCE_INIT_POS + const REGISTER_CANDIDATE + const REGISTER_CANDIDATE_TRANSFER_FROM + const REJECT_CANDIDATE + const SET_GAS_ADDRESS + const SET_PEER_COST + const SET_PROMISE_POS + const SPLIT_CURVE + const SPLIT_FEE + const SPLIT_FEE_ADDRESS + const TOTAL_STAKE + const TRANSFER_PENALTY + const UNAUTHORIZE_FOR_PEER + const UNREGISTER_CANDIDATE + const UPDATE_CONFIG + const UPDATE_GLOBAL_PARAM + const UPDATE_GLOBAL_PARAM2 + const UPDATE_SPLIT_CURVE + const VBFT_CONFIG + const WHITE_NODE + const WITHDRAW + const WITHDRAW_FEE + var AUTHORIZE_INFO_POOL = []byte + var MIN_CANDIDATE_FEE = uint64(math.Pow(10, constants.GAS_DECIMALS)) + var Xi = []uint32 + func AddInitPos(native *native.NativeService) ([]byte, error) + func ApproveCandidate(native *native.NativeService) ([]byte, error) + func AuthorizeForPeer(native *native.NativeService) ([]byte, error) + func AuthorizeForPeerTransferFrom(native *native.NativeService) ([]byte, error) + func BlackNode(native *native.NativeService) ([]byte, error) + func ChangeMaxAuthorization(native *native.NativeService) ([]byte, error) + func CheckVBFTConfig(configuration *config.VBFTConfig) error + func CommitDpos(native *native.NativeService) ([]byte, error) + func GetBytesUint32(b []byte) (uint32, error) + func GetBytesUint64(b []byte) (uint64, error) + func GetUint32Bytes(num uint32) ([]byte, error) + func GetUint64Bytes(num uint64) []byte + func GetView(native *native.NativeService, contract common.Address) (uint32, error) + func InitConfig(native *native.NativeService) ([]byte, error) + func InitGovernance() + func QuitNode(native *native.NativeService) ([]byte, error) + func ReduceInitPos(native *native.NativeService) ([]byte, error) + func RegisterCandidate(native *native.NativeService) ([]byte, error) + func RegisterCandidateTransferFrom(native *native.NativeService) ([]byte, error) + func RegisterGovernanceContract(native *native.NativeService) + func RejectCandidate(native *native.NativeService) ([]byte, error) + func SetGasAddress(native *native.NativeService) ([]byte, error) + func SetPeerCost(native *native.NativeService) ([]byte, error) + func SetPromisePos(native *native.NativeService) ([]byte, error) + func TransferPenalty(native *native.NativeService) ([]byte, error) + func UnAuthorizeForPeer(native *native.NativeService) ([]byte, error) + func UnRegisterCandidate(native *native.NativeService) ([]byte, error) + func UpdateConfig(native *native.NativeService) ([]byte, error) + func UpdateGlobalParam(native *native.NativeService) ([]byte, error) + func UpdateGlobalParam2(native *native.NativeService) ([]byte, error) + func UpdateSplitCurve(native *native.NativeService) ([]byte, error) + func WhiteNode(native *native.NativeService) ([]byte, error) + func Withdraw(native *native.NativeService) ([]byte, error) + func WithdrawFee(native *native.NativeService) ([]byte, error) + type ApproveCandidateParam struct + PeerPubkey string + func (this *ApproveCandidateParam) Deserialization(source *common.ZeroCopySource) error + func (this *ApproveCandidateParam) Serialization(sink *common.ZeroCopySink) + type AuthorizeForPeerParam struct + Address common.Address + PeerPubkeyList []string + PosList []uint32 + func (this *AuthorizeForPeerParam) Deserialization(source *common.ZeroCopySource) error + func (this *AuthorizeForPeerParam) Serialization(sink *common.ZeroCopySink) error + type AuthorizeInfo struct + Address common.Address + CandidatePos uint64 + ConsensusPos uint64 + NewPos uint64 + PeerPubkey string + WithdrawCandidatePos uint64 + WithdrawConsensusPos uint64 + WithdrawUnfreezePos uint64 + func (this *AuthorizeInfo) Deserialization(source *common.ZeroCopySource) error + func (this *AuthorizeInfo) Serialization(sink *common.ZeroCopySink) + type BlackListItem struct + Address common.Address + InitPos uint64 + PeerPubkey string + func (this *BlackListItem) Deserialization(source *common.ZeroCopySource) error + func (this *BlackListItem) Serialization(sink *common.ZeroCopySink) + type BlackNodeParam struct + PeerPubkeyList []string + func (this *BlackNodeParam) Deserialization(source *common.ZeroCopySource) error + func (this *BlackNodeParam) Serialization(sink *common.ZeroCopySink) + type CandidateSplitInfo struct + Address common.Address + InitPos uint64 + PeerPubkey string + S uint64 + Stake uint64 + type ChangeInitPosParam struct + Address common.Address + PeerPubkey string + Pos uint32 + func (this *ChangeInitPosParam) Deserialization(source *common.ZeroCopySource) error + func (this *ChangeInitPosParam) Serialization(sink *common.ZeroCopySink) + type ChangeMaxAuthorizationParam struct + Address common.Address + MaxAuthorize uint32 + PeerPubkey string + func (this *ChangeMaxAuthorizationParam) Deserialization(source *common.ZeroCopySource) error + func (this *ChangeMaxAuthorizationParam) Serialization(sink *common.ZeroCopySink) + type Configuration struct + BlockMsgDelay uint32 + C uint32 + HashMsgDelay uint32 + K uint32 + L uint32 + MaxBlockChangeView uint32 + N uint32 + PeerHandshakeTimeout uint32 + func (this *Configuration) Deserialization(source *common.ZeroCopySource) error + func (this *Configuration) Serialization(sink *common.ZeroCopySink) + type GasAddress struct + Address common.Address + func (this *GasAddress) Deserialization(source *common.ZeroCopySource) error + func (this *GasAddress) Serialization(sink *common.ZeroCopySink) + type GlobalParam struct + A uint32 + B uint32 + CandidateFee uint64 + CandidateNum uint32 + MinInitStake uint32 + Penalty uint32 + PosLimit uint32 + Yita uint32 + func (this *GlobalParam) Deserialization(source *common.ZeroCopySource) error + func (this *GlobalParam) Serialization(sink *common.ZeroCopySink) + type GlobalParam2 struct + CandidateFeeSplitNum uint32 + DappFee uint32 + Field2 []byte + Field3 []byte + Field4 []byte + Field5 []byte + Field6 []byte + MinAuthorizePos uint32 + func (this *GlobalParam2) Deserialization(source *common.ZeroCopySource) error + func (this *GlobalParam2) Serialization(sink *common.ZeroCopySink) error + type GovernanceView struct + Height uint32 + TxHash common.Uint256 + View uint32 + func GetGovernanceView(native *native.NativeService, contract common.Address) (*GovernanceView, error) + func (this *GovernanceView) Deserialize(r io.Reader) error + func (this *GovernanceView) Serialize(w io.Writer) error + type PeerAttributes struct + Field1 []byte + Field2 []byte + Field3 []byte + Field4 []byte + MaxAuthorize uint64 + PeerPubkey string + T1PeerCost uint64 + T2PeerCost uint64 + TPeerCost uint64 + func (this *PeerAttributes) Deserialization(source *common.ZeroCopySource) error + func (this *PeerAttributes) Serialization(sink *common.ZeroCopySink) + type PeerPoolItem struct + Address common.Address + Index uint32 + InitPos uint64 + PeerPubkey string + Status Status + TotalPos uint64 + func (this *PeerPoolItem) Deserialization(source *common.ZeroCopySource) error + func (this *PeerPoolItem) Serialization(sink *common.ZeroCopySink) + type PeerPoolList struct + Peers []*PeerPoolItem + type PeerPoolMap struct + PeerPoolMap map[string]*PeerPoolItem + func GetPeerPoolMap(native *native.NativeService, contract common.Address, view uint32) (*PeerPoolMap, error) + func (this *PeerPoolMap) Deserialization(source *common.ZeroCopySource) error + func (this *PeerPoolMap) Serialization(sink *common.ZeroCopySink) error + type PeerStakeInfo struct + Index uint32 + PeerPubkey string + Stake uint64 + type PenaltyStake struct + Amount uint64 + AuthorizePos uint64 + InitPos uint64 + PeerPubkey string + TimeOffset uint32 + func (this *PenaltyStake) Deserialization(source *common.ZeroCopySource) error + func (this *PenaltyStake) Serialization(sink *common.ZeroCopySink) + type PreConfig struct + Configuration *Configuration + SetView uint32 + func (this *PreConfig) Deserialization(source *common.ZeroCopySource) error + func (this *PreConfig) Serialization(sink *common.ZeroCopySink) + type PromisePos struct + PeerPubkey string + PromisePos uint64 + func (this *PromisePos) Deserialization(source *common.ZeroCopySource) error + func (this *PromisePos) Serialization(sink *common.ZeroCopySink) + type QuitNodeParam struct + Address common.Address + PeerPubkey string + func (this *QuitNodeParam) Deserialization(source *common.ZeroCopySource) error + func (this *QuitNodeParam) Serialization(sink *common.ZeroCopySink) + type RegisterCandidateParam struct + Address common.Address + Caller []byte + InitPos uint32 + KeyNo uint32 + PeerPubkey string + func (this *RegisterCandidateParam) Deserialization(source *common.ZeroCopySource) error + func (this *RegisterCandidateParam) Serialization(sink *common.ZeroCopySink) + type RejectCandidateParam struct + PeerPubkey string + func (this *RejectCandidateParam) Deserialization(source *common.ZeroCopySource) error + func (this *RejectCandidateParam) Serialization(sink *common.ZeroCopySink) + type SetPeerCostParam struct + Address common.Address + PeerCost uint32 + PeerPubkey string + func (this *SetPeerCostParam) Deserialization(source *common.ZeroCopySource) error + func (this *SetPeerCostParam) Serialization(sink *common.ZeroCopySink) error + type SplitCurve struct + Yi []uint32 + func (this *SplitCurve) Deserialization(source *common.ZeroCopySource) error + func (this *SplitCurve) Serialization(sink *common.ZeroCopySink) error + type SplitFeeAddress struct + Address common.Address + Amount uint64 + func (this *SplitFeeAddress) Deserialization(source *common.ZeroCopySource) error + func (this *SplitFeeAddress) Serialization(sink *common.ZeroCopySink) + type Status uint8 + const BlackStatus + const CandidateStatus + const ConsensusStatus + const QuitConsensusStatus + const QuitingStatus + const RegisterCandidateStatus + func (this *Status) Deserialization(source *common.ZeroCopySource) error + func (this *Status) Serialization(sink *common.ZeroCopySink) + type TotalStake struct + Address common.Address + Stake uint64 + TimeOffset uint32 + func (this *TotalStake) Deserialization(source *common.ZeroCopySource) error + func (this *TotalStake) Serialization(sink *common.ZeroCopySink) + type TransferPenaltyParam struct + Address common.Address + PeerPubkey string + func (this *TransferPenaltyParam) Deserialization(source *common.ZeroCopySource) error + func (this *TransferPenaltyParam) Serialization(sink *common.ZeroCopySink) + type UnRegisterCandidateParam struct + Address common.Address + PeerPubkey string + func (this *UnRegisterCandidateParam) Deserialization(source *common.ZeroCopySource) error + func (this *UnRegisterCandidateParam) Serialization(sink *common.ZeroCopySink) + type WhiteNodeParam struct + PeerPubkey string + func (this *WhiteNodeParam) Deserialization(source *common.ZeroCopySource) error + func (this *WhiteNodeParam) Serialization(sink *common.ZeroCopySink) + type WithdrawFeeParam struct + Address common.Address + func (this *WithdrawFeeParam) Deserialization(source *common.ZeroCopySource) error + func (this *WithdrawFeeParam) Serialization(sink *common.ZeroCopySink) + type WithdrawOngParam struct + Address common.Address + func (this *WithdrawOngParam) Deserialization(source *common.ZeroCopySource) error + func (this *WithdrawOngParam) Serialization(sink *common.ZeroCopySink) + type WithdrawParam struct + Address common.Address + PeerPubkeyList []string + WithdrawList []uint32 + func (this *WithdrawParam) Deserialization(source *common.ZeroCopySource) error + func (this *WithdrawParam) Serialization(sink *common.ZeroCopySink) error