package
3.0.0+incompatible
Repository: https://github.com/hyperledger/fabric.git
Documentation: pkg.go.dev

# Packages

Code generated by counterfeiter.

# Functions

ComputeMembershipChanges computes membership update based on information about new consenters, returns two slices: a slice of added consenters and a slice of consenters to be removed.
ConfChange computes Raft configuration changes based on current Raft configuration state and consenters IDs stored in RaftMetadata.
ConfigChannelHeader expects a config block and returns the header type of the config envelope wrapped in it, e.g.
ConfigEnvelopeFromBlock extracts configuration envelope from the block based on the config type, i.e.
ConsensusMetadataFromConfigBlock reads consensus metadata updates from the configuration block.
ConsentersToMap maps consenters into set where key is client TLS certificate.
CreateConsentersMap creates a map of Raft Node IDs to Consenter given the block metadata and the config metadata.
CreateStorage attempts to create a storage to persist etcd/raft data.
EndpointconfigFromSupport extracts TLS CA certificates and endpoints from the ConsenterSupport.
ListSnapshots returns a list of RaftIndex of snapshots stored on disk.
MembershipByCert convert consenters map into set encapsulated by map where key is client TLS certificate.
MetadataFromConfigUpdate extracts consensus metadata from config update.
MetadataFromConfigValue reads and translates configuration updates from config value into raft metadata In case consensus type is changed to BFT the raft metadata will be nil.
MetadataHasDuplication returns an error if the metadata has duplication of consenters.
New creates a etcdraft Consenter.
NewBlockPuller creates a new block puller.
NewChain constructs a chain object.
NodeExists returns trues if node id exists in the slice and false otherwise.
RaftPeers maps consenters to slice of raft.Peer.
ReadBlockMetadata attempts to read raft metadata from block metadata, if available.
VerifyConfigMetadata validates Raft config metadata.

# Constants

AbdicationMaxAttempts determines how many retries of leadership abdication we do for a transaction that removes ourselves from reconfiguration.
DefaultEvictionSuspicion is the threshold that a node will start suspecting its own eviction if it has been leaderless for this period of time.
DefaultLeaderlessCheckInterval is the interval that a chain checks its own leadership status.
DefaultSnapshotCatchUpEntries is the default number of entries to preserve in memory when a snapshot is taken.
DefaultSnapshotIntervalSize is the default snapshot interval.
EvictionConfigTxForwardingTimeOut determines how much time do we spend trying to forward the config-Tx that evicted the current node when it was a leader, after abdication, to the new leader.

# Variables

MaxSnapshotFiles defines max number of etcd/raft snapshot files to retain on filesystem.

# Structs

Chain implements consensus.Chain interface.
Config contains etcdraft configurations.
Consenter implements etcdraft consenter.
ConsenterCertificate denotes a TLS certificate of a consenter.
Dispatcher dispatches Submit and Step requests to the designated per chain instances.
Disseminator piggybacks cluster metadata, if any, to egress messages.
LedgerBlockPuller pulls blocks upon demand, or fetches them from the ledger.
MembershipChanges keeps information about membership changes introduced during configuration update.
Options contains all the configurations relevant to the chain.
PeriodicCheck checks periodically a condition, and reports the cumulative consecutive period the condition was fulfilled.
RaftStorage encapsulates storages needed for etcd/raft data, i.e.
Tracker periodically poll Raft Status, and update disseminator so that status is populated to followers.

# Interfaces

BlockPuller is used to pull blocks from other OSN.
ChainManager defines the methods from multichannel.Registrar needed by the Consenter.
Configurator is used to configure the communication layer when the chain starts.
MemoryStorage is currently backed by etcd/raft.MemoryStorage.
MessageReceiver receives messages.
ReceiverGetter obtains instances of MessageReceiver given a channel ID.
RPC is used to mock the transport layer in tests.

# Type aliases

CreateBlockPuller is a function to create BlockPuller on demand.
SelfMembershipPredicate determines whether the caller is found in the given config block.