{"record":{"id":"b3b3b24533c09d7f","repo":"linera-io/linera-protocol","slug":"invalid-block-export-configuration","errorCode":null,"errorMessage":"invalid block export configuration","messagePattern":"invalid block export configuration","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"linera-service/src/server.rs","lineNumber":859,"sourceCode":"                cross_chain_message_chunk_limit,\n                cross_chain_batch_size_limit,\n                allow_revert_confirm,\n                reset_on_corrupted_chain_state_mins,\n                recovery_whitelist: recovery_whitelist.map(HashSet::from_iter),\n                block_export_config: export_blocks_to_committee.then(|| {\n                    let config = BlockExportConfig {\n                        certificate_upload_batch_size: block_export_batch_size,\n                        queue_size: block_export_queue_size,\n                        queue_bytes: block_export_queue_bytes,\n                        max_in_flight_per_destination: block_export_max_in_flight,\n                        max_in_flight_total: block_export_max_in_flight_total,\n                        max_catch_up_blocks: block_export_max_catch_up_blocks,\n                        idle_catch_up_interval: block_export_idle_interval,\n                        retry_delay: block_export_retry_delay,\n                        max_retry_delay: block_export_max_retry_delay,\n                        converged_chain_retention: block_export_converged_retention,\n                    };\n                    config.check().expect(\"invalid block export configuration\");\n                    config\n                }),\n                block_export_transport,\n                block_export_node_options: NodeOptions {\n                    send_timeout: block_export_send_timeout,\n                    recv_timeout: block_export_recv_timeout,\n                    ..NodeOptions::default()\n                },\n                #[cfg(with_metrics)]\n                enable_memory_profiling,\n            };\n            let wasm_runtime = wasm_runtime.with_wasm_default();\n            let store_config = storage_config\n                .add_common_storage_options(&common_storage_options)\n                .unwrap();\n            // Validators should not output contract logs.\n            let allow_application_logs = false;\n            let cache_sizes = common_storage_options.storage_cache_config();","sourceCodeStart":841,"sourceCodeEnd":877,"githubUrl":"https://github.com/linera-io/linera-protocol/blob/6c226ddcb332ef55118dc8d0aafbd093d5420899/linera-service/src/server.rs#L841-L877","documentation":"ServerContext builds its BlockExportConfig from the --block-export-* CLI options and immediately calls config.check().expect(\"invalid block export configuration\"). check() enforces: certificate_upload_batch_size > 0, queue_size > 0, queue_bytes > 0, max_in_flight_per_destination > 0, max_in_flight_total >= max_in_flight_per_destination, max_catch_up_blocks > 0, idle_catch_up_interval > 0, retry_delay > 0, max_retry_delay > 0, and retry_delay <= max_retry_delay (linera-core/src/chain_worker/export.rs:241). Violating any constraint panics at startup.","triggerScenarios":"Running `linera server run` with block-export options set to zero (e.g. --block-export-retry-delay 0ms to 'retry fast'), or with --block-export-max-in-flight-total smaller than --block-export-max-in-flight-per-destination, or a retry delay exceeding the max retry delay.","commonSituations":"Tuning scripts that default unset numeric knobs to 0; operators zeroing delays to speed up local/test clusters; copying per-destination limits to the total budget without scaling; passing durations without units so parsing yields unexpected values.","solutions":["Set every --block-export-* numeric/duration option strictly positive (e.g. retry-delay 1s, max-retry-delay 60s)","Ensure max-in-flight-total is at least max-in-flight-per-destination","Ensure retry-delay does not exceed max-retry-delay","Drop the tuning flags entirely to use built-in defaults rather than zeroing them"],"exampleFix":"# before (two violations: zero retry delay; total < per-destination)\nlinera server run ... \\\n  --block-export-retry-delay 0ms \\\n  --block-export-max-in-flight-per-destination 16 \\\n  --block-export-max-in-flight-total 8\n\n# after\nlinera server run ... \\\n  --block-export-retry-delay 1s \\\n  --block-export-max-retry-delay 60s \\\n  --block-export-max-in-flight-per-destination 16 \\\n  --block-export-max-in-flight-total 64","handlingStrategy":"validation","validationCode":"# Encode check()'s constraints in your launch script.\nvalidate_block_export() {\n  [ \"$BATCH\" -gt 0 ] && [ \"$QUEUE_SIZE\" -gt 0 ] && [ \"$QUEUE_BYTES\" -gt 0 ] \\\n    && [ \"$PER_DEST\" -gt 0 ] && [ \"$TOTAL\" -ge \"$PER_DEST\" ] \\\n    && [ \"$CATCH_UP\" -gt 0 ] || { echo 'block export config violates constraints' >&2; exit 1; }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never zero out delay/queue knobs when tuning; choose small positive values instead","Keep total in-flight >= per-destination in-flight in all presets","Keep retry_delay <= max_retry_delay in templates","Prefer omitting --block-export-* flags to inherit validated defaults"],"tags":["linera","server","block-export","config-validation","startup"],"backgroundTag":"config-validation-failed","analyzedSha":"6c226ddcb332ef55118dc8d0aafbd093d5420899","analyzedAt":"2026-08-22T22:49:09.787Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}