{"record":{"id":"0da16966aaeca582","repo":"hyperledger/fabric","slug":"failed-to-detect-self-id-by-comparing-public-keys","errorCode":null,"errorMessage":"failed to detect self ID by comparing public keys","messagePattern":"failed to detect self ID by comparing public keys","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/etcdraft/consenter.go","lineNumber":267,"sourceCode":"\t}\n\n\tverifyOpts, err := createX509VerifyOptions(oc)\n\tif err != nil {\n\t\treturn false, errors.Wrapf(err, \"failed to create x509 verify options from orderer config\")\n\t}\n\n\tif err := VerifyConfigMetadata(configMetadata, verifyOpts); err != nil {\n\t\treturn false, errors.Wrapf(err, \"failed to validate config metadata of ordering config\")\n\t}\n\n\tconsenters := make(map[uint64]*etcdraft.Consenter)\n\tfor i, c := range configMetadata.GetConsenters() {\n\t\tconsenters[uint64(i+1)] = c // the IDs don't matter\n\t}\n\n\tif _, err := c.detectSelfID(consenters); err != nil {\n\t\tif err != cluster.ErrNotInChannel {\n\t\t\treturn false, errors.Wrapf(err, \"failed to detect self ID by comparing public keys\")\n\t\t}\n\t\treturn false, nil\n\t}\n\n\treturn true, nil\n}\n\n// ReadBlockMetadata attempts to read raft metadata from block metadata, if available.\n// otherwise, it reads raft metadata from config metadata supplied.\nfunc ReadBlockMetadata(blockMetadata *common.Metadata, configMetadata *etcdraft.ConfigMetadata) (*etcdraft.BlockMetadata, error) {\n\tif blockMetadata != nil && len(blockMetadata.GetValue()) != 0 { // we have consenters mapping from block\n\t\tm := &etcdraft.BlockMetadata{}\n\t\tif err := proto.Unmarshal(blockMetadata.GetValue(), m); err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"failed to unmarshal block's metadata\")\n\t\t}\n\t\treturn m, nil\n\t}\n","sourceCodeStart":249,"sourceCodeEnd":285,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/etcdraft/consenter.go#L249-L285","documentation":"Consenter.IsChannelMember wraps a non-ErrNotInChannel failure from detectSelfID: comparing this orderer's TLS certificate against the channel's consenter set errored (rather than cleanly determining membership), e.g. a certificate comparison failure. Only ErrNotInChannel is treated as a benign 'not a member' answer; any other error surfaces here.","triggerScenarios":"Thrown at orderer/consensus/etcdraft/consenter.go:267 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify this orderer's cluster TLS certificate is readable and well-formed","Compare the certificate bytes in the channel config with the deployed TLS certificates"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}