启动节点时添加 --prune=hrtc
flag。
h
- prune history (ChangeSets, HistoryIndices - used by historical state access)r
- prune receipts (Receipts, Logs, LogTopicIndex, LogAddressIndex - used by eth_getLogs
and similar RPC methods)t
- prune transaction by it's hash indexc
- prune call traces (used by trace_*
methods)By default, --prune
deletes data older than 90K blocks from the tip of the chain (aka, for if tip block is no. 12'000'000, only the data between 11'910'000-12'000'000 will be kept).
Thus could be overridden by --prune.<mode>.older
flags.
E.g. --prune.h.older=1000000
keeps the last 1'000'000 historical entries.
--prune=
(empty list) means no pruning (full archive mode).