{"record":{"id":"0f95b870ddf9c348","repo":"linera-io/linera-protocol","slug":"cannot-revoke-the-current-epoch-0","errorCode":null,"errorMessage":"Cannot revoke the current epoch {0}","messagePattern":"Cannot revoke the current epoch (.+?)","errorType":"validation","errorClass":"ChainClientError","httpStatus":null,"severity":"error","filePath":"linera-core/src/client/chain_client/mod.rs","lineNumber":2959,"sourceCode":"    ) -> Result<Vec<IndexAndEvent>, Error> {\n        Ok(self\n            .client\n            .storage_client()\n            .read_events_from_index(&self.chain_id, &stream_id, start_index)\n            .await?)\n    }\n\n    /// Deprecates all configurations of voting rights up to the given one (admin chains only).\n    /// Emits a `RemoveCommittee` event for every still-active epoch up to and including\n    /// `revoked_epoch`.\n    #[instrument(level = \"trace\")]\n    pub async fn revoke_epochs(\n        &self,\n        revoked_epoch: Epoch,\n    ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, Error> {\n        self.prepare_chain().await?;\n        let current_epoch = self.chain_info().await?.epoch;\n        ensure!(\n            revoked_epoch < current_epoch,\n            Error::CannotRevokeCurrentEpoch(current_epoch)\n        );\n        let mut operations = Vec::new();\n        for epoch_index in 0..=revoked_epoch.0 {\n            let epoch = Epoch(epoch_index);\n            if self\n                .has_admin_event(REMOVED_EPOCH_STREAM_NAME, epoch.0)\n                .await?\n            {\n                continue;\n            }\n            operations.push(Operation::system(SystemOperation::Admin(\n                AdminOperation::RemoveCommittee { epoch },\n            )));\n        }\n        ensure!(!operations.is_empty(), Error::EpochAlreadyRevoked);\n        self.execute_operations(operations, vec![]).await","sourceCodeStart":2941,"sourceCodeEnd":2977,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-core/src/client/chain_client/mod.rs#L2941-L2977","documentation":"Error \"Cannot revoke the current epoch {0}\" thrown in linera-io/linera-protocol.","triggerScenarios":"An attempt is made to revoke the epoch that is currently in force.","commonSituations":"Calling epoch revocation for the current epoch instead of an older, superseded one.","solutions":["You cannot revoke the current epoch {0}: first rotate to a newer epoch (complete the epoch change/committee reconfiguration), then revoke the older epoch.","Revoke the previous epoch instead of the current one; pass the earlier epoch number to the revoke command.","If revocation is part of key rotation, perform the rotation flow in order so the current epoch advances before revoking."],"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"}