Documentation
¶
Overview ¶
Copyright (C) 2026, Lux Industries, Inc. All rights reserved. See the file LICENSE for licensing terms.
migrate-ancient is a one-shot tool to copy an upstream-format ancient store (the .cdat/.ridx files written by core/rawdb.Freezer) into a ZAP-native ancient store (rawdb.ZapAncientStore).
Usage:
migrate-ancient \
--src=/data/db/<network>/chainData/<chainID>/ancient \
--dst=/data/ancient/<network>/<chainID> \
--tables=headers,hashes,bodies,receipts
The tool walks every table in lockstep (chain tables share a head), reads each item from the upstream freezer, writes it to the new ZAP store via the same ethdb.AncientStore contract. After a successful migration the new store has the same (head, tail) pointers as the source. The source is NOT deleted — the operator is responsible for flipping the EVM config to point at the new path and then removing the legacy directory after validation.