Mainnet

The snapshot service for dYdX Archive Mainnet (chain-id dydx-mainnet-1) is available here.

If you need to bootstrap your archive node, you can use our weekly snapshot service to speed up the process.

Note: the nodes used for snapshotting are using the pruning values from below, they have state-sync disabled and are hosted as Systemd services on machines using Ubuntu 22.04.

# in app.toml
pruning = "nothing"

...

[state-sync]

snapshot-interval = 0

# in config.toml

...

[tx_index]

indexer = "kv"

How to use

You simply go to our snapshot service, select the "dYdX Archive Snapshots" section and you can download the latest available snapshot! In order to use it, simply decompress the archive as per the following instructions and start your node.

# make sure you have aria2 installed
sudo apt-get install aria2

# download the snapshot
aria2c -x8 https://snapshots.bwarelabs.com/dydx-archive/mainnet/dydx20240505.tar.lz4

# if dYdX was already on your machine, stop your dYdX service
sudo systemctl stop dydx.service
# OR container
docker stop <DYDX_CONTAINER_NAME>
# AND make sure there is no process running that might try to write to the database
ps -ef | grep dydx

# make sure your dydx data directory is clean (let us assume <DYDX_HOME> is your root dYdX directory)
# make sure to backup your priv_validator_state.json file before deleting the contents of the data directory
mv <DYDX_HOME>/data/priv_validator_state.json <DYDX_HOME>
rm -rf <DYDX_HOME>/data/

# make sure you have lz4 installed
sudo apt-get install lz4

# decompress the archive
lz4 -c -d dydx20240505.tar.lz4  | tar -x -C <DYDX_HOME>

# copy back the priv_validator_state.json file
rm <DYDX_HOME>/data/priv_validator_state.json
mv <DYDX_HOME>/priv_validator_state.json <DYDX_HOME>/data/

# start the dYdX service OR container

You should be in-sync with the network in minutes after starting the node.

Please make sure to also check the Official Documentation and the Github Repository posted above in order to correctly deploy the node of your choice, be it a full node or validator.

Last updated