migrate-ancient

command
v1.16.99 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2026 License: GPL-3.0, LGPL-3.0, BSD-3-Clause Imports: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL