mirror of
https://github.com/luxfi/evm.git
synced 2026-07-29 00:26:27 +00:00
The --import-chain-data startup import is re-entered on every boot, because production pod specs keep the flag set. Once the chain is already at or above the file's tip, importBlocksFromFile imports 0 blocks and returns "no blocks imported (parsed=0)"; Initialize treated that as fatal, so the C-Chain failed to initialise on every restart of an already-imported node — /v1/bc/C/rpc 404, node contributes no consensus vote. This was fixed once. Commitc58d307e("startup RLP-import consensus-wedge + idempotency") landed BOTH halves on hotfix/v1.104.9. Only the consensus-refresh half was forward-ported to main (it is here as "FIX (v1.104.11)"); the idempotency half was not, and isNothingToImportError does not exist on main. Verified: git merge-base --is-ancestorc58d307emain => false; the commit is reachable only from hotfix/v1.104.9 and release/v1.104.9-hotfix.4. Observed live on lux-testnet 96368 today rolling node v1.36.35, which is built from evm main: two nodes came back with a dead C-Chain on exactly this error. The v1.36.24 plugin binary in the same cluster still contains the string "Startup import: chain already at/above import tip; nothing to import"; the v1.36.35 binary does not. Restores isNothingToImportError and the guard, unchanged in meaning fromc58d307e: idempotent ONLY when the chain already holds accepted content (curHead > 0). On a fresh chain the same messages still mean a genuinely empty or corrupt file and stay fatal. startup_import_idempotency_test.go locks the contract, both RLP shapes plus the fresh-chain safety case. Red without the fix (undefined: isNothingToImportError, build failed); green with it: --- PASS: TestStartupImportIdempotency_AlreadyAtTip (0.02s) ok github.com/luxfi/evm/plugin/evm 1.260s Co-authored-by: Hanzo Dev <dev@hanzo.ai>