const ( // MinimumExpirationWarningInterval is the default minimum time interval // between consecutive warnings about certificate expiration. MinimumExpirationWarningInterval = time.Minute * 5 )
const ( // RetryTimeout is the time the block puller retries. RetryTimeout = time.Second * 10 )
var ( EgressQueueLengthOpts = metrics.GaugeOpts{ Namespace: "cluster", Subsystem: "comm", Name: "egress_queue_length", Help: "Length of the egress queue.", LabelNames: []string{"host", "msg_type", "channel"}, StatsdFormat: "%{#fqname}.%{host}.%{msg_type}.%{channel}", } EgressQueueCapacityOpts = metrics.GaugeOpts{ Namespace: "cluster", Subsystem: "comm", Name: "egress_queue_capacity", Help: "Capacity of the egress queue.", LabelNames: []string{"host", "msg_type", "channel"}, StatsdFormat: "%{#fqname}.%{host}.%{msg_type}.%{channel}", } EgressWorkersOpts = metrics.GaugeOpts{ Namespace: "cluster", Subsystem: "comm", Name: "egress_queue_workers", Help: "Count of egress queue workers.", LabelNames: []string{"channel"}, StatsdFormat: "%{#fqname}.%{channel}", } IngressStreamsCountOpts = metrics.GaugeOpts{ Namespace: "cluster", Subsystem: "comm", Name: "ingress_stream_count", Help: "Count of streams from other nodes.", StatsdFormat: "%{#fqname}", } EgressStreamsCountOpts = metrics.GaugeOpts{ Namespace: "cluster", Subsystem: "comm", Name: "egress_stream_count", Help: "Count of streams to other nodes.", LabelNames: []string{"channel"}, StatsdFormat: "%{#fqname}.%{channel}", } EgressTLSConnectionCountOpts = metrics.GaugeOpts{ Namespace: "cluster", Subsystem: "comm", Name: "egress_tls_connection_count", Help: "Count of TLS connections to other nodes.", StatsdFormat: "%{#fqname}", } MessageSendTimeOpts = metrics.HistogramOpts{ Namespace: "cluster", Subsystem: "comm", Name: "msg_send_time", Help: "The time it takes to send a message in seconds.", LabelNames: []string{"host", "channel"}, StatsdFormat: "%{#fqname}.%{host}.%{channel}", } MessagesDroppedCountOpts = metrics.CounterOpts{ Namespace: "cluster", Subsystem: "comm", Name: "msg_dropped_count", Help: "Count of messages dropped.", LabelNames: []string{"host", "channel"}, StatsdFormat: "%{#fqname}.%{host}.%{channel}", } )
ErrForbidden denotes that an ordering node refuses sending blocks due to access control.
var ErrForbidden = errors.New("forbidden pulling the channel")
ErrNotInChannel denotes that an ordering node is not in the channel
var ErrNotInChannel = errors.New("not in the channel")
var ErrRetryCountExhausted = errors.New("retry attempts exhausted")
ErrServiceUnavailable denotes that an ordering node is not servicing at the moment.
var errors.New("service unavailable")=
ErrSkipped denotes that replicating a chain was skipped
var ErrSkipped = errors.New("skipped")
func AnyChannel(_ string) bool
AnyChannel accepts all channels.
func BlockToString(block *common.Block) string
BlockToString returns a string representation of this block.
func ChannelCreationBlockToGenesisBlock(block *common.Block) (*common.Block, error)
ChannelCreationBlockToGenesisBlock converts a channel creation block to a genesis block
func ConfigFromBlock(block *common.Block) (*common.ConfigEnvelope, error)
ConfigFromBlock returns a ConfigEnvelope if exists, or a *NotAConfigBlock error. It may also return some other error in case parsing failed.
func DERtoPEM(der []byte) string
DERtoPEM returns a PEM representation of the DER encoded certificate
func IsNewChannelBlock(block *common.Block) (string, error)
IsNewChannelBlock returns a name of the channel in case it holds a channel create transaction, or empty string otherwise.
func LastConfigBlock(block *common.Block, blockRetriever BlockRetriever) (*common.Block, error)
LastConfigBlock returns the last config block relative to the given block.
func NewStreamsByType() map[OperationType]map[uint64]*Stream
NewStreamsByType returns a mapping of operation type to a mapping of destination to stream.
func Participant(puller ChainPuller, analyzeLastConfBlock SelfMembershipPredicate) error
Participant returns whether the caller participates in the chain. It receives a ChainPuller that should already be calibrated for the chain, and a SelfMembershipPredicate that is used to detect whether the caller should service the chain. It returns nil if the caller participates in the chain. It may return: ErrNotInChannel in case the caller doesn't participate in the chain. ErrForbidden in case the caller is forbidden from pulling the block. ErrServiceUnavailable in case all orderers reachable cannot complete the request. ErrRetryCountExhausted in case no orderer is reachable.
func PullLastConfigBlock(puller ChainPuller) (*common.Block, error)
PullLastConfigBlock pulls the last configuration block, or returns an error on failure.
func SignatureSetFromBlock(block *common.Block) ([]*common.SignedData, error)
SignatureSetFromBlock creates a signature set out of a block.
func VerifyBlockHash(indexInBuffer int, blockBuff []*common.Block) error
VerifyBlockHash verifies the hash chain of the block with the given index among the blocks of the given block buffer.
func VerifyBlockSignature(block *common.Block, verifier BlockVerifier, config *common.ConfigEnvelope) error
VerifyBlockSignature verifies the signature on the block with the given BlockVerifier and the given config.
func VerifyBlocks(blockBuff []*common.Block, signatureVerifier BlockVerifier) error
VerifyBlocks verifies the given consecutive sequence of blocks is valid, and returns nil if it's valid, else an error.
BlockCommitFunc signals a block commit.
type BlockCommitFunc func(block *common.Block, channel string)
BlockPuller pulls blocks from remote ordering nodes. Its operations are not thread safe.
type BlockPuller struct { // Configuration MaxPullBlockRetries uint64 MaxTotalBufferBytes int Signer crypto.LocalSigner TLSCert []byte Channel string FetchTimeout time.Duration RetryTimeout time.Duration Logger *flogging.FabricLogger Dialer Dialer VerifyBlockSequence BlockSequenceVerifier Endpoints []EndpointCriteria // contains filtered or unexported fields }
func BlockPullerFromConfigBlock(conf PullerConfig, block *common.Block, verifierRetriever VerifierRetriever) (*BlockPuller, error)
BlockPullerFromConfigBlock returns a BlockPuller that doesn't verify signatures on blocks.
func (p *BlockPuller) Clone() *BlockPuller
Clone returns a copy of this BlockPuller initialized for the given channel
func (p *BlockPuller) Close()
Close makes the BlockPuller close the connection and stream with the remote endpoint, and wipe the internal block buffer.
func (p *BlockPuller) HeightsByEndpoints() (map[string]uint64, error)
HeightsByEndpoints returns the block heights by endpoints of orderers
func (p *BlockPuller) PullBlock(seq uint64) *common.Block
PullBlock blocks until a block with the given sequence is fetched from some remote ordering node, or until consecutive failures of fetching the block exceed MaxPullBlockRetries.
BlockRetriever retrieves blocks
type BlockRetriever interface { // Block returns a block with the given number, // or nil if such a block doesn't exist. Block(number uint64) *common.Block }
BlockSequenceVerifier verifies that the given consecutive sequence of blocks is valid.
type BlockSequenceVerifier func(blocks []*common.Block, channel string) error
BlockValidationPolicyVerifier verifies signatures based on the block validation policy.
type BlockValidationPolicyVerifier struct { Logger *flogging.FabricLogger Channel string PolicyMgr policies.Manager }
func (bv *BlockValidationPolicyVerifier) VerifyBlockSignature(sd []*common.SignedData, envelope *common.ConfigEnvelope) error
VerifyBlockSignature verifies the signed data associated to a block, optionally with the given config envelope.
BlockVerifier verifies block signatures.
type BlockVerifier interface { // VerifyBlockSignature verifies a signature of a block. // It has an optional argument of a configuration envelope // which would make the block verification to use validation rules // based on the given configuration in the ConfigEnvelope. // If the config envelope passed is nil, then the validation rules used // are the ones that were applied at commit of previous blocks. VerifyBlockSignature(sd []*common.SignedData, config *common.ConfigEnvelope) error }
BlockVerifierAssembler creates a BlockVerifier out of a config envelope
type BlockVerifierAssembler struct { Logger *flogging.FabricLogger }
func (bva *BlockVerifierAssembler) VerifierFromConfig(configuration *common.ConfigEnvelope, channel string) (BlockVerifier, error)
VerifierFromConfig creates a BlockVerifier from the given configuration.
ChainInspector walks over a chain
type ChainInspector struct { Logger *flogging.FabricLogger Puller ChainPuller LastConfigBlock *common.Block }
func (ci *ChainInspector) Channels() []ChannelGenesisBlock
Channels returns the list of ChannelGenesisBlocks for all channels. Each such ChannelGenesisBlock contains the genesis block of the channel.
func (ci *ChainInspector) Close()
Close closes the ChainInspector
ChainPuller pulls blocks from a chain
type ChainPuller interface { // PullBlock pulls the given block from some orderer node PullBlock(seq uint64) *common.Block // HeightsByEndpoints returns the block heights by endpoints of orderers HeightsByEndpoints() (map[string]uint64, error) // Close closes the ChainPuller Close() }
ChannelExtractor extracts the channel of a given message, or returns an empty string if that's not possible
type ChannelExtractor interface { TargetChannel(message proto.Message) string }
ChannelGenesisBlock wraps a Block and its channel name
type ChannelGenesisBlock struct { ChannelName string GenesisBlock *common.Block }
ChannelLister returns a list of channels
type ChannelLister interface { // Channels returns a list of channels Channels() []ChannelGenesisBlock // Close closes the ChannelLister Close() }
ChannelPredicate accepts channels according to their names.
type ChannelPredicate func(channelName string) bool
ClusterClient creates streams that point to a remote cluster member.
type ClusterClient interface { Step(ctx context.Context, opts ...grpc.CallOption) (orderer.Cluster_StepClient, error) }
Comm implements Communicator
type Comm struct { MinimumExpirationWarningInterval time.Duration CertExpWarningThreshold time.Duration SendBufferSize int Lock sync.RWMutex Logger *flogging.FabricLogger ChanExt ChannelExtractor H Handler Connections *ConnectionStore Chan2Members MembersByChannel Metrics *Metrics // contains filtered or unexported fields }
func (c *Comm) Configure(channel string, newNodes []RemoteNode)
Configure configures the channel with the given RemoteNodes
func (c *Comm) DispatchConsensus(ctx context.Context, request *orderer.ConsensusRequest) error
DispatchConsensus identifies the channel and sender of the step request and passes it to the underlying Handler
func (c *Comm) DispatchSubmit(ctx context.Context, request *orderer.SubmitRequest) error
DispatchSubmit identifies the channel and sender of the submit request and passes it to the underlying Handler
func (c *Comm) Remote(channel string, id uint64) (*RemoteContext, error)
Remote obtains a RemoteContext linked to the destination node on the context of a given channel
func (c *Comm) Shutdown()
Shutdown shuts down the instance
Communicator defines communication for a consenter
type Communicator interface { // Remote returns a RemoteContext for the given RemoteNode ID in the context // of the given channel, or error if connection cannot be established, or // the channel wasn't configured Remote(channel string, id uint64) (*RemoteContext, error) // Configure configures the communication to connect to all // given members, and disconnect from any members not among the given // members. Configure(channel string, members []RemoteNode) // Shutdown shuts down the communicator Shutdown() }
ConnByCertMap maps certificates represented as strings to gRPC connections
type ConnByCertMap map[string]*grpc.ClientConn
func (cbc ConnByCertMap) Lookup(cert []byte) (*grpc.ClientConn, bool)
Lookup looks up a certificate and returns the connection that was mapped to the certificate, and whether it was found or not
func (cbc ConnByCertMap) Put(cert []byte, conn *grpc.ClientConn)
Put associates the given connection to the certificate
func (cbc ConnByCertMap) Remove(cert []byte)
Remove removes the connection that is associated to the given certificate
func (cbc ConnByCertMap) Size() int
ConnectionMapper maps certificates to connections
type ConnectionMapper interface { Lookup(cert []byte) (*grpc.ClientConn, bool) Put(cert []byte, conn *grpc.ClientConn) Remove(cert []byte) Size() int }
ConnectionStore stores connections to remote nodes
type ConnectionStore struct { Connections ConnectionMapper // contains filtered or unexported fields }
func NewConnectionStore(dialer SecureDialer, tlsConnectionCount metrics.Gauge) *ConnectionStore
NewConnectionStore creates a new ConnectionStore with the given SecureDialer
func (c *ConnectionStore) Connection(endpoint string, expectedServerCert []byte) (*grpc.ClientConn, error)
Connection obtains a connection to the given endpoint and expects the given server certificate to be presented by the remote node
func (c *ConnectionStore) Disconnect(expectedServerCert []byte)
Disconnect closes the gRPC connection that is mapped to the given certificate
Dialer creates a gRPC connection to a remote address
type Dialer interface { Dial(endpointCriteria EndpointCriteria) (*grpc.ClientConn, error) }
Dispatcher dispatches requests
type Dispatcher interface { DispatchSubmit(ctx context.Context, request *orderer.SubmitRequest) error DispatchConsensus(ctx context.Context, request *orderer.ConsensusRequest) error }
EndpointCriteria defines criteria of how to connect to a remote orderer node.
type EndpointCriteria struct { Endpoint string // Endpoint of the form host:port TLSRootCAs [][]byte // PEM encoded TLS root CA certificates }
func EndpointconfigFromConfigBlock(block *common.Block) ([]EndpointCriteria, error)
EndpointconfigFromConfigBlock retrieves TLS CA certificates and endpoints from a config block.
GenesisBlocks aggregates several ChannelGenesisBlocks
type GenesisBlocks []ChannelGenesisBlock
func (gbs GenesisBlocks) Names() []string
Names returns the channel names all ChannelGenesisBlocks
Handler handles Step() and Submit() requests and returns a corresponding response
type Handler interface { OnConsensus(channel string, sender uint64, req *orderer.ConsensusRequest) error OnSubmit(channel string, sender uint64, req *orderer.SubmitRequest) error }
ImpatientStream aborts the stream if it waits for too long for a message.
type ImpatientStream struct { orderer.AtomicBroadcast_DeliverClient // contains filtered or unexported fields }
func (stream *ImpatientStream) Recv() (*orderer.DeliverResponse, error)
Recv blocks until a response is received from the stream or the timeout expires.
ImpatientStreamCreator creates an ImpatientStream
type ImpatientStreamCreator func() (*ImpatientStream, error)
func NewImpatientStream(conn *grpc.ClientConn, waitTimeout time.Duration) ImpatientStreamCreator
NewImpatientStream returns a ImpatientStreamCreator that creates impatientStreams.
LedgerFactory retrieves or creates new ledgers by chainID
type LedgerFactory interface { // GetOrCreate gets an existing ledger (if it exists) // or creates it if it does not GetOrCreate(chainID string) (LedgerWriter, error) }
LedgerInterceptor intercepts block commits.
type LedgerInterceptor struct { Channel string InterceptBlockCommit BlockCommitFunc LedgerWriter }
func (interceptor *LedgerInterceptor) Append(block *common.Block) error
Append commits a block into the ledger, and also fires the configured callback.
LedgerWriter allows the caller to write blocks and inspect the height
type LedgerWriter interface { // Append a new block to the ledger Append(block *common.Block) error // Height returns the number of blocks on the ledger Height() uint64 }
MemberMapping defines NetworkMembers by their ID
type MemberMapping map[uint64]*Stub
func (mp MemberMapping) ByID(ID uint64) *Stub
ByID retrieves the Stub with the given ID from the MemberMapping
func (mp MemberMapping) LookupByClientCert(cert []byte) *Stub
LookupByClientCert retrieves a Stub with the given client certificate
func (mp MemberMapping) Put(stub *Stub)
Put inserts the given stub to the MemberMapping
func (mp MemberMapping) ServerCertificates() StringSet
ServerCertificates returns a set of the server certificates represented as strings
MembersByChannel is a mapping from channel name to MemberMapping
type MembersByChannel map[string]MemberMapping
Metrics defines the metrics for the cluster.
type Metrics struct { EgressQueueLength metrics.Gauge EgressQueueCapacity metrics.Gauge EgressWorkerCount metrics.Gauge IngressStreamsCount metrics.Gauge EgressStreamsCount metrics.Gauge EgressTLSConnectionCount metrics.Gauge MessageSendTime metrics.Histogram MessagesDroppedCount metrics.Counter }
func NewMetrics(provider MetricsProvider) *Metrics
NewMetrics initializes new metrics for the cluster infrastructure.
A MetricsProvider is an abstraction for a metrics provider. It is a factory for Counter, Gauge, and Histogram meters.
type MetricsProvider interface { // NewCounter creates a new instance of a Counter. NewCounter(opts metrics.CounterOpts) metrics.Counter // NewGauge creates a new instance of a Gauge. NewGauge(opts metrics.GaugeOpts) metrics.Gauge // NewHistogram creates a new instance of a Histogram. NewHistogram(opts metrics.HistogramOpts) metrics.Histogram }
NoopBlockVerifier doesn't verify block signatures
type NoopBlockVerifier struct{}
func (*NoopBlockVerifier) VerifyBlockSignature(sd []*common.SignedData, config *common.ConfigEnvelope) error
VerifyBlockSignature accepts all signatures over blocks.
OperationType denotes a type of operation that the RPC can perform such as sending a transaction, or a consensus related message.
type OperationType int
const ( ConsensusOperation OperationType = iota SubmitOperation )
PredicateDialer creates gRPC connections that are only established if the given predicate is fulfilled
type PredicateDialer struct { comm.ClientConfig // contains filtered or unexported fields }
func (dialer *PredicateDialer) Dial(address string, verifyFunc RemoteVerifier) (*grpc.ClientConn, error)
Dial creates a new gRPC connection that can only be established, if the remote node's certificate chain satisfy verifyFunc
func (dialer *PredicateDialer) UpdateRootCAs(serverRootCAs [][]byte)
PullerConfig configures a BlockPuller.
type PullerConfig struct { TLSKey []byte TLSCert []byte Timeout time.Duration Signer crypto.LocalSigner Channel string MaxTotalBufferBytes int }
func PullerConfigFromTopLevelConfig(systemChannel string, conf *localconfig.TopLevel, tlsKey, tlsCert []byte, signer crypto.LocalSigner) PullerConfig
PullerConfigFromTopLevelConfig creates a PullerConfig from a TopLevel config, and from a signer and TLS key cert pair. The PullerConfig's channel is initialized to be the system channel.
RPC performs remote procedure calls to remote cluster nodes.
type RPC struct { Logger *flogging.FabricLogger Timeout time.Duration Channel string Comm Communicator StreamsByType map[OperationType]map[uint64]*Stream // contains filtered or unexported fields }
func (s *RPC) SendConsensus(destination uint64, msg *orderer.ConsensusRequest) error
Consensus passes the given ConsensusRequest message to the raft.Node instance.
func (s *RPC) SendSubmit(destination uint64, request *orderer.SubmitRequest) error
SendSubmit sends a SubmitRequest to the given destination node.
RemoteContext interacts with remote cluster nodes. Every call can be aborted via call to Abort()
type RemoteContext struct { Metrics *Metrics Channel string SendBuffSize int Logger *flogging.FabricLogger Client orderer.ClusterClient ProbeConn func(conn *grpc.ClientConn) error // contains filtered or unexported fields }
func (rc *RemoteContext) Abort()
Abort aborts the contexts the RemoteContext uses, thus effectively causes all operations that use this RemoteContext to terminate.
func (rc *RemoteContext) NewStream(timeout time.Duration) (*Stream, error)
NewStream creates a new stream. It is not thread safe, and Send() or Recv() block only until the timeout expires.
RemoteNode represents a cluster member
type RemoteNode struct { // ID is unique among all members, and cannot be 0. ID uint64 // Endpoint is the endpoint of the node, denoted in %s:%d format Endpoint string // ServerTLSCert is the DER encoded TLS server certificate of the node ServerTLSCert []byte // ClientTLSCert is the DER encoded TLS client certificate of the node ClientTLSCert []byte }
func (rm RemoteNode) String() string
String returns a string representation of this RemoteNode
RemoteVerifier verifies the connection to the remote host
type RemoteVerifier func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error
Replicator replicates chains
type Replicator struct { DoNotPanicIfClusterNotReachable bool Filter ChannelPredicate SystemChannel string ChannelLister ChannelLister Logger *flogging.FabricLogger Puller *BlockPuller BootBlock *common.Block AmIPartOfChannel SelfMembershipPredicate LedgerFactory LedgerFactory }
func (r *Replicator) IsReplicationNeeded() (bool, error)
IsReplicationNeeded returns whether replication is needed, or the cluster node can resume standard boot flow.
func (r *Replicator) PullChannel(channel string) error
PullChannel pulls the given channel from some orderer, and commits it to the ledger.
func (r *Replicator) ReplicateChains() []string
ReplicateChains pulls chains and commits them. Returns the names of the chains replicated successfully.
SecureDialer connects to a remote address
type SecureDialer interface { Dial(address string, verifyFunc RemoteVerifier) (*grpc.ClientConn, error) }
SelfMembershipPredicate determines whether the caller is found in the given config block
type SelfMembershipPredicate func(configBlock *common.Block) error
Service defines the raft Service
type Service struct { StreamCountReporter *StreamCountReporter Dispatcher Dispatcher Logger *flogging.FabricLogger StepLogger *flogging.FabricLogger MinimumExpirationWarningInterval time.Duration CertExpWarningThreshold time.Duration }
func (s *Service) Step(stream orderer.Cluster_StepServer) error
Step passes an implementation-specific message to another cluster member.
StandardDialer wraps an AtomicClientConfig, and provides a means to connect according to given EndpointCriteria.
type StandardDialer struct { comm.ClientConfig }
func (dialer *StandardDialer) Dial(endpointCriteria EndpointCriteria) (*grpc.ClientConn, error)
Dial dials an address according to the given EndpointCriteria
StepClient defines a client that sends and receives Step requests and responses.
type StepClient interface { Send(*orderer.StepRequest) error Recv() (*orderer.StepResponse, error) grpc.ClientStream }
StepStream defines the gRPC stream for sending transactions, and receiving corresponding responses
type StepStream interface { Send(response *orderer.StepResponse) error Recv() (*orderer.StepRequest, error) grpc.ServerStream }
Stream is used to send/receive messages to/from the remote cluster member.
type Stream struct { ID uint64 Channel string NodeName string Endpoint string Logger *flogging.FabricLogger Timeout time.Duration orderer.Cluster_StepClient Cancel func(error) // contains filtered or unexported fields }
func (stream *Stream) Canceled() bool
Canceled returns whether the stream was canceled.
func (stream *Stream) Recv() (*orderer.StepResponse, error)
Recv receives a message from a remote cluster member.
func (stream *Stream) Send(request *orderer.StepRequest) error
Send sends the given request to the remote cluster member.
StreamCountReporter reports the number of streams currently connected to this node
type StreamCountReporter struct { Metrics *Metrics // contains filtered or unexported fields }
func (scr *StreamCountReporter) Decrement()
func (scr *StreamCountReporter) Increment()
StreamOperation denotes an operation done by a stream, such a Send or Receive.
type StreamOperation func() (*orderer.StepResponse, error)
StringSet is a set of strings
type StringSet map[string]struct{}
Stub holds all information about the remote node, including the RemoteContext for it, and serializes some operations on it.
type Stub struct { RemoteNode *RemoteContext // contains filtered or unexported fields }
func (stub *Stub) Activate(createRemoteContext func() (*RemoteContext, error)) error
Activate creates a remote context with the given function callback in an atomic manner - if two parallel invocations are invoked on this Stub, only a single invocation of createRemoteStub takes place.
func (stub *Stub) Active() bool
Active returns whether the Stub is active or not
func (stub *Stub) Deactivate()
Deactivate deactivates the Stub and ceases all communication operations invoked on it.
VerificationRegistry registers verifiers and retrieves them.
type VerificationRegistry struct { LoadVerifier func(chain string) BlockVerifier Logger *flogging.FabricLogger VerifierFactory VerifierFactory VerifiersByChannel map[string]BlockVerifier }
func (vr *VerificationRegistry) BlockCommitted(block *common.Block, channel string)
BlockCommitted notifies the VerificationRegistry upon a block commit, which may trigger a registration of a verifier out of the block in case the block is a config block.
func (vr *VerificationRegistry) RegisterVerifier(chain string)
RegisterVerifier adds a verifier into the registry if applicable.
func (vr *VerificationRegistry) RetrieveVerifier(channel string) BlockVerifier
RetrieveVerifier returns a BlockVerifier for the given channel, or nil if not found.
VerifierFactory creates BlockVerifiers.
type VerifierFactory interface { // VerifierFromConfig creates a BlockVerifier from the given configuration. VerifierFromConfig(configuration *common.ConfigEnvelope, channel string) (BlockVerifier, error) }
VerifierRetriever retrieves BlockVerifiers for channels.
type VerifierRetriever interface { // RetrieveVerifier retrieves a BlockVerifier for the given channel. RetrieveVerifier(channel string) BlockVerifier }