hyperledger/fabric · error
nil block
Error message
nil block
What it means
Consenter.IsChannelMember guard: the join block passed in (used to decide whether this orderer is a member of the channel) is nil. The caller must supply the channel's config block; nothing can be inferred from a nil block.
Source
Thrown at orderer/consensus/etcdraft/consenter.go:232
haltCallback := func() { c.ChainManager.SwitchChainToFollower(support.ChannelID()) }
return NewChain(
support,
opts,
c.Communication,
rpc,
c.BCCSP,
func() (BlockPuller, error) {
return NewBlockPuller(support, c.Dialer, c.OrdererConfig.General.Cluster, c.BCCSP)
},
haltCallback,
nil,
)
}
func (c *Consenter) IsChannelMember(joinBlock *common.Block) (bool, error) {
if joinBlock == nil {
return false, errors.New("nil block")
}
envelopeConfig, err := protoutil.ExtractEnvelope(joinBlock, 0)
if err != nil {
return false, err
}
bundle, err := channelconfig.NewBundleFromEnvelope(envelopeConfig, c.BCCSP)
if err != nil {
return false, err
}
oc, exists := bundle.OrdererConfig()
if !exists {
return false, errors.New("no orderer config in bundle")
}
configMetadata := &etcdraft.ConfigMetadata{}
if err := proto.Unmarshal(oc.ConsensusMetadata(), configMetadata); err != nil {
return false, err
}
View on GitHub (pinned to 2736b63f8f)
Solutions
- Pass the non-nil join/config block obtained from the channel participation API
- Check the caller (e.g. HandleChain) for why the join block was not provided
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at orderer/consensus/etcdraft/consenter.go:232 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/0e5e85ffe7ee8a44.
Report an issue: GitHub.