smart_bft

package
v1.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2022 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNode

func NewNode(opts ...order.Option) (order.Order, error)

NewNode new smartbft node

Types

type GetAccountNonceFunc

type GetAccountNonceFunc func(address *types.Address) uint64

type Node

type Node struct {
	// contains filtered or unexported fields
}

func (*Node) AssembleProposal

func (n *Node) AssembleProposal(metadata []byte, requests [][]byte) bft.Proposal

func (*Node) AuxiliaryData

func (n *Node) AuxiliaryData(bytes []byte) []byte

func (*Node) Commit

func (n *Node) Commit() chan *pb.CommitEvent

func (*Node) DelNode

func (n *Node) DelNode(delID uint64) error

func (*Node) Deliver

func (n *Node) Deliver(proposal bft.Proposal, signature []bft.Signature) bft.Reconfig

func (*Node) GetPendingNonceByAccount

func (n *Node) GetPendingNonceByAccount(account string) uint64

func (*Node) GetPendingTxByHash

func (n *Node) GetPendingTxByHash(hash *types.Hash) pb.Transaction

func (*Node) MembershipChange

func (n *Node) MembershipChange() bool

func (*Node) Nodes

func (n *Node) Nodes() []uint64

func (*Node) Prepare

func (n *Node) Prepare(tx pb.Transaction) error

func (*Node) Quorum

func (n *Node) Quorum() uint64

func (*Node) Ready

func (n *Node) Ready() error

func (*Node) ReportState

func (n *Node) ReportState(height uint64, blockHash *types.Hash, txHashList []*types.Hash)

func (*Node) RequestID

func (n *Node) RequestID(req []byte) bft.RequestInfo

func (*Node) RequestsFromProposal

func (n *Node) RequestsFromProposal(proposal bft.Proposal) []bft.RequestInfo

func (*Node) SendConsensus

func (n *Node) SendConsensus(targetID uint64, m *smartbftprotos.Message)

func (*Node) SendTransaction

func (n *Node) SendTransaction(targetID uint64, request []byte)

func (*Node) Sign

func (n *Node) Sign(bytes []byte) []byte

func (*Node) SignProposal

func (n *Node) SignProposal(proposal bft.Proposal, auxiliaryInput []byte) *bft.Signature

func (*Node) Start

func (n *Node) Start() error

func (*Node) Step

func (n *Node) Step(msg []byte) error

func (*Node) Stop

func (n *Node) Stop()

func (*Node) SubscribeTxEvent

func (n *Node) SubscribeTxEvent(events chan<- pb.Transactions) event.Subscription

func (*Node) Sync

func (n *Node) Sync() bft.SyncResponse

Sync TODO:sync block from others peer

func (*Node) VerificationSequence

func (n *Node) VerificationSequence() uint64

func (*Node) VerifyConsenterSig

func (n *Node) VerifyConsenterSig(signature bft.Signature, prop bft.Proposal) ([]byte, error)

func (*Node) VerifyProposal

func (n *Node) VerifyProposal(proposal bft.Proposal) ([]bft.RequestInfo, error)

func (*Node) VerifyRequest

func (n *Node) VerifyRequest(val []byte) (bft.RequestInfo, error)

func (*Node) VerifySignature

func (n *Node) VerifySignature(signature bft.Signature) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL