Tres Chain
  • What is Tres Chain?
  • Our Logos
  • Intro
    • Project Overview
      • Vision
      • Scholarship
      • Voting
      • Community
      • Social Media
  • Coin Information
    • Tres Coin and Tres Token
      • Tokens
        • Archived
          • Tres Leches Cake(archived)
          • Tres Leches(archived)
          • Tres Leches Cupcake(archived)
          • Staking(archived)
    • Coin Distribution
  • Our SmartSwap
    • Swap
      • Addresses
      • How to add liquidity
      • How to swap
  • Our Wallet
    • Wallet
      • Android
      • IOS
      • Dapp Catalog
      • Extension
        • Privacy Policy
        • Terms of Use of Blockwallet/CakeWallet
        • How to use the Phishing Protection feature
        • What Is a Dropped Transaction?
        • How do Hardware Wallets Work?
        • How to get the Ledger Hardware Wallet
        • How to get the Trezor Hardware Wallet?
        • What is an HD Path?
        • What is Lock Timeout?
        • How to Add a Custom Network RPC
        • Tips to Stay Safe When Connecting to DApps
        • How to Use BlockWallet Bridges
  • Our Blockchain
    • Blockchain
      • Node List
      • Install Node 2023
      • Install and Configure your Node
      • Nodes
        • Setup a Node
        • Add Node to Tres Leches Chain
        • Secure the Node
      • Blockscout Explorer Install
      • Smart Contract Verification
      • Testnet Configuration
      • Validator Rewards
  • Our NFTs
    • NFT
      • Owner's(archived)
      • Desert Rolodex Collection(archived)
  • Who we are
    • Team
  • Audits
    • Token Audit
    • Wrapped Token
Powered by GitBook
On this page

Was this helpful?

  1. Our Blockchain
  2. Blockchain

Install Node 2023

PreviousNode ListNextInstall and Configure your Node

Last updated 1 year ago

Was this helpful?

Node basic steps

// Some code
cd /usr/local

sudo su
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz
tar -zxvf go1.19.linux-amd64.tar.gz
cp go /usr/local/go -R #Only if not in the path
apt-get update
apt-get install git make gcc
apt install –reinstall build-essential
IF ERROR
step 1) pico /etc/apt/sources.list
step 2) apt-get update

git clone https://github.com/treschain/TRESCLI
cd TRESCLI
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
source ~/.bashrc
go version
make geth
cd /usr/local/TRESCLI/build/bin cp -r geth /usr/local/bin/
cd /usr/local
mkdir node

git clone https://github.com/treschain/Blockchain
cd Blockchain/Configuration/Genesis/Mainet
cp -r treslechesmainnet.json /usr/local/node

cd /usr/local/node

geth init treslechesmainnet.json
geth --networkid 6066 --datadir data --identity "External Miner" --bootnodes enode://333de758402827269778b4a96f675b3d207ddb4b7fdb2a60d505d7d10d5eac564a0aa2b6cded48bbbaf7328092b81eef293c182a04e302b4b0dd01285a324b60@147.182.143.50:0?discport=30301  --port 30306 --miner.threads 1 --miner.etherbase=0x000000000000000000000000000000000000dEaD --syncmode full --http --http.vhosts "*" --http.corsdomain "*" --http.port 8548 --cache 8192  --ws.port 8549 --http.api debug,net,eth,web3,txpool --ws.api "eth,net,web3,network,debug,txpool" --gcmode "archive" --authrpc.port 8550  console

type node.AdminInfo copy enode and send to node group
CTRL + D and exit the console.

sudo nano  /etc/init.d/geth
copy the following into the geth.

You need to edit the ipaddress from here to match your node.

/usr/local/bin/geth --networkid 6066 --datadir /usr/local/node/data --identity "Main Node" --bootnodes "enode://333de758402827269778b4a96f675b3d207ddb4b7fdb2a60d505d7d10d5eac564a0aa2b6cded48bbbaf7328092b81eef293c182a04e302b4b0dd01285a324b60@147.182.143.50:0?discport=30301" --port 30303 --miner.threads 1 --miner.etherbase=0x000000000000000000000000000000000000dEaD --ipcdisable --syncmode full --http --http.vhosts "*" --http.corsdomain "*" --http.port 8545 --nodiscover --nat extip: --http.api admin,eth,net,miner,engine,txpool,web3,debug --http.addr 127.0.0.1 --ws --ws.addr  --ws.port 8549 --ws.api eth,net,web3,network,debug,txpool  --ws.origins "*" --authrpc.port 8551 --authrpc.addr  --rpc.gascap 80000000 --rpc.txfeecap 2 --graphql --graphql.corsdomain "*" --graphql.vhosts "*" --gpo.blocks 10 --cache 8192 --verbosity "0" --gcmode "archive" &
#!/bin/bash
#
### BEGIN INIT INFO
# Provides:          geth
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Should-Start:      $network $named $time
# Should-Stop:       $network $named $time
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start and stop the geth daemon
# Description:       Controls the geth server daemon
### END INIT INFO
#
. /lib/lsb/init-functions
start() {
   PCOUNT=`pgrep -c geth`
   if ((PCOUNT==1)); then
      /usr/local/bin/geth --networkid 6066 --datadir /usr/local/node/data --identity "Main Node" --bootnodes "enode://333de758402827269778b4a96f675b3d207ddb4b7fdb2a60d505d7d10d5eac564a0aa2b6cded48bbbaf7328092b81eef293c182a04e302b4b0dd01285a324b60@147.182.143.50:0?discport=30301" --port 30303 --miner.threads 1 --miner.etherbase=0x000000000000000000000000000000000000dEaD --ipcdisable --syncmode full --http --http.vhosts "*" --http.corsdomain "*" --http.port 8545 --nodiscover --nat extip:147.182.143.50 --http.api admin,eth,net,miner,engine,txpool,web3,debug --http.addr 127.0.0.1 --ws --ws.addr 147.182.143.50 --ws.port 8549 --ws.api eth,net,web3,network,debug,txpool  --ws.origins "*" --authrpc.port 8551 --authrpc.addr 147.182.143.50 --rpc.gascap 80000000 --rpc.txfeecap 2 --graphql --graphql.corsdomain "*" --graphql.vhosts "*" --gpo.blocks 10 --cache 8192 --verbosity "0" --gcmode "archive" &
   fi
   echo $"Geth Started"
}
stop() {
   PCOUNT=`pgrep -c geth`
   if ((PCOUNT>1)); then
      /usr/bin/killall -9 geth &
   fi
   echo "Geth Stopped"
}
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  status)
        status geth
        ;;
  restart|reload|condrestart)
        stop
        start
        ;;
  *)
  echo $"Usage: $0 {start|stop|restart|reload|status}"
  exit 1
esac
exit 0
 

Set Permissions

sudo chmod 755 /etc/init.d/geth
sudo chown root:root /etc/init.d/geth

sudo update-rc.d geth defaults

sudo systemctl enable geth

sudo systemctl start geth

sudo systemctl daemon-reload
sudo systemctl status geth
sudo journalctl -u geth -f
# if netstat is not installed
sudo apt install net-tools
sudo netstat -tulpn
geth attach http://127.0.0.1:8545

follow the steps to secure your node.

55MB
NodeInstallDemo.mp4