{"record":{"id":"3657b85489e4ec62","repo":"linera-io/linera-protocol","slug":"unexpected-epoch-epoch-chain-chain-id-is-at","errorCode":null,"errorMessage":"Unexpected epoch {epoch}: chain {chain_id} is at {chain_epoch}","messagePattern":"Unexpected epoch (.+?): chain (.+?) is at (.+?)","errorType":"validation","errorClass":"WorkerError","httpStatus":null,"severity":"error","filePath":"linera-core/src/chain_worker/state.rs","lineNumber":2962,"sourceCode":"\n/// Returns the blob IDs whose corresponding value is `None`.\nfn missing_blob_ids<'a>(\n    maybe_blobs: impl IntoIterator<Item = (&'a BlobId, &'a Option<Blob>)>,\n) -> Vec<BlobId> {\n    maybe_blobs\n        .into_iter()\n        .filter(|(_, maybe_blob)| maybe_blob.is_none())\n        .map(|(blob_id, _)| *blob_id)\n        .collect()\n}\n\n/// Returns an error if the block is not at the expected epoch.\nfn check_block_epoch(\n    chain_epoch: Epoch,\n    block_chain: ChainId,\n    block_epoch: Epoch,\n) -> Result<(), WorkerError> {\n    ensure!(\n        block_epoch == chain_epoch,\n        WorkerError::InvalidEpoch {\n            chain_id: block_chain,\n            epoch: block_epoch,\n            chain_epoch\n        }\n    );\n    Ok(())\n}\n","sourceCodeStart":2944,"sourceCodeEnd":2972,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-core/src/chain_worker/state.rs#L2944-L2972","documentation":"Error \"Unexpected epoch {epoch}: chain {chain_id} is at {chain_epoch}\" thrown in linera-io/linera-protocol.","triggerScenarios":"A certificate or message carries an epoch that differs from the epoch the target chain is currently in, typically around a committee/epoch change.","commonSituations":"Using a certificate signed by an old validator set after an epoch transition, or querying a chain that has already advanced to a newer epoch.","solutions":["Update the local client to the current epoch: run `linera sync` and `linera process-inbox` so the chain epoch matches the committee epoch before resubmitting.","If the epoch changed due to a validator set rotation, re-run `linera query-validators` / refresh committee info in the wallet and retry.","Re-check that the message or certificate being handled was created for the current epoch; discard or re-create stale cross-chain messages from an old epoch."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}