Goal
This procedure records the current chain state and future history, without previous historical data on the local chain.
Before you begin
- Make sure EOSIO is installed.
- Learn about Using Nodeos.
- Get familiar with state_history_plugin.
Steps
-
Get the following:
- A portable snapshot (
data/snapshots/snapshot-xxxxxxx.bin
) - Optional: a block log which includes the block the snapshot was taken at
- A portable snapshot (
- Make sure
data/state
does not exist - Start
nodeos
with the--snapshot
option, and the options listed in thestate_history_plugin
. - Look for
Placing initial state in block n
in the log, where n is the start block number. - If using a database filler, start the filler with
--fpg-create
(if PostgreSQL),--fill-skip-to n
, and--fill-trim
. Replacen
with the value above. - Do not stop
nodeos
until it has received at least 1 block from the network, or it won't be able to restart.
Remarks
If nodeos
fails to receive blocks from the network, then try the above using net_api_plugin
. Use cleos net disconnect
and cleos net connect
to reconnect nodes which timed out.