Skip to content

Commit 775ba83

Browse files
Setup fullnode with snapshot added
1 parent ed46131 commit 775ba83

File tree

8 files changed

+88
-0
lines changed

8 files changed

+88
-0
lines changed

docs/xdcchain/developers/node_operators/masternode.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,94 @@ For troubleshooting purposes, you can stop the node by using the following comma
465465
sudo docker-compose -f docker-compose.yml down
466466
```
467467

468+
---------------------------------------------------------------
469+
470+
# Setup XDC Masternode(Full Node)/Standby node using Snapshots
471+
472+
### Prerequisites
473+
474+
* A server or cloud instance (minimum 16 GB RAM, 1.5 TB storage)
475+
* Ubuntuoperating system
476+
* Basic Linux command-line knowledge
477+
478+
### Setting up the Node Environment using Bootstrap
479+
480+
Its the primary options for setting up your XDC Network node environment: using the bootstrap.sh script for a quick setup
481+
482+
Using the Bootstrap Command for Quick Setup
483+
This command automates the installation of necessary dependencies and sets up the basic node environment.
484+
485+
```
486+
sudo su -c "bash <(wget -qO- https://raw.githubusercontent.com/XinFinOrg/XinFin-Node/master/setup/bootstrap.sh)" root
487+
```
488+
489+
**You will be prompted to enter:**
490+
491+
- **XinFin Network (mainnet/testnet/devnet):** Type mainnet for the main XDC Network.
492+
493+
- **XinFin MasterNode Name:** Provide a name for your node (e.g.,Rushabh-Snapshot-Node).
494+
495+
- **Generate new private key and wallet address:** If you have your own key, you can change after this and restart the node: Enter y or Y and continue.
496+
497+
![node-sync](../../img/installation.png)
498+
499+
Once the installation on your Ubuntu server is complete, attach to the node using the following command to verify that the blockchain synchronization has begun
500+
501+
```
502+
bash xdc-attach.sh
503+
```
504+
505+
![node-sync](../../img/installation1.png)
506+
507+
You can monitor the status of your node using the above command or by visiting the official stats page at https://xinfin.network/#stats Once you've confirmed that the node has begun syncing from the genesis block, stop the node by running:
508+
509+
```
510+
bash docker-down.sh
511+
```
512+
![node-sync](../../img/installation2.png)
513+
514+
After stopping your node, proceed to delete the existing XDC directory to prepare for the snapshot data
515+
516+
![node-sync](../../img/installation3.png)
517+
518+
After deleting the XDC folder, you can now proceed to download and apply the latest snapshot.
519+
520+
To download the XDC Network Mainnet snapshot, use the appropriate command based on the type of node you’re setting up:
521+
522+
- **For a Full Node (latest state only):** https://download.xinfin.network/xdcchain.tar
523+
524+
- **For an Archive Node (complete history):** http://downloads.xinfin.network/xdcchain_archive.tar
525+
526+
**Note: Snapshots are updated approximately every 20 days.**
527+
528+
![node-sync](../../img/installation4.png)
529+
530+
Once the xdc.tar file has been downloaded, extract the snapshot by running the following command:
531+
532+
```
533+
tar -xvzf xdc.tar
534+
```
535+
536+
This will unpack the archive and create the XDC directory containing the necessary blockchain data.
537+
538+
![node-sync](../../img/installation5.png)
539+
540+
### Once the XDC folder has been extracted, navigate into it and perform the following cleanup steps:
541+
542+
**Delete the nodekey file:**
543+
544+
```
545+
rm -rf nodekey
546+
```
547+
548+
**Delete the transactions.rlp file:**
549+
550+
```
551+
rm -rf transactions.rlp
552+
```
553+
![node-sync](../../img/cleanup.png)
554+
555+
468556
---------------------------------------------------------------
469557

470558
# Downloading a Network Snapshot (Mainnet or Apothem)

docs/xdcchain/img/cleanup.png

46.6 KB
Loading

docs/xdcchain/img/installation.png

183 KB
Loading
43.9 KB
Loading
26 KB
Loading
33.3 KB
Loading
52.3 KB
Loading
115 KB
Loading

0 commit comments

Comments
 (0)