Setup your node
Install pre requis
sudo apt-get update && sudo apt upgrade -y
sudo apt-get install make build-essential gcc git jq chrony -y
Install go
sudo rm -rf /usr/local/go
wget https://golang.org/dl/go1.19.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz
rm go1.19.1.linux-amd64.tar.gz
Setting up go
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
Install Node
Install the dYdX-node
binary by running the following commands
#from $HOME dir
export BINARY_VERSION="v1.0.0"
git clone https://github.com/dydxprotocol/v4-chain dydx
cd dydx
git fetch
git checkout v1.0.0
make install
Initialization node
Please choose your MONIKER name and replace it in the next command, it will represent your node
dydxprotocold init MONIKER_NAME --chain-id dydx-mainnet-1
This will generate severals files in ~/.dydxprotocol/config/
- node_key.json
- genesis.json
- priv_validator_key.json
Download and replace the genesis file
rm ~/.dydxprotocol/config/genesis.json
wget https://raw.githubusercontent.com/dydxopsdao/networks/main/dydx-mainnet-1/genesis.json
mv genesis.json ~/.dydxprotocol/config
Node connexion
In order to connect the node you can either use seeds
, lives peers
or address book
.
- Seeds
- Peers
- Addrbook
Set Seeds
SEEDS = ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:23856,65b740ee326c9260c30af1f044e9cda63c73f7c1@seeds.kingnodes.net:23856,c2c2fcb5e6e4755e06b83b499aff93e97282f8e8@tenderseed.ccvalidators.com:26401,20e1000e88125698264454a884812746c2eb4807@seeds.lavenderfive.com:23856,f04a77b92d0d86725cdb2d6b7a7eb0eda8c27089@dydx-mainnet-seed.bwarelabs.com:36656
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" $HOME/.dydxprotocol/config/config.toml
Set Peers
PEERS = 1c3b0cf4a1e1d970a999a5c08125b600fbae3118@91.210.101.93:26656,ccd4aeff37b6af6de6637e05dbefe7f89a7d3acb@95.217.76.105:26656,9581f3f0577710f1a691c4ffe4c337988d2c1531@34.124.239.41:26656,8908eb080b49e903a14a6927a5e1f2e747766c84@103.75.118.87:23856,c13816a68034ac7ff1a978c69f2f01ad10c044cf@65.108.76.228:27056,1d98c0c0c2828b6a0673569f2abc3f4002726f07@34.97.9.239:26656,2c2a6f973176a0974e65a125fb15ffda68bc1851@65.108.69.91:26656,0ac2a2600a89a3ef042f8454018ef932d2ad9e5b@65.108.137.22:26656,c4c0555714c1130815c73770689f200915f4870e@23.106.231.92:2000,cddbde635a85acfb08f101131d5cc0eed5085986@13.113.235.15:26656,b7e32ab94832ac90b40b1b4901412202d2eba9b2@62.171.132.152:26656,c5b09632c40aee1ff97063d491e2a0ceb7863b34@37.252.190.207:26656,36d72fe03a3c52228af73355f64f9edf4d0e6bf6@34.81.116.74:26656,dfa67970296bbecce14daba6cb0da516ed60458a@54.195.238.51:26656,25dd504d86d82673b9cf94fe78c00714f236c9f8@52.19.211.42:26656,1112320ebde91254f4c87ceafcde4dcfd75245dd@65.21.193.117:26656,27c05c96d127222f755dc6141997d78f74c228aa@65.21.142.47:26656,45daba15d11d6f9a608bae252cb46dcdf0f30f7a@65.108.137.35:26656,83c32caefd071340398616a00204c3843c33b5ac@34.101.205.180:26656,a988534ab1e4bc42aad26ea7ec7bdc7d5415a14c@38.132.56.20:32667,80d3635f80a4ebba801467dc6371be2f2060bfaa@170.64.171.187:26180,91aadb9c1e2f2d603986b419fd11c369e9388915@3.217.47.126:26656,c9f0d88f564fac0386293ab948082ad500357120@129.213.40.185:26656,d72c5815c303d1f15a3f85694b0335c089acbd21@128.140.75.182:26656,dab7d8952e1a9ac1f0d206aba4d696833b55bdcd@164.152.163.20:26656,c26bcf0164f012b7be8e59d107a64f12245e4dc0@34.100.202.220:26656,83c299de2052db247f08422b6592e1383dd7a104@136.243.36.60:23856,04045f40f60158741199f20442dfbdf82dc5b300@109.61.83.156:54756,f039faa940268b4f2a46a19a651c3d8d7bff5ee6@161.35.70.35:26656,adc466012cf3c59f2705749c25cd0d93422e4efb@95.217.202.160:26656,1912b0c5ad05bacda024ab5c3fa93026ffcb8e1e@15.235.42.151:26670,004905d61c78d047db530a7b366c6aeb7377d841@35.75.168.211:26656,4633d0027017d9253924fa04744d579601207060@65.21.237.117:27656,d2cb18ac9bdf0e2c658d867d303f6c8cb958fc0c@5.9.237.192:26656,6e5197982407278a972a07684e7f1e5e12a05c90@18.181.198.112:26656,98919f8941856287fe81a93cc5f31c6246bbb07f@158.247.206.39:16300,161fdd94bed6e4dedf5985488f7253909981cd9e@164.152.160.222:26656,ba62dbd286d78c2e2dea8269bbe2cd9ac8e43d72@208.88.251.50:26656,801054b990e190c4b443e3332c5e44cd519e27c5@172.105.219.146:26656,a954026048132a18afe8e1e6073110d5364b6251@15.204.85.163:26656,8abc7ff2e9cbc6627b354db583e6962eac1b9975@217.69.9.108:26656,dc60281d27ffd55846ceb863449f664cfbbe5010@35.200.25.0:26656,f3a33b6c65ecb930d4457f1dbe87532a4d7c2061@57.128.22.77:54756,f55aebbbd6479d3e5847862ff6d386c0fd705710@15.235.115.147:16300,1348ccfa2b5a4d2d8841799adfb86cdd97bd0969@51.89.117.23:26656,9e541e30908903c17e18d84bb38a59a41a371789@65.108.0.94:23856,eddebc902c22f3b91ca7009722588ced1a844a2d@206.81.22.61:32395,4e1b0d11dc08c4b16838de9f8a33446d3f9df626@35.215.33.110:26656,b52e8a6a2af6c65a1d42efa4dc18ca41842947ee@20.7.13.12:26656,e305453e06b6070f796c1c0ec89cf2d28d0309b1@16.63.197.153:26656,9e135722137f86de26f9435b4d0e487287b36243@15.235.183.201:23856,5fa6312d7cee3a27427a8abf70b15edb37427436@5.9.55.103:15669,e3aa9fd8e35552168ccf321d3add5737fbcef71a@57.129.19.18:26656,adac31f128a4da47740109714eb396bbf59136dd@15.235.212.159:35062,b35c8448c4d0b8ec830567c5a6126b62515ec990@141.95.97.68:26661,1f2cf30690e67aaa8a107d9eca4587e23e74b291@148.113.16.46:23856,23ce023dd871a1af3bcf274b5ae20dabb0ba168f@18.183.143.123:26656,c71235e6907d99a5d4492fc3a59b05c33df2c26b@95.216.0.31:26656,7f8036b52ec5216b0942c855bf636b4de1b03730@34.131.8.83:26656,79204bc5b9d84b9bde8afa0e7c0e87829f2ecd24@74.234.18.6:26656,db094a47e9073b2638653fb5694ab64d080fddb0@82.100.58.113:26656,b4edb3d1490944d115affbbc7a513662d44409fd@199.254.199.206:26656,a465e7dc625e661433c7008ecdb1afd9321d7dd5@95.217.195.37:26656,7f4959f6ef9055c36277ec610b86e7398188b513@178.128.118.81:26180,af4d6709034815b54308d6c12c0271c38e243d26@199.254.199.238:26656,f0551461cc24faf6ef1aed779ec207bec48f591b@45.250.255.107:26656,2d49b1038ccbc03336ddbd97df9f8254d1ccdbcb@167.235.13.19:26656,702e68f83c90ec1b7caa4b92cbcb31c818289d58@103.219.171.71:26656,c82bd15bff394a972a09a2380bc2c86657205bc3@165.154.252.65:26656,0bdf58c7cbd3f38eac54dcb25181d3b2b98984f4@136.243.59.113:26656,04b1720fdaa28fe72d6fd0e66c9a783594eff0a6@54.37.253.178:26656,4d63fcd5ed021f5a2b1c64151560ef974ab4809c@95.217.110.39:26456,122296ee0ba6363a11f65ed6a43bc46f60ee7fc8@45.82.65.137:26656,f7c31c6ca8e384e5d1f4b416a44fbf0c09799881@37.187.71.86:23856,8f618dec9ec31dc07df97ab66f89703f41922b73@44.214.37.79:26656,c8f97f5357194018c61de5122a0eab4c1d44a2c7@65.109.100.51:26656,82cc4e1664b840d28783bc3da6a9f69aae9afd7a@65.109.156.11:23856,01d4eceb5bd32a1dc917a9f77354ce22cf67be72@65.108.104.171:26656,727dffd0160fe0a57f8b8bea293f7dfe7a67bd25@103.139.28.201:23856,3cd3146398b56a55cfda61eca427f6bb2cf60601@85.190.134.37:26656,14dce029ab2976333d51e8cb62e632d776f1e591@57.128.95.108:35042,fa1c32f5df28c49f961dd80aeab6b1122cf053d9@51.210.223.225:26656,59dbb4666a2a6bb27953ba492aed34326cb678e9@199.254.199.199:26656,6052d395761de94ea6e36b24f9de356b64370fc6@161.35.69.195:26180,2e48c68921b8e7107761a2e429a68da9219180c5@162.19.127.29:26656,181ffa1d33cef4e26b672defafb1cda1b43de6d4@95.214.53.29:27366,c9aecb1ebc876068f61fbc5c16d7ef2e2917e667@158.69.240.42:26656,5b3bfab3e1b36c6adc1c82d33b4abc2c20ea78a6@65.108.9.59:26011,00928d2162ffc9a2f614550a48674703d07e9543@141.94.141.141:35656,1e89703467e974f23c75bfbf027335bb8935cf66@37.252.190.227:26656,d50fc517e4af486aa260dd9332375cd762f779d1@213.239.205.211:55836,90b0ee8e73d8237b06356b244ff9854d1991a1f8@65.109.115.228:23856,effeb0fffe8e74f66042e02a74bf2ab5c283b0e4@144.76.107.29:30876,580ec248de1f41d4e50abe132b7838348db55b80@176.9.144.40:23856,b371ae9756d9eebe9cdfe8c2ac3826b890374c53@195.189.96.106:54756,cb6ae22e1e89d029c55f2cb400b0caa19cbe5523@172.111.52.52:32679,e9b031565ef1b69f134fa24871ccb2d909e6efb4@3.145.161.224:26656,0fb21381f73ec668d269d01bc334be2e5eee419e@109.123.230.6:2000,8c6e0c1b516a259f6c75aee2f2d12a5398de6bfa@95.214.55.64:23856,de7d65a7a4535e683001f27d7fc7561d06d1d8ac@141.95.66.199:27802,e3665b014ac05b4c06e2c94d89e4d4936da4deb4@167.179.68.73:16300,4e45e516e38dd8016d0cd5ea55503be54e920f64@169.155.44.122:26656,32710bb8808bab3862469008e357ad6765bfbdac@13.48.176.43:26656,3cdfcfdff3450e0654892d9adee78ccd1cbebe0a@128.199.194.201:26656,640d04afa825cd024e2df06f547bde3eda513b76@5.104.82.89:26656,1ec3bae172b89cc3d128213aa9e05f0605e3b8df@78.46.47.52:23856,7d419c2c64f8b441746e46a185defffb7ab080d4@43.207.85.32:26656,58fc0e934558740d76e07dba2c25bb19ce73fc5c@141.95.85.165:26656,4f84e2e0d09a055b448ad5ca28abe6ec670b8ca6@136.243.72.31:55836,b6a7a5bea273273d7a9f962afcba6def44c1429d@65.21.200.7:26656,706a73a67dba6137b3c0fdc58ec047125da05e09@202.8.11.92:23856,4b0b87467129127d69ea6bb13ebae1153e8f801c@3.67.197.220:26656,f94267d08e1b799909daffdcfdfd590ebbaabc72@167.71.184.12:26180,d2f5e2be0e9eb14095fb16322293a9ff37c7c3ea@157.90.36.48:27556,29301d41c7cb82e7e5ac67931a695b093906e663@195.14.6.2:26656,757f269bc267c0d8807d6d42bc8cc23ce62ec2b1@103.106.228.145:23856,ee8fdf2a100069c6ffc96e8ac28cba30386f236a@169.155.46.155:26656,1cd0ace28247ed3b8bf335292a6ec9c9758c736a@167.71.193.18:26656,3037cde12789beba0b6769e8ac4ec2caa8011181@15.235.160.196:23856,b8a27a3758e4cce6fbf93ba865900b337a7c575b@3.113.94.52:26656,fddef9cb49c9b7c7311bc30abfe9970bef8ac095@199.254.199.18:26656,a5979516b97c5adfbb34f21e2e7b97ff0fd3a736@84.203.117.234:26656,9a11635db4ee61d880ff61afc82008cfd9156f63@199.254.199.10:27656,ccb680a009f3bb805fb052426f69ec6279b22c37@16.62.99.149:26656,8d391e7e3747ebd183e92bb0ad0f6ad16991051e@13.113.235.120:26656,6c19826e301d7584bd67b213e64a7599887a69fb@15.235.183.209:26656,42d2dd6a14ffedff8872a2d10dab94d8ba265694@64.227.190.243:26180,91137315ca9d43fd5ba08a1851ccc5eb66d810e5@54.64.156.178:26656,87244881482cdb345c29f32310e572abde25dc14@148.113.16.47:23856,ebc272824924ea1a27ea3183dd0b9ba713494f83@185.16.39.65:27366,6d2bda12d7dbeabff7aee0ec561b594e06fcb537@142.93.138.76:26180
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.dydxprotocol/config/config.toml
Set Addrbook
Setup service file
[Unit]
Description="dYdX node"
[Service]
User=USER
ExecStart=$(which dydxprotocold) start
Restart=always
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
If you'd like to synchronise a node from a snapshot check the snapshot part
Start service file
systemctl daemon-reload
systemctl start dydx.service | journalctl -u dydx.service -f