Versions in this module Expand all Collapse all v1 v1.4.9 Sep 30, 2020 Changes in this version + const BYTE + const DefaultEvictionSuspicion + const DefaultLeaderlessCheckInterval + const DefaultSnapshotCatchUpEntries + const DefaultSnapshotIntervalSize + const GIGABYTE + const KILOBYTE + const MEGABYTE + const TERABYTE + var MaxSnapshotFiles = 5 + func CheckConfigMetadata(metadata *etcdraft.ConfigMetadata) error + func ConfChange(blockMetadata *etcdraft.BlockMetadata, confState *raftpb.ConfState) *raftpb.ConfChange + func ConfigChannelHeader(block *common.Block) (hdr *common.ChannelHeader, err error) + func ConfigEnvelopeFromBlock(block *common.Block) (*common.Envelope, error) + func ConsensusMetadataFromConfigBlock(block *common.Block) (*etcdraft.ConfigMetadata, error) + func ConsentersToMap(consenters []*etcdraft.Consenter) map[string]struct + func EndpointconfigFromFromSupport(support consensus.ConsenterSupport) ([]cluster.EndpointCriteria, error) + func ListSnapshots(logger *flogging.FabricLogger, snapDir string) []uint64 + func MembershipByCert(consenters map[uint64]*etcdraft.Consenter) map[string]uint64 + func MetadataFromConfigUpdate(update *common.ConfigUpdate) (*etcdraft.ConfigMetadata, error) + func MetadataFromConfigValue(configValue *common.ConfigValue) (*etcdraft.ConfigMetadata, error) + func MetadataHasDuplication(md *etcdraft.ConfigMetadata) error + func NodeExists(id uint64, nodes []uint64) bool + func RaftPeers(consenterIDs []uint64) []raft.Peer + func ReadBlockMetadata(blockMetadata *common.Metadata, configMetadata *etcdraft.ConfigMetadata) (*etcdraft.BlockMetadata, error) + type BlockPuller interface + Close func() + HeightsByEndpoints func() (map[string]uint64, error) + PullBlock func(seq uint64) *common.Block + type Chain struct + Metrics *Metrics + Node *node + func NewChain(support consensus.ConsenterSupport, opts Options, conf Configurator, rpc RPC, ...) (*Chain, error) + func (c *Chain) Configure(env *common.Envelope, configSeq uint64) error + func (c *Chain) Consensus(req *orderer.ConsensusRequest, sender uint64) error + func (c *Chain) Errored() <-chan struct{} + func (c *Chain) Halt() + func (c *Chain) Order(env *common.Envelope, configSeq uint64) error + func (c *Chain) Start() + func (c *Chain) Submit(req *orderer.SubmitRequest, sender uint64) error + func (c *Chain) WaitReady() error + type ChainGetter interface + GetChain func(chainID string) *multichannel.ChainSupport + type Config struct + EvictionSuspicion string + SnapDir string + WALDir string + type Configurator interface + Configure func(channel string, newNodes []cluster.RemoteNode) + type Consenter struct + Cert []byte + Chains ChainGetter + Communication cluster.Communicator + CreateChain func(chainName string) + Dialer *cluster.PredicateDialer + EtcdRaftConfig Config + InactiveChainRegistry InactiveChainRegistry + Logger *flogging.FabricLogger + Metrics *Metrics + OrdererConfig localconfig.TopLevel + func New(clusterDialer *cluster.PredicateDialer, conf *localconfig.TopLevel, ...) *Consenter + func (c *Consenter) HandleChain(support consensus.ConsenterSupport, metadata *common.Metadata) (consensus.Chain, error) + func (c *Consenter) ReceiverByChain(channelID string) MessageReceiver + func (c *Consenter) TargetChannel(message proto.Message) string + type ConsenterCertificate struct + ConsenterCertificate []byte + Logger *flogging.FabricLogger + func (conCert ConsenterCertificate) IsConsenterOfChannel(configBlock *common.Block) error + type CreateBlockPuller func() (BlockPuller, error) + type Dispatcher struct + ChainSelector ReceiverGetter + Logger *flogging.FabricLogger + func (d *Dispatcher) OnConsensus(channel string, sender uint64, request *orderer.ConsensusRequest) error + func (d *Dispatcher) OnSubmit(channel string, sender uint64, request *orderer.SubmitRequest) error + type InactiveChainRegistry interface + TrackChain func(chainName string, genesisBlock *common.Block, createChain func()) + type LedgerBlockPuller struct + BlockRetriever cluster.BlockRetriever + Height func() uint64 + func (ledgerPuller *LedgerBlockPuller) PullBlock(seq uint64) *common.Block + type MembershipChanges struct + AddedNodes []*etcdraft.Consenter + ConfChange *raftpb.ConfChange + NewBlockMetadata *etcdraft.BlockMetadata + NewConsenters map[uint64]*etcdraft.Consenter + RemovedNodes []*etcdraft.Consenter + RotatedNode uint64 + func ComputeMembershipChanges(oldMetadata *etcdraft.BlockMetadata, ...) (mc *MembershipChanges, err error) + func (mc *MembershipChanges) Changed() bool + func (mc *MembershipChanges) Rotated() bool + func (mc *MembershipChanges) String() string + type MemoryStorage interface + Append func(entries []raftpb.Entry) error + ApplySnapshot func(snap raftpb.Snapshot) error + Compact func(compactIndex uint64) error + CreateSnapshot func(i uint64, cs *raftpb.ConfState, data []byte) (raftpb.Snapshot, error) + SetHardState func(st raftpb.HardState) error + type MessageReceiver interface + Consensus func(req *orderer.ConsensusRequest, sender uint64) error + Submit func(req *orderer.SubmitRequest, sender uint64) error + type Metrics struct + ClusterSize metrics.Gauge + CommittedBlockNumber metrics.Gauge + ConfigProposalsReceived metrics.Counter + DataPersistDuration metrics.Histogram + IsLeader metrics.Gauge + LeaderChanges metrics.Counter + NormalProposalsReceived metrics.Counter + ProposalFailures metrics.Counter + SnapshotBlockNumber metrics.Gauge + func NewMetrics(p metrics.Provider) *Metrics + type Options struct + BlockMetadata *etcdraft.BlockMetadata + Cert []byte + Clock clock.Clock + Consenters map[uint64]*etcdraft.Consenter + ElectionTick int + EvictionSuspicion time.Duration + HeartbeatTick int + LeaderCheckInterval time.Duration + Logger *flogging.FabricLogger + MaxInflightBlocks int + MaxSizePerMsg uint64 + MemoryStorage MemoryStorage + Metrics *Metrics + MigrationInit bool + RaftID uint64 + SnapDir string + SnapshotCatchUpEntries uint64 + SnapshotIntervalSize uint32 + TickInterval time.Duration + WALDir string + type PeriodicCheck struct + CheckInterval time.Duration + Condition func() bool + Logger *flogging.FabricLogger + Report func(cumulativePeriod time.Duration) + ReportCleared func() + func (pc *PeriodicCheck) Run() + func (pc *PeriodicCheck) Stop() + type RPC interface + SendConsensus func(dest uint64, msg *orderer.ConsensusRequest) error + SendSubmit func(dest uint64, request *orderer.SubmitRequest) error + type RaftStorage struct + SnapshotCatchUpEntries uint64 + func CreateStorage(lg *flogging.FabricLogger, walDir string, snapDir string, ram MemoryStorage) (*RaftStorage, error) + func (rs *RaftStorage) ApplySnapshot(snap raftpb.Snapshot) + func (rs *RaftStorage) Close() error + func (rs *RaftStorage) Snapshot() raftpb.Snapshot + func (rs *RaftStorage) Store(entries []raftpb.Entry, hardstate raftpb.HardState, snapshot raftpb.Snapshot) error + func (rs *RaftStorage) TakeSnapshot(i uint64, cs raftpb.ConfState, data []byte) error + type ReceiverGetter interface + ReceiverByChain func(channelID string) MessageReceiver Incompatible versions in this module v2.1.1+incompatible Jun 1, 2020