{"record":{"id":"3f4b4bd8fdffa0db","repo":"datahaven-xyz/datahaven","slug":"irrelevantupdate","errorCode":"IrrelevantUpdate","errorMessage":"IrrelevantUpdate","messagePattern":"IrrelevantUpdate","errorType":"error_code","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"operator/pallets/ethereum-client/src/lib.rs","lineNumber":354,"sourceCode":"            if <NextSyncCommittee<T>>::exists() {\n                ensure!(\n                    (store_period..=store_period + 1).contains(&signature_period),\n                    Error::<T>::SkippedSyncCommitteePeriod\n                )\n            } else {\n                ensure!(\n                    signature_period == store_period,\n                    Error::<T>::SkippedSyncCommitteePeriod\n                )\n            }\n\n            // Verify update is relevant.\n            let update_attested_period = compute_period(update.attested_header.slot);\n            let update_finalized_period = compute_period(update.finalized_header.slot);\n            let update_has_next_sync_committee = !<NextSyncCommittee<T>>::exists()\n                && (update.next_sync_committee_update.is_some()\n                    && update_attested_period == store_period);\n            ensure!(\n                update.attested_header.slot > latest_finalized_state.slot\n                    || update_has_next_sync_committee,\n                Error::<T>::IrrelevantUpdate\n            );\n\n            // Verify the finalized header gap between the current finalized header and new imported\n            // header is not larger than the sync committee period, otherwise we cannot do\n            // ancestry proofs for execution headers in the gap.\n            ensure!(\n                latest_finalized_state\n                    .slot\n                    .saturating_add(config::SLOTS_PER_HISTORICAL_ROOT as u64)\n                    >= update.finalized_header.slot,\n                Error::<T>::InvalidFinalizedHeaderGap\n            );\n\n            let fork_versions = T::ForkVersions::get();\n            let finalized_root_gindex = Self::finalized_root_gindex_at_slot(","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/datahaven-xyz/datahaven/blob/edcb13dbbcd3c29489eaa2480a6f60ee4cb1f3ec/operator/pallets/ethereum-client/src/lib.rs#L336-L372","documentation":"The update does not advance the light client: its attested header slot is not newer than the latest finalized state slot, and it also does not provide a needed next sync committee update. `verify_update` rejects such updates as `IrrelevantUpdate` to avoid wasted work and replay of old data.","triggerScenarios":"Submitting an update where `update.attested_header.slot <= latest_finalized_state.slot` and either `next_sync_committee_update` is `None` or `compute_period(update.attested_header.slot) != store_period` — i.e. a stale or duplicate update.","commonSituations":"Relayer replayed an update already processed (duplicate submission); two relayers race and the slower one's update becomes stale; the operator re-submits an old update after a tx failure without refetching.","solutions":["Check before submitting: fetch the client's latest finalized slot and only send updates with `attested_header.slot` greater than it.","Refetch a fresh update from the consensus client instead of retrying the same failed/stale one.","Deduplicate relayer submissions (track last submitted slot/period).","Only omit `next_sync_committee_update` when the client already stores a next committee; otherwise include it."],"exampleFix":"// before\n submit(update); // retry loop\n// after\n if update.attested_header.slot > client.latest_finalized_slot() {\n     submit(update)?;\n }","handlingStrategy":"validation","validationCode":"const latest = await api.query.ethereumClient.latestFinalizedBlockRoot();\nif (update.attestedHeader.slot <= latestSlot && !needsNextSyncCommittee(update)) throw new Error('irrelevant update');","typeGuard":null,"tryCatchPattern":"try { await submit(update); } catch (e) { if (e.includes('IrrelevantUpdate')) { skipStaleUpdate(); } else throw e; }","preventionTips":["Compare attested slot to latest finalized slot before submitting","Deduplicate submissions across relayers","Refetch fresh updates instead of retrying stale ones"],"tags":["substrate","beacon-consensus","stale-update","duplicate"],"backgroundTag":"invalid-state-transition","analyzedSha":"edcb13dbbcd3c29489eaa2480a6f60ee4cb1f3ec","analyzedAt":"2026-09-13T19:19:32.206Z","contentChangedAt":"2026-09-13T19:19:32.206Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}