Smart Chain
downloads.
Run a node on the Electroneum Smart Chain. Download the etn-sc client or restore a chain snapshot to bring your node up to date.
Developer resources
Blockchain snapshots
Each snapshot contains a copy of the etn-sc/chaindata/ database folder. Restore it into your node’s data directory before starting etn-sc. The node then syncs the blocks produced since the snapshot. The etn-sc import command cannot load this format.
/snapshots/latestHow to restore a snapshot
1. Download and verify the pair
Choose the network your node will run. From a single archive row, save both the dated .tar.gz and its .tar.gz.sha256 in the same folder. Keep their original filenames so the checksum check can find the archive. In that folder, run these commands in Bash.
read -r -p "Dated archive filename: " ARCHIVE
sha256sum --check -- "$ARCHIVE.sha256"
Continue only if the output names your archive and ends in OK.
2. Check the destination
Use the --datadir configured for your service. The validator guide uses /var/lib/etn-sc/data owned by etnsc. The supplied node CDK uses /var/lib/etn-sc owned by ec2-user. Allow room for both the compressed download and the unpacked database.
tar -tzf "$ARCHIVE" | less
Entries should all be under etn-sc/chaindata/. Stop if you see unexpected paths, a node key or a keystore. Restore before the node’s first start. For an existing node, stop the service, confirm the process has exited and back up the existing database before moving it aside. Preserve the node’s keys and configuration.
3. Extract the database folder
Set the directory and service account for your installation. The example below uses the validator guide defaults. Extract at the data directory root so the archive creates exactly one etn-sc/chaindata/ beneath it.
DATADIR=/var/lib/etn-sc/data
NODE_USER=etnsc
NODE_GROUP=etnsc
if pgrep -x etn-sc >/dev/null; then
echo "Stop etn-sc before restoring."
elif sudo test -e "$DATADIR/etn-sc/chaindata"; then
echo "An existing chain database occupies this path."
else
sudo -u "$NODE_USER" test -d "$DATADIR" ||
sudo install -d -o "$NODE_USER" -g "$NODE_GROUP" "$DATADIR"
sudo -u "$NODE_USER" tar --no-same-owner --no-same-permissions -xzf "$ARCHIVE" -C "$DATADIR"
fi
Run extraction from a location readable by the service account. If extraction fails, keep the node stopped and move the partial database aside before retrying.
4. Start the node and check sync
After extraction succeeds, confirm the folder exists at $DATADIR/etn-sc/chaindata. With the service configured for the same network, start it and follow the logs.
sudo systemctl start etn-sc
sudo journalctl -u etn-sc -f
In the etn-sc console, check that eth.syncing returns false and compare eth.blockNumber with the current height on that network’s block explorer.
