Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPhalanxProvider ¶
func NewPhalanxProvider(oLeader uint64, byz bool, openLatency int, duration time.Duration, interval int, cDuration time.Duration, n int, multi int, logCount int, memSize int, author uint64, commandSize int, exec external.ExecutionService, network external.NetworkService, logger external.Logger, selected uint64) *phalanxImpl
Types ¶
type Communicator ¶
type Communicator interface { // ReceiveCommand is used to process the commands from clients. ReceiveCommand(command *protos.Command) // ReceiveConsensusMessage is used process the consensus messages from phalanx replica. ReceiveConsensusMessage(message *protos.ConsensusMessage) error }
Communicator is used to process messages from network.
type Executor ¶
type Executor interface { // CommitProposal is used to commit the phalanx proposal which has been verified with consensus. CommitProposal(pBatch *protos.PartialOrderBatch) error }
Executor is used to execute the phalanx objects.
type Generator ¶
type Generator interface { // MakeProposal is used to generate phalanx proposal for consensus. MakeProposal() (*protos.PartialOrderBatch, error) }
Generator is used to generate essential messages.
type Proposer ¶
type Proposer interface { // ReceiveTransaction is used to process transaction we have received. ReceiveTransaction(tx *protos.Transaction) }
Proposer is used to generate phalanx commands by the transactions received.
type Provider ¶
type Provider interface { api.Runner Proposer Communicator Generator Executor // QueryMetrics returns the metrics info of phalanx. QueryMetrics() types.MetricsInfo }
Provider is the phalanx service provider for all kinds of consensus algorithm, such as PBFT or HS.
Click to show internal directories.
Click to hide internal directories.