Documentation
¶
Index ¶
- type AbciApp
- func (a *AbciApp) Check(req *CheckRequest) (*CheckResponse, error)
- func (a *AbciApp) Commit(req *CommitRequest) (*CommitResponse, error)
- func (a *AbciApp) Execute(req *ExecuteRequest) (*ExecuteResponse, error)
- func (a *AbciApp) Info(*InfoRequest) (*InfoResponse, error)
- func (a *AbciApp) Init(req *InitRequest) (*InitResponse, error)
- type App
- type BlockProposal
- type BlockResults
- type Capture
- type CheckRequest
- type CheckResponse
- type CommitRequest
- type CommitResponse
- type CommitResult
- type ConsensusError
- type Dispatcher
- type ExecuteHookFunc
- type ExecuteRequest
- type ExecuteResponse
- type ExecutedBlock
- type ExecutorApp
- func (a *ExecutorApp) Check(req *CheckRequest) (*CheckResponse, error)
- func (a *ExecutorApp) Commit(req *CommitRequest) (*CommitResponse, error)
- func (a *ExecutorApp) Execute(req *ExecuteRequest) (*ExecuteResponse, error)
- func (a *ExecutorApp) Info(*InfoRequest) (*InfoResponse, error)
- func (a *ExecutorApp) Init(req *InitRequest) (*InitResponse, error)
- type Hub
- type InfoRequest
- type InfoResponse
- type InitRequest
- type InitResponse
- type LeaderProposal
- type Message
- type Module
- type Node
- func (n *Node) Info(req *InfoRequest) (*InfoResponse, error)
- func (n *Node) Init(req *InitRequest) (*InitResponse, error)
- func (n *Node) Receive(messages ...Message) ([]Message, error)
- func (n *Node) SetExecuteHook(hook ExecuteHookFunc)
- func (n *Node) SetRecorder(rec Recorder)
- func (n *Node) Status(*StatusRequest) (*StatusResponse, error)
- type Recorder
- type Response
- type RestoreFunc
- type SimpleHub
- type StartBlock
- type StatusRequest
- type StatusResponse
- type Submission
- type SubmissionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbciApp ¶ added in v1.4.0
type AbciApp abci.Accumulator
func (*AbciApp) Check ¶ added in v1.4.0
func (a *AbciApp) Check(req *CheckRequest) (*CheckResponse, error)
func (*AbciApp) Commit ¶ added in v1.4.0
func (a *AbciApp) Commit(req *CommitRequest) (*CommitResponse, error)
func (*AbciApp) Execute ¶ added in v1.4.0
func (a *AbciApp) Execute(req *ExecuteRequest) (*ExecuteResponse, error)
func (*AbciApp) Info ¶ added in v1.4.0
func (a *AbciApp) Info(*InfoRequest) (*InfoResponse, error)
func (*AbciApp) Init ¶ added in v1.4.0
func (a *AbciApp) Init(req *InitRequest) (*InitResponse, error)
type App ¶
type App interface { Info(*InfoRequest) (*InfoResponse, error) Check(*CheckRequest) (*CheckResponse, error) Init(*InitRequest) (*InitResponse, error) Execute(*ExecuteRequest) (*ExecuteResponse, error) Commit(*CommitRequest) (*CommitResponse, error) }
type BlockProposal ¶ added in v1.4.0
type BlockProposal struct { LeaderProposal Index uint64 Time time.Time Envelopes []*messaging.Envelope }
func (*BlockProposal) Equal ¶ added in v1.4.0
func (b *BlockProposal) Equal(c *BlockProposal) bool
type BlockResults ¶ added in v1.4.0
type BlockResults struct { MessageResults []*protocol.TransactionStatus ValidatorUpdates []*execute.ValidatorUpdate }
func (*BlockResults) Equal ¶ added in v1.4.0
func (b *BlockResults) Equal(c *BlockResults) bool
type CheckRequest ¶
type CheckResponse ¶
type CheckResponse struct {
Results []*protocol.TransactionStatus
}
type CommitRequest ¶ added in v1.4.0
type CommitRequest struct {
Block any
}
type CommitResponse ¶ added in v1.4.0
type CommitResponse struct {
Hash [32]byte
}
type CommitResult ¶ added in v1.4.0
type CommitResult struct {
Hash [32]byte
}
type ConsensusError ¶ added in v1.4.0
A ConsensusError is produced when nodes produce conflicting results.
func (*ConsensusError[V]) Error ¶ added in v1.4.0
func (e *ConsensusError[V]) Error() string
type Dispatcher ¶ added in v1.4.0
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶ added in v1.4.0
func NewDispatcher(router routing.Router) *Dispatcher
func (*Dispatcher) Receive ¶ added in v1.4.0
func (d *Dispatcher) Receive(messages ...Message) ([]Message, error)
Receive returns the queued messages.
type ExecuteHookFunc ¶ added in v1.2.10
type ExecuteRequest ¶ added in v1.2.10
type ExecuteRequest struct { Params execute.BlockParams Envelopes []*messaging.Envelope }
type ExecuteResponse ¶ added in v1.2.10
type ExecuteResponse struct { Block any Results []*protocol.TransactionStatus Updates []*execute.ValidatorUpdate }
type ExecutedBlock ¶ added in v1.4.0
type ExecutorApp ¶
type ExecutorApp struct { Executor execute.Executor Restore RestoreFunc EventBus *events.Bus }
func (*ExecutorApp) Check ¶
func (a *ExecutorApp) Check(req *CheckRequest) (*CheckResponse, error)
func (*ExecutorApp) Commit ¶ added in v1.4.0
func (a *ExecutorApp) Commit(req *CommitRequest) (*CommitResponse, error)
func (*ExecutorApp) Execute ¶ added in v1.4.0
func (a *ExecutorApp) Execute(req *ExecuteRequest) (*ExecuteResponse, error)
func (*ExecutorApp) Info ¶
func (a *ExecutorApp) Info(*InfoRequest) (*InfoResponse, error)
func (*ExecutorApp) Init ¶
func (a *ExecutorApp) Init(req *InitRequest) (*InitResponse, error)
type InfoRequest ¶
type InfoRequest struct{}
type InfoResponse ¶
type InfoResponse struct { LastBlock *execute.BlockParams LastHash [32]byte }
type InitRequest ¶
type InitRequest struct { Snapshot ioutil.SectionReader Validators []*execute.ValidatorUpdate }
type InitResponse ¶
type InitResponse struct { Hash []byte Validators []*execute.ValidatorUpdate }
type LeaderProposal ¶ added in v1.4.0
type LeaderProposal struct {
Leader [32]byte
}
type Message ¶ added in v1.4.0
type Message interface {
// contains filtered or unexported methods
}
A Message is a message sent between modules.
type Module ¶ added in v1.4.0
type Module interface { // Receive processes messages, potentially mutating the state of the module // and returning messages to broadcast. Receive(...Message) ([]Message, error) }
A Module is a component of a consensus network.
type Node ¶
type Node struct { // SkipProposalCheck skips checking the proposed block. SkipProposalCheck bool // IgnoreDeliverResults ignores inconsistencies in the result of DeliverTx // (the results of transactions and signatures). IgnoreDeliverResults bool // IgnoreCommitResults ignores inconsistencies in the result of Commit (the // root hash of the BPT). IgnoreCommitResults bool // contains filtered or unexported fields }
func (*Node) Info ¶
func (n *Node) Info(req *InfoRequest) (*InfoResponse, error)
func (*Node) Init ¶
func (n *Node) Init(req *InitRequest) (*InitResponse, error)
func (*Node) SetExecuteHook ¶ added in v1.2.10
func (n *Node) SetExecuteHook(hook ExecuteHookFunc)
func (*Node) SetRecorder ¶ added in v1.2.10
func (*Node) Status ¶ added in v1.2.10
func (n *Node) Status(*StatusRequest) (*StatusResponse, error)
type Recorder ¶
type Recorder interface { DidInit(snapshot ioutil.SectionReader) error DidExecuteBlock(state execute.BlockState, submissions []*messaging.Envelope) error }
type RestoreFunc ¶ added in v1.2.10
type RestoreFunc func(ioutil.SectionReader) error
type SimpleHub ¶ added in v1.4.0
type SimpleHub struct {
// contains filtered or unexported fields
}
SimpleHub is a simple implementation of Hub.
func NewSimpleHub ¶ added in v1.4.0
type StatusRequest ¶ added in v1.2.10
type StatusRequest struct{}
type StatusResponse ¶ added in v1.2.10
type Submission ¶
type SubmissionResponse ¶
type SubmissionResponse struct {
Results []*protocol.TransactionStatus
}
func (*SubmissionResponse) Equal ¶
func (s *SubmissionResponse) Equal(r *SubmissionResponse) bool
Click to show internal directories.
Click to hide internal directories.