{"record":{"id":"82fc45f7182ba6bb","repo":"linera-io/linera-protocol","slug":"invalid-logs-list-rlp-e","errorCode":null,"errorMessage":"invalid logs list RLP: {e}","messagePattern":"invalid logs list RLP: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"linera-bridge/src/proof/mod.rs","lineNumber":402,"sourceCode":"    let list_header =\n        alloy_rlp::Header::decode(&mut data).map_err(|e| anyhow!(\"invalid receipt RLP: {e}\"))?;\n    ensure!(list_header.list, \"receipt must be an RLP list\");\n\n    // Limit reads to the receipt's declared payload.\n    ensure!(\n        data.len() >= list_header.payload_length,\n        \"receipt payload extends past available data\"\n    );\n    let mut data = &data[..list_header.payload_length];\n\n    // Skip: status (0), cumulative_gas_used (1), logs_bloom (2)\n    for i in 0..3 {\n        skip_rlp_item(&mut data).map_err(|e| anyhow!(\"failed to skip receipt field {i}: {e}\"))?;\n    }\n\n    // Decode the logs list\n    let logs_header =\n        alloy_rlp::Header::decode(&mut data).map_err(|e| anyhow!(\"invalid logs list RLP: {e}\"))?;\n    ensure!(logs_header.list, \"logs must be an RLP list\");\n    ensure!(\n        data.len() >= logs_header.payload_length,\n        \"logs payload extends past receipt boundary\"\n    );\n\n    let mut logs_data = &data[..logs_header.payload_length];\n    let mut logs = Vec::new();\n    while !logs_data.is_empty() {\n        logs.push(decode_log(&mut logs_data)?);\n    }\n\n    Ok(logs)\n}\n\n/// Parses a `DepositInitiated` event from a receipt log.\n///\n/// Verifies that `topic[0]` matches the event signature, that the log was emitted by","sourceCodeStart":384,"sourceCodeEnd":420,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-bridge/src/proof/mod.rs#L384-L420","documentation":"After skipping the three leading fields, the next RLP item — the logs list — failed header decoding. The receipt ends (or corrupts) exactly where the logs list should begin. Raised by decode_receipt_logs; surfaced as Permanent by generate_deposit_proof.","triggerScenarios":"A receipt whose payload ends after the bloom field (no logs list at all); truncated bytes; a stray type byte offsetting the cursor so the logs header is read from the wrong position.","commonSituations":"Truncated hex; receipts whose type-prefix handling was done twice (stripped once here and once upstream); malformed fixtures.","solutions":["Ensure the type byte was stripped only once before decoding","Use complete canonical receipt bytes from Encodable2718 output","For fixtures, build them with the crate's build_test_receipt helpers so the shape is guaranteed valid"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match decode_receipt_logs(&receipt_rlp) {\n    Err(e) if e.to_string().contains(\"invalid logs list RLP\") => {\n        // truncated before logs: re-derive the canonical receipt bytes\n    }\n    other => other?,\n}","preventionTips":["Strip the EIP-2718 type byte exactly once before decoding","Validate buffer completeness (declared payload length vs actual length) upstream","Never hand-truncate receipt byte arrays in fixtures"],"tags":["rlp","decoding","logs","receipt","bridge","proof"],"backgroundTag":"rlp-decode-failed","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}