{"record":{"id":"a1e60b64b4dc8172","repo":"linera-io/linera-protocol","slug":"unexpectedoracleresponse","errorCode":"UnexpectedOracleResponse","errorMessage":"ExecutionError::UnexpectedOracleResponse","messagePattern":"ExecutionError::UnexpectedOracleResponse","errorType":"exception","errorClass":"ExecutionError","httpStatus":null,"severity":"critical","filePath":"linera-execution/src/transaction_tracker.rs","lineNumber":392,"sourceCode":"            local_time: _,\n            transaction_index: _,\n            next_application_index,\n            next_chain_index,\n            events,\n            blobs,\n            previously_created_blobs: _,\n            operation_result,\n            streams_to_process,\n            blobs_published,\n            free_blob_ids,\n            prepared_checkpoint: _,\n        } = self;\n        ensure!(\n            streams_to_process.is_empty(),\n            ExecutionError::UnprocessedStreams\n        );\n        if let Some(mut responses) = replaying_oracle_responses {\n            ensure!(\n                responses.next().is_none(),\n                ExecutionError::UnexpectedOracleResponse\n            );\n        }\n        let blobs = blobs\n            .into_iter()\n            .map(|(blob_id, content)| Blob::new_with_hash_unchecked(blob_id, content))\n            .collect::<Vec<_>>();\n        Ok(TransactionOutcome {\n            outgoing_messages,\n            oracle_responses,\n            next_application_index,\n            next_chain_index,\n            events,\n            blobs,\n            operation_result: operation_result.unwrap_or_default(),\n            blobs_published,\n            free_blob_ids,","sourceCodeStart":374,"sourceCodeEnd":410,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-execution/src/transaction_tracker.rs#L374-L410","documentation":"During replay, TransactionTracker holds the list of oracle responses recorded when the block was first executed. into_outcome verifies that this list is fully consumed; UnexpectedOracleResponse means the recorded list still had responses left over — the re-execution performed fewer oracle queries than were originally recorded.","triggerScenarios":"Replaying a block whose execution path skipped an oracle query the original run performed — usually because application code or state changed between the recorded run and the replay, or a checkpoint was applied (apply_checkpoint) with a stale response list.","commonSituations":"Changing WASM application bytecode while historical blocks still need replay; replaying from a checkpoint whose recorded oracle responses no longer line up with the replayed transactions; non-deterministic control flow that conditionally skips oracle reads.","solutions":["Recompile/redeploy so the replayed block executes the exact bytecode it was recorded with (the published blob must match)","Discard the stale checkpoint and re-download blocks and recorded responses from a committee validator","Audit the application for conditional oracle reads (a branch that sometimes skips a query) and make read patterns stable per code path"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"Match ExecutionError::UnexpectedOracleResponse alongside OracleResponseMismatch around replay and checkpoint-apply calls. Both indicate replay divergence: halt the replay, discard the checkpoint, resynchronize from a validator, and re-validate rather than continuing.","preventionTips":["Never change application bytecode while historical blocks still need replay","Take checkpoints only at block boundaries where recorded oracle responses are consistent","Keep oracle read patterns deterministic and unconditional per code path"],"tags":["oracle-response","replay","checkpoint","determinism","linera-execution"],"backgroundTag":"state-replay-divergence","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}