Documentation ¶
Overview ¶
Copyright 2024 The Accumulate Authors
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file or at https://opensource.org/licenses/MIT.
Index ¶
- func EqualMessage(a, b Message) bool
- 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
- func (v *BlockProposal) Copy() *BlockProposal
- func (v *BlockProposal) CopyAsInterface() interface{}
- func (v *BlockProposal) Equal(u *BlockProposal) bool
- func (v *BlockProposal) IsValid() error
- func (v *BlockProposal) MarshalBinary() ([]byte, error)
- func (v *BlockProposal) MarshalJSON() ([]byte, error)
- func (v *BlockProposal) UnmarshalBinary(data []byte) error
- func (v *BlockProposal) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *BlockProposal) UnmarshalJSON(data []byte) error
- type BlockResults
- func (v *BlockResults) Copy() *BlockResults
- func (v *BlockResults) CopyAsInterface() interface{}
- func (v *BlockResults) Equal(u *BlockResults) bool
- func (v *BlockResults) IsValid() error
- func (v *BlockResults) MarshalBinary() ([]byte, error)
- func (v *BlockResults) MarshalJSON() ([]byte, error)
- func (v *BlockResults) UnmarshalBinary(data []byte) error
- func (v *BlockResults) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *BlockResults) UnmarshalJSON(data []byte) error
- type Capture
- type CheckRequest
- type CheckResponse
- type CommitRequest
- type CommitResponse
- type CommitResult
- func (v *CommitResult) Copy() *CommitResult
- func (v *CommitResult) CopyAsInterface() interface{}
- func (v *CommitResult) Equal(u *CommitResult) bool
- func (v *CommitResult) IsValid() error
- func (v *CommitResult) MarshalBinary() ([]byte, error)
- func (v *CommitResult) MarshalJSON() ([]byte, error)
- func (v *CommitResult) UnmarshalBinary(data []byte) error
- func (v *CommitResult) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *CommitResult) UnmarshalJSON(data []byte) error
- type ConsensusError
- type Dispatcher
- type EnvelopeSubmitted
- func (v *EnvelopeSubmitted) Copy() *EnvelopeSubmitted
- func (v *EnvelopeSubmitted) CopyAsInterface() interface{}
- func (v *EnvelopeSubmitted) Equal(u *EnvelopeSubmitted) bool
- func (v *EnvelopeSubmitted) IsValid() error
- func (v *EnvelopeSubmitted) MarshalBinary() ([]byte, error)
- func (v *EnvelopeSubmitted) MarshalJSON() ([]byte, error)
- func (*EnvelopeSubmitted) Type() messageType
- func (v *EnvelopeSubmitted) UnmarshalBinary(data []byte) error
- func (v *EnvelopeSubmitted) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *EnvelopeSubmitted) UnmarshalFieldsFrom(reader *encoding.Reader) error
- func (v *EnvelopeSubmitted) UnmarshalJSON(data []byte) error
- type ExecuteHookFunc
- type ExecuteRequest
- type ExecuteResponse
- type ExecutedBlock
- func (v *ExecutedBlock) Copy() *ExecutedBlock
- func (v *ExecutedBlock) CopyAsInterface() interface{}
- func (v *ExecutedBlock) Equal(u *ExecutedBlock) bool
- func (v *ExecutedBlock) IsValid() error
- func (v *ExecutedBlock) MarshalBinary() ([]byte, error)
- func (v *ExecutedBlock) MarshalJSON() ([]byte, error)
- func (*ExecutedBlock) Type() messageType
- func (v *ExecutedBlock) UnmarshalBinary(data []byte) error
- func (v *ExecutedBlock) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *ExecutedBlock) UnmarshalFieldsFrom(reader *encoding.Reader) error
- func (v *ExecutedBlock) UnmarshalJSON(data []byte) error
- 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)
- func (a *ExecutorApp) SetRecorder(rec Recorder)
- type Hub
- type InfoRequest
- type InfoResponse
- type InitRequest
- type InitResponse
- type LeaderProposal
- func (v *LeaderProposal) Copy() *LeaderProposal
- func (v *LeaderProposal) CopyAsInterface() interface{}
- func (v *LeaderProposal) Equal(u *LeaderProposal) bool
- func (v *LeaderProposal) IsValid() error
- func (v *LeaderProposal) MarshalBinary() ([]byte, error)
- func (v *LeaderProposal) MarshalJSON() ([]byte, error)
- func (v *LeaderProposal) UnmarshalBinary(data []byte) error
- func (v *LeaderProposal) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *LeaderProposal) UnmarshalJSON(data []byte) error
- type Message
- type Module
- type NetworkMessage
- 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 NodeMessage
- type Recorder
- type RestoreFunc
- type SimpleHub
- type StartBlock
- func (v *StartBlock) Copy() *StartBlock
- func (v *StartBlock) CopyAsInterface() interface{}
- func (v *StartBlock) Equal(u *StartBlock) bool
- func (v *StartBlock) IsValid() error
- func (v *StartBlock) MarshalBinary() ([]byte, error)
- func (v *StartBlock) MarshalJSON() ([]byte, error)
- func (*StartBlock) Type() messageType
- func (v *StartBlock) UnmarshalBinary(data []byte) error
- func (v *StartBlock) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *StartBlock) UnmarshalFieldsFrom(reader *encoding.Reader) error
- func (v *StartBlock) UnmarshalJSON(data []byte) error
- type StatusRequest
- type StatusResponse
- type SubmitEnvelope
- func (v *SubmitEnvelope) Copy() *SubmitEnvelope
- func (v *SubmitEnvelope) CopyAsInterface() interface{}
- func (v *SubmitEnvelope) Equal(u *SubmitEnvelope) bool
- func (v *SubmitEnvelope) IsValid() error
- func (v *SubmitEnvelope) MarshalBinary() ([]byte, error)
- func (v *SubmitEnvelope) MarshalJSON() ([]byte, error)
- func (s *SubmitEnvelope) PartitionID() string
- func (*SubmitEnvelope) Type() messageType
- func (v *SubmitEnvelope) UnmarshalBinary(data []byte) error
- func (v *SubmitEnvelope) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *SubmitEnvelope) UnmarshalFieldsFrom(reader *encoding.Reader) error
- func (v *SubmitEnvelope) UnmarshalJSON(data []byte) error
- type ValidatorUpdate
- func (v *ValidatorUpdate) Copy() *ValidatorUpdate
- func (v *ValidatorUpdate) CopyAsInterface() interface{}
- func (v *ValidatorUpdate) Equal(u *ValidatorUpdate) bool
- func (v *ValidatorUpdate) IsValid() error
- func (v *ValidatorUpdate) MarshalBinary() ([]byte, error)
- func (v *ValidatorUpdate) MarshalJSON() ([]byte, error)
- func (v *ValidatorUpdate) UnmarshalBinary(data []byte) error
- func (v *ValidatorUpdate) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *ValidatorUpdate) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualMessage ¶ added in v1.4.0
EqualMessage is used to compare the values of the union
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 `json:"index,omitempty" form:"index" query:"index" validate:"required"` Time time.Time `json:"time,omitempty" form:"time" query:"time" validate:"required"` Envelopes []*messaging.Envelope `json:"envelopes,omitempty" form:"envelopes" query:"envelopes" validate:"required"` // contains filtered or unexported fields }
func (*BlockProposal) Copy ¶ added in v1.4.0
func (v *BlockProposal) Copy() *BlockProposal
func (*BlockProposal) CopyAsInterface ¶ added in v1.4.0
func (v *BlockProposal) CopyAsInterface() interface{}
func (*BlockProposal) Equal ¶ added in v1.4.0
func (v *BlockProposal) Equal(u *BlockProposal) bool
func (*BlockProposal) IsValid ¶ added in v1.4.0
func (v *BlockProposal) IsValid() error
func (*BlockProposal) MarshalBinary ¶ added in v1.4.0
func (v *BlockProposal) MarshalBinary() ([]byte, error)
func (*BlockProposal) MarshalJSON ¶ added in v1.4.0
func (v *BlockProposal) MarshalJSON() ([]byte, error)
func (*BlockProposal) UnmarshalBinary ¶ added in v1.4.0
func (v *BlockProposal) UnmarshalBinary(data []byte) error
func (*BlockProposal) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *BlockProposal) UnmarshalBinaryFrom(rd io.Reader) error
func (*BlockProposal) UnmarshalJSON ¶ added in v1.4.0
func (v *BlockProposal) UnmarshalJSON(data []byte) error
type BlockResults ¶ added in v1.4.0
type BlockResults struct { MessageResults []*protocol.TransactionStatus `json:"messageResults,omitempty" form:"messageResults" query:"messageResults" validate:"required"` ValidatorUpdates []*ValidatorUpdate `json:"validatorUpdates,omitempty" form:"validatorUpdates" query:"validatorUpdates" validate:"required"` // contains filtered or unexported fields }
func (*BlockResults) Copy ¶ added in v1.4.0
func (v *BlockResults) Copy() *BlockResults
func (*BlockResults) CopyAsInterface ¶ added in v1.4.0
func (v *BlockResults) CopyAsInterface() interface{}
func (*BlockResults) Equal ¶ added in v1.4.0
func (v *BlockResults) Equal(u *BlockResults) bool
func (*BlockResults) IsValid ¶ added in v1.4.0
func (v *BlockResults) IsValid() error
func (*BlockResults) MarshalBinary ¶ added in v1.4.0
func (v *BlockResults) MarshalBinary() ([]byte, error)
func (*BlockResults) MarshalJSON ¶ added in v1.4.0
func (v *BlockResults) MarshalJSON() ([]byte, error)
func (*BlockResults) UnmarshalBinary ¶ added in v1.4.0
func (v *BlockResults) UnmarshalBinary(data []byte) error
func (*BlockResults) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *BlockResults) UnmarshalBinaryFrom(rd io.Reader) error
func (*BlockResults) UnmarshalJSON ¶ added in v1.4.0
func (v *BlockResults) UnmarshalJSON(data []byte) error
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 `json:"hash,omitempty" form:"hash" query:"hash" validate:"required"` // contains filtered or unexported fields }
func (*CommitResult) Copy ¶ added in v1.4.0
func (v *CommitResult) Copy() *CommitResult
func (*CommitResult) CopyAsInterface ¶ added in v1.4.0
func (v *CommitResult) CopyAsInterface() interface{}
func (*CommitResult) Equal ¶ added in v1.4.0
func (v *CommitResult) Equal(u *CommitResult) bool
func (*CommitResult) IsValid ¶ added in v1.4.0
func (v *CommitResult) IsValid() error
func (*CommitResult) MarshalBinary ¶ added in v1.4.0
func (v *CommitResult) MarshalBinary() ([]byte, error)
func (*CommitResult) MarshalJSON ¶ added in v1.4.0
func (v *CommitResult) MarshalJSON() ([]byte, error)
func (*CommitResult) UnmarshalBinary ¶ added in v1.4.0
func (v *CommitResult) UnmarshalBinary(data []byte) error
func (*CommitResult) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *CommitResult) UnmarshalBinaryFrom(rd io.Reader) error
func (*CommitResult) UnmarshalJSON ¶ added in v1.4.0
func (v *CommitResult) UnmarshalJSON(data []byte) error
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 EnvelopeSubmitted ¶ added in v1.4.0
type EnvelopeSubmitted struct { Results []*protocol.TransactionStatus `json:"results,omitempty" form:"results" query:"results" validate:"required"` // contains filtered or unexported fields }
func (*EnvelopeSubmitted) Copy ¶ added in v1.4.0
func (v *EnvelopeSubmitted) Copy() *EnvelopeSubmitted
func (*EnvelopeSubmitted) CopyAsInterface ¶ added in v1.4.0
func (v *EnvelopeSubmitted) CopyAsInterface() interface{}
func (*EnvelopeSubmitted) Equal ¶ added in v1.4.0
func (v *EnvelopeSubmitted) Equal(u *EnvelopeSubmitted) bool
func (*EnvelopeSubmitted) IsValid ¶ added in v1.4.0
func (v *EnvelopeSubmitted) IsValid() error
func (*EnvelopeSubmitted) MarshalBinary ¶ added in v1.4.0
func (v *EnvelopeSubmitted) MarshalBinary() ([]byte, error)
func (*EnvelopeSubmitted) MarshalJSON ¶ added in v1.4.0
func (v *EnvelopeSubmitted) MarshalJSON() ([]byte, error)
func (*EnvelopeSubmitted) Type ¶ added in v1.4.0
func (*EnvelopeSubmitted) Type() messageType
func (*EnvelopeSubmitted) UnmarshalBinary ¶ added in v1.4.0
func (v *EnvelopeSubmitted) UnmarshalBinary(data []byte) error
func (*EnvelopeSubmitted) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *EnvelopeSubmitted) UnmarshalBinaryFrom(rd io.Reader) error
func (*EnvelopeSubmitted) UnmarshalFieldsFrom ¶ added in v1.4.0
func (v *EnvelopeSubmitted) UnmarshalFieldsFrom(reader *encoding.Reader) error
func (*EnvelopeSubmitted) UnmarshalJSON ¶ added in v1.4.0
func (v *EnvelopeSubmitted) UnmarshalJSON(data []byte) error
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 ExecutedBlock struct { Network string `json:"network,omitempty" form:"network" query:"network" validate:"required"` Node [32]byte `json:"node,omitempty" form:"node" query:"node" validate:"required"` // contains filtered or unexported fields }
func (*ExecutedBlock) Copy ¶ added in v1.4.0
func (v *ExecutedBlock) Copy() *ExecutedBlock
func (*ExecutedBlock) CopyAsInterface ¶ added in v1.4.0
func (v *ExecutedBlock) CopyAsInterface() interface{}
func (*ExecutedBlock) Equal ¶ added in v1.4.0
func (v *ExecutedBlock) Equal(u *ExecutedBlock) bool
func (*ExecutedBlock) IsValid ¶ added in v1.4.0
func (v *ExecutedBlock) IsValid() error
func (*ExecutedBlock) MarshalBinary ¶ added in v1.4.0
func (v *ExecutedBlock) MarshalBinary() ([]byte, error)
func (*ExecutedBlock) MarshalJSON ¶ added in v1.4.0
func (v *ExecutedBlock) MarshalJSON() ([]byte, error)
func (*ExecutedBlock) Type ¶ added in v1.4.0
func (*ExecutedBlock) Type() messageType
func (*ExecutedBlock) UnmarshalBinary ¶ added in v1.4.0
func (v *ExecutedBlock) UnmarshalBinary(data []byte) error
func (*ExecutedBlock) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *ExecutedBlock) UnmarshalBinaryFrom(rd io.Reader) error
func (*ExecutedBlock) UnmarshalFieldsFrom ¶ added in v1.4.0
func (v *ExecutedBlock) UnmarshalFieldsFrom(reader *encoding.Reader) error
func (*ExecutedBlock) UnmarshalJSON ¶ added in v1.4.0
func (v *ExecutedBlock) UnmarshalJSON(data []byte) error
type ExecutorApp ¶
type ExecutorApp struct { Executor execute.Executor Restore RestoreFunc EventBus *events.Bus Record Recorder }
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)
func (*ExecutorApp) SetRecorder ¶ added in v1.4.0
func (a *ExecutorApp) SetRecorder(rec Recorder)
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 `json:"leader,omitempty" form:"leader" query:"leader" validate:"required"` // contains filtered or unexported fields }
func (*LeaderProposal) Copy ¶ added in v1.4.0
func (v *LeaderProposal) Copy() *LeaderProposal
func (*LeaderProposal) CopyAsInterface ¶ added in v1.4.0
func (v *LeaderProposal) CopyAsInterface() interface{}
func (*LeaderProposal) Equal ¶ added in v1.4.0
func (v *LeaderProposal) Equal(u *LeaderProposal) bool
func (*LeaderProposal) IsValid ¶ added in v1.4.0
func (v *LeaderProposal) IsValid() error
func (*LeaderProposal) MarshalBinary ¶ added in v1.4.0
func (v *LeaderProposal) MarshalBinary() ([]byte, error)
func (*LeaderProposal) MarshalJSON ¶ added in v1.4.0
func (v *LeaderProposal) MarshalJSON() ([]byte, error)
func (*LeaderProposal) UnmarshalBinary ¶ added in v1.4.0
func (v *LeaderProposal) UnmarshalBinary(data []byte) error
func (*LeaderProposal) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *LeaderProposal) UnmarshalBinaryFrom(rd io.Reader) error
func (*LeaderProposal) UnmarshalJSON ¶ added in v1.4.0
func (v *LeaderProposal) UnmarshalJSON(data []byte) error
type Message ¶ added in v1.4.0
type Message interface { encoding.UnionValue Type() messageType // contains filtered or unexported methods }
A Message is a message sent between modules.
func CopyMessage ¶ added in v1.4.0
CopyMessage copies a Message.
func NewMessage ¶ added in v1.4.0
NewMessage creates a new Message for the specified messageType.
func UnmarshalMessage ¶ added in v1.4.0
UnmarshalMessage unmarshals a Message.
func UnmarshalMessageFrom ¶ added in v1.4.0
UnmarshalMessageFrom unmarshals a Message.
func UnmarshalMessageJSON ¶ added in v1.4.0
UnmarshalMessageJson unmarshals a Message.
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 NetworkMessage ¶ added in v1.4.0
A NetworkMessage is a message that is specific to a 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 NodeMessage ¶ added in v1.4.0
type NodeMessage interface { NetworkMessage SenderID() [32]byte }
nodeMessages are passed between nodes.
type Recorder ¶
type Recorder interface { DidInit(snapshot ioutil.SectionReader) error DidReceiveMessages([]Message) error DidCommitBlock(state execute.BlockState) 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 StartBlock ¶ added in v1.4.0
type StartBlock struct {
// contains filtered or unexported fields
}
func (*StartBlock) Copy ¶ added in v1.4.0
func (v *StartBlock) Copy() *StartBlock
func (*StartBlock) CopyAsInterface ¶ added in v1.4.0
func (v *StartBlock) CopyAsInterface() interface{}
func (*StartBlock) Equal ¶ added in v1.4.0
func (v *StartBlock) Equal(u *StartBlock) bool
func (*StartBlock) IsValid ¶ added in v1.4.0
func (v *StartBlock) IsValid() error
func (*StartBlock) MarshalBinary ¶ added in v1.4.0
func (v *StartBlock) MarshalBinary() ([]byte, error)
func (*StartBlock) MarshalJSON ¶ added in v1.4.0
func (v *StartBlock) MarshalJSON() ([]byte, error)
func (*StartBlock) Type ¶ added in v1.4.0
func (*StartBlock) Type() messageType
func (*StartBlock) UnmarshalBinary ¶ added in v1.4.0
func (v *StartBlock) UnmarshalBinary(data []byte) error
func (*StartBlock) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *StartBlock) UnmarshalBinaryFrom(rd io.Reader) error
func (*StartBlock) UnmarshalFieldsFrom ¶ added in v1.4.0
func (v *StartBlock) UnmarshalFieldsFrom(reader *encoding.Reader) error
func (*StartBlock) UnmarshalJSON ¶ added in v1.4.0
func (v *StartBlock) UnmarshalJSON(data []byte) error
type StatusRequest ¶ added in v1.2.10
type StatusRequest struct{}
type StatusResponse ¶ added in v1.2.10
type SubmitEnvelope ¶ added in v1.4.0
type SubmitEnvelope struct { Network string `json:"network,omitempty" form:"network" query:"network" validate:"required"` Envelope *messaging.Envelope `json:"envelope,omitempty" form:"envelope" query:"envelope" validate:"required"` Pretend bool `json:"pretend,omitempty" form:"pretend" query:"pretend" validate:"required"` // contains filtered or unexported fields }
func (*SubmitEnvelope) Copy ¶ added in v1.4.0
func (v *SubmitEnvelope) Copy() *SubmitEnvelope
func (*SubmitEnvelope) CopyAsInterface ¶ added in v1.4.0
func (v *SubmitEnvelope) CopyAsInterface() interface{}
func (*SubmitEnvelope) Equal ¶ added in v1.4.0
func (v *SubmitEnvelope) Equal(u *SubmitEnvelope) bool
func (*SubmitEnvelope) IsValid ¶ added in v1.4.0
func (v *SubmitEnvelope) IsValid() error
func (*SubmitEnvelope) MarshalBinary ¶ added in v1.4.0
func (v *SubmitEnvelope) MarshalBinary() ([]byte, error)
func (*SubmitEnvelope) MarshalJSON ¶ added in v1.4.0
func (v *SubmitEnvelope) MarshalJSON() ([]byte, error)
func (*SubmitEnvelope) PartitionID ¶ added in v1.4.0
func (s *SubmitEnvelope) PartitionID() string
func (*SubmitEnvelope) Type ¶ added in v1.4.0
func (*SubmitEnvelope) Type() messageType
func (*SubmitEnvelope) UnmarshalBinary ¶ added in v1.4.0
func (v *SubmitEnvelope) UnmarshalBinary(data []byte) error
func (*SubmitEnvelope) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *SubmitEnvelope) UnmarshalBinaryFrom(rd io.Reader) error
func (*SubmitEnvelope) UnmarshalFieldsFrom ¶ added in v1.4.0
func (v *SubmitEnvelope) UnmarshalFieldsFrom(reader *encoding.Reader) error
func (*SubmitEnvelope) UnmarshalJSON ¶ added in v1.4.0
func (v *SubmitEnvelope) UnmarshalJSON(data []byte) error
type ValidatorUpdate ¶ added in v1.4.0
type ValidatorUpdate struct { Type protocol.SignatureType `json:"type,omitempty" form:"type" query:"type" validate:"required"` PublicKey []byte `json:"publicKey,omitempty" form:"publicKey" query:"publicKey" validate:"required"` Power int64 `json:"power,omitempty" form:"power" query:"power" validate:"required"` // contains filtered or unexported fields }
func (*ValidatorUpdate) Copy ¶ added in v1.4.0
func (v *ValidatorUpdate) Copy() *ValidatorUpdate
func (*ValidatorUpdate) CopyAsInterface ¶ added in v1.4.0
func (v *ValidatorUpdate) CopyAsInterface() interface{}
func (*ValidatorUpdate) Equal ¶ added in v1.4.0
func (v *ValidatorUpdate) Equal(u *ValidatorUpdate) bool
func (*ValidatorUpdate) IsValid ¶ added in v1.4.0
func (v *ValidatorUpdate) IsValid() error
func (*ValidatorUpdate) MarshalBinary ¶ added in v1.4.0
func (v *ValidatorUpdate) MarshalBinary() ([]byte, error)
func (*ValidatorUpdate) MarshalJSON ¶ added in v1.4.0
func (v *ValidatorUpdate) MarshalJSON() ([]byte, error)
func (*ValidatorUpdate) UnmarshalBinary ¶ added in v1.4.0
func (v *ValidatorUpdate) UnmarshalBinary(data []byte) error
func (*ValidatorUpdate) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *ValidatorUpdate) UnmarshalBinaryFrom(rd io.Reader) error
func (*ValidatorUpdate) UnmarshalJSON ¶ added in v1.4.0
func (v *ValidatorUpdate) UnmarshalJSON(data []byte) error