DERA chain docs
  • Introduction
  • NFT2.0
    • Introduction
    • Architecture
    • Concepts
      • Collection
      • NFT2.0
      • Data Registry
      • Derivative NFT
      • Derived Account
      • Token Bound Account (aka TBA)
    • Smart Contracts
      • Interfaces
        • Factory
        • Dynamicity
        • Derivability
        • Cross chain ability
      • Use cases
        • Create collection
        • Mint NFT2.0
        • Create Data registry
        • Write onchain data
        • Retrieve onchain data
        • Mint Derivative NFT2.0
        • Create TBA
    • SDK
      • Setup
        • Create Console Account
        • Manage API key
        • Set up metadata schema
        • Initialize the SDK
      • API reference
        • Get List Collection
        • Get List Collection By Owner
        • Get Collection Info
        • Get List NFT By Collection
        • Get List NFT By Owner
        • Get List Derivative NFT By Original
        • Get NFT Info
        • Get List Data Registry
        • Get Data Registry By Owner
        • Get Data Registry Info
        • Get NFT onchain data
        • Get NFT protocol-scoped onchain data
        • Get User Freemint Info
        • Get Claim Token Uri Info
        • Upload JSON Uri Data To IPFS
        • Generate Presigned URL To Upload Image (IPFS)
        • Utility Functions
    • App guide
      • NFT2Scan
        • Create Collection
        • Mint NFT2.0
        • Mint Derivative NFT2.0
      • NFT2Console
        • Create Dapp
        • Register data schema
        • Manage API keys
        • Manage onchain data
    • References
      • Links
  • Bridge
    • Introduction
    • Bridge Token
    • Bridge NFT
  • Staking
    • Introduction
    • Validate
    • Delegate
  • Smart Contracts
    • EVM compatibility
    • Hardhat
    • Foundry
    • Account Abstraction
    • SubQuery Indexer
    • SAFE multisign
  • Nodes & Validators
    • Run a Node
    • Become a Validator
Powered by GitBook
On this page
  • Dependencies
  • Build the Node binary
  1. Nodes & Validators

Run a Node

Guideline to run a full node on DERA chain

PreviousSAFE multisignNextBecome a Validator

Last updated 23 days ago

Dependencies

  • A public static IP

Build the Node binary

  1. Clone the AvalancheGo repository

git clone https://github.com/ava-labs/avalanchego.git
  1. Compile binary

cd avalanchego
./scripts/build.sh
  1. Create AvalancheGo service directory

sudo mkdir /var/lib/avalanchego
  1. Copy executable to binary directory

sudo cp avalanchego/build/avalanchego /usr/local/bin/
sudo chmod 755 /usr/local/bin/avalanchego
  1. Create AvalancheGo working directory

sudo mkdir /root/.avalanchego
sudo mkdir -p /root/.avalanchego/plugins
wget https://github.com/ava-labs/subnet-evm/releases/download/v0.7.3/subnet-evm_0.7.3_linux_amd64.tar.gz
tar -xzvf subnet-evm_0.7.3_linux_amd64.tar.gz
  1. Copy subnet EVM to AvalancheGo working directory

sudo cp subnet-evm_0.7.3_linux_amd64/subnet-evm /root/.avalanchego/plugins/mDVK6hF1rcPB2e7ftmYbMQgnYMnQSnnk7cUfu8dENAYqH9XJA

mDVK6hF1rcPB2e7ftmYbMQgnYMnQSnnk7cUfu8dENAYqH9XJA is the VMID of DERA chain.

  1. Create chainConfigs directory

sudo mkdir -p /root/.avalanchego/chainConfigs/2XCTEc8CfNK9MtQWYMfgNt32QjZsZqq92LH7eTV5xY8YjY44du

2XCTEc8CfNK9MtQWYMfgNt32QjZsZqq92LH7eTV5xY8YjY44du is blockchain ID of DERA chain.

  1. Create chain config.json

sudo touch /root/.avalanchego/chainConfigs/2XCTEc8CfNK9MtQWYMfgNt32QjZsZqq92LH7eTV5xY8YjY44du/config.json

with content.

{
  "database-type": "leveldb",
  "log-level": "debug",
  "warp-api-enabled": true,
  "eth-apis": [
    "eth",
    "eth-filter",
    "net",
    "admin",
    "web3",
    "internal-eth",
    "internal-blockchain",
    "internal-transaction",
    "internal-debug",
    "internal-account",
    "internal-personal"
  ]
}
  1. Create config.json for AvalancheGo

sudo touch /root/.avalanchego/config.json

with content.

{
    "chain-config-dir": "/root/.avalanchego/chainConfigs",
    "http-allowed-hosts": "*",
    "http-host": "0.0.0.0",
    "network-allow-private-ips": "true",
    "public-ip": "YOUR_PUBLIC_IP",
    "track-subnets": "B7hA9WibSJu2fKdHT2XZs2RYg1rZTtxwg6cMYBKYjvcJjbqsp"
}
  1. Create systemd startup scripts

sudo touch /etc/systemd/system/avalanchego.service

with content.

[Unit]
Description=AvalancheGo node
After=network.target

[Service]
User=root
ExecStart=/usr/local/bin/avalanchego --config-file /root/.avalanchego/config.json
WorkingDirectory=/var/lib/avalanchego
Restart=always
RestartSec=3
LimitNOFILE=65535
LimitNPROC=65535
LimitMEMLOCK=infinity

[Install]
WantedBy=multi-user.target
  1. Load the systemd service

sudo systemctl daemon-reload
  1. Start and enable the AvalancheGo service

sudo systemctl start avalanchego
sudo systemctl enable avalanchego
  1. Tracking the bootstrap process, until the node is fully bootstrapped

sudo journalctl -u avalanchego
  1. Verify node is fully bootstrapped

  • DERA chain

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.isBootstrapped",
    "params": {
        "chain":"2XCTEc8CfNK9MtQWYMfgNt32QjZsZqq92LH7eTV5xY8YjY44du"
    }
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info
  • P-chain

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.isBootstrapped",
    "params": {
        "chain":"P"
    }
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

Ensure that both requests response are

{"jsonrpc":"2.0","result":{"isBootstrapped":true},"id":1}

Then your node is ready to work to secure DERA chain consensus.

Download the subnet EVM from

Ubuntu 22.04
GCC
Go v1.23.6
official repository