{"record":{"id":"814fe586995e1273","repo":"hyperledger/fabric","slug":"timestamp-is-nil","errorCode":null,"errorMessage":"timestamp is nil","messagePattern":"timestamp is nil","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"discovery/client/client.go","lineNumber":584,"sourceCode":"// NewClient creates a new Client instance\nfunc NewClient(createConnection Dialer, s Signer, signerCacheSize uint) *Client {\n\treturn &Client{\n\t\tcreateConnection: createConnection,\n\t\tsignRequest:      NewMemoizeSigner(s, signerCacheSize).Sign,\n\t}\n}\n\nfunc validateAliveMessage(message *gprotoext.SignedGossipMessage) error {\n\tam := message.GetAliveMsg()\n\tif am == nil {\n\t\treturn errors.New(\"message isn't an alive message\")\n\t}\n\tm := am.Membership\n\tif m == nil {\n\t\treturn errors.New(\"membership is empty\")\n\t}\n\tif am.Timestamp == nil {\n\t\treturn errors.New(\"timestamp is nil\")\n\t}\n\treturn nil\n}\n\nfunc validateStateInfoMessage(message *gprotoext.SignedGossipMessage) error {\n\tsi := message.GetStateInfo()\n\tif si == nil {\n\t\treturn errors.New(\"message isn't a stateInfo message\")\n\t}\n\tif si.Timestamp == nil {\n\t\treturn errors.New(\"timestamp is nil\")\n\t}\n\tif si.Properties == nil {\n\t\treturn errors.New(\"properties is nil\")\n\t}\n\treturn nil\n}\n","sourceCodeStart":566,"sourceCodeEnd":602,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/discovery/client/client.go#L566-L602","documentation":"validateAliveMessage requires AliveMsg.Timestamp (a peer time structure) to be present; discovery uses it to detect liveness. A nil timestamp means the AliveMessage cannot be freshness-checked, so the message is rejected.","triggerScenarios":"A discovery response AliveMsg lacks its Timestamp field — malformed membership data from the peer.","commonSituations":"Peer clocks / gossip time sync problems (internal timestamp construction failed); corrupted gossip payloads; old Fabric versions emitting different alive message layouts.","solutions":["Check NTP/PTP time synchronization on the peer host and restart the peer","Verify Fabric version compatibility across peers","Inspect gossip logs for alive-message construction errors","Retry discovery against a healthy peer"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"func aliveMsgHasTimestamp(m *gprotoext.SignedGossipMessage) bool {\n    am := m.GetAliveMsg()\n    return am != nil && am.Timestamp != nil\n}","typeGuard":"func hasAliveTimestamp(m *gprotoext.SignedGossipMessage) bool {\n    am := m.GetAliveMsg()\n    return am != nil && am.Timestamp != nil\n}","tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"timestamp is nil\") {\n    logger.Warnf(\"peer alive message lacks timestamp; possible clock/gossip issue\")\n    return err\n}","preventionTips":["Run NTP on all peer hosts","Keep Fabric versions aligned","Restart peers whose gossip timestamps appear missing"],"tags":["hyperledger-fabric","gossip","timestamp","discovery-service"],"backgroundTag":"gossip-message-type-mismatch","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"}