Versions in this module Expand all Collapse all v1 v1.0.2 Aug 16, 2022 v1.0.1 Aug 8, 2022 Changes in this version + const MaxNextHopChoice + const SigChainMiningHeightOffset + const SigChainPropagationHeightOffset + func InitPorServer(account *vault.Account, id []byte, s Store, l LocalNode) error + func SignatureHashWithPenalty(sc *pb.SigChain) ([]byte, error) + func VerifyID(sc *pb.SigChain, height uint32) error + func VerifySigChainLight(sc *pb.SigChain, height uint32) error + func VerifySigChainMeta(sc *pb.SigChain, height uint32) error + func VerifySigChainPath(sc *pb.SigChain, height uint32) error + func VerifySigChainSignatures(sc *pb.SigChain) error + type BacktrackSigChainInfo struct + DestSigChainElem *pb.SigChainElem + PrevHash []byte + type LocalNode interface + VerifySigChainObjection func(sc *pb.SigChain, reporterID []byte, height uint32) (int, error) + type PinSigChainInfo struct + PrevHash []byte + type PorPackage struct + BlockHash []byte + Height uint32 + SigChain *pb.SigChain + SigHash []byte + TxHash []byte + VoteForHeight uint32 + func NewPorPackage(txn *transaction.Transaction) (*PorPackage, error) + type PorPackages []*PorPackage + func (c PorPackages) Len() int + func (c PorPackages) Less(i, j int) bool + func (c PorPackages) Swap(i, j int) + type PorServer struct + func GetPorServer() *PorServer + func NewPorServer(account *vault.Account, id []byte) *PorServer + func (ps *PorServer) AddDestSigChainElem(blockHash, lastHash []byte, sigChainLen int, destElem *pb.SigChainElem) (bool, error) + func (ps *PorServer) AddSigChainFromTx(txn *transaction.Transaction, currentHeight uint32) (*PorPackage, error) + func (ps *PorServer) AddSigChainObjection(currentHeight, voteForHeight uint32, sigHash, reporterPubkey []byte) bool + func (ps *PorServer) BacktrackSigChain(elems []*pb.SigChainElem, hash, senderPubkey []byte) ([]*pb.SigChainElem, []byte, []byte, error) + func (ps *PorServer) BacktrackSigChainSuccess(hash []byte) + func (ps *PorServer) CreateSigChainForClient(nonce, dataSize uint32, blockHash []byte, ...) (*pb.SigChain, error) + func (ps *PorServer) FlushSigChain(blockHash []byte) + func (ps *PorServer) GetMiningSigChainTxnHash(voteForHeight uint32) (common.Uint256, error) + func (ps *PorServer) GetOrComputeVrf(data []byte) ([]byte, []byte, error) + func (ps *PorServer) GetSigChainTxn(txnHash common.Uint256) (*transaction.Transaction, error) + func (ps *PorServer) GetSigChainTxnByShortHash(shortHash []byte) (*transaction.Transaction, error) + func (ps *PorServer) GetSigChainTxnBySigHash(sigHash []byte) (*transaction.Transaction, error) + func (ps *PorServer) PinSigChain(hash, senderPubkey []byte) ([]byte, []byte, error) + func (ps *PorServer) PinSigChainSuccess(hash []byte) + func (ps *PorServer) PinSrcSigChain(signature []byte) error + func (ps *PorServer) PopSrcSigChainFromCache(signature []byte) (*pb.SigChain, error) + func (ps *PorServer) ShouldAddSigChainToCache(currentHeight, voteForHeight uint32, sigHash []byte, replace bool) bool + func (ps *PorServer) ShouldSignDestSigChainElem(blockHash, lastHash []byte, sigChainLen int) bool + func (ps *PorServer) UpdateRelayMessage(relayMessage *pb.Relay, nextPubkey, prevNodeID []byte, mining bool) error + type RecentMiner map[string]int + func GetRecentMiner(blockHash []byte) (RecentMiner, error) + type SkipMiner [][]byte + func GetSkipMiner(blockHash []byte) (SkipMiner, error) + type Store interface + GetHeaderWithCache func(hash common.Uint256) (*block.Header, error) + GetHeightByBlockHash func(hash common.Uint256) (uint32, error) + GetID func(publicKey []byte, height uint32) ([]byte, error) + GetSigChainWithCache func(hash common.Uint256) (*pb.SigChain, error)