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?

Edit on GitHub
  1. Our Blockchain
  2. Blockchain

Nodes

PreviousInstall and Configure your NodeNextSetup a Node

Last updated 1 year ago

Was this helpful?

Download the miner from

once downloaded ensure is connected to the bootnode and you should be able to mine transactions for the blockchain and earn tokens.

Create bootnode --genkey=boot.key

then create the following service.

Create Boot Node as Service

sudo nano /etc/systemd/system/bootnode.service

[Unit]
Description=Ethereum BNode
After=syslog.target network.target
Wants=network.target

[Service]
User=tresservice
Group=tresservice
Type=simple
ExecStart=bootnode -nodekey /usr/local/testnet/bnode/boot.key -verbosity 7 -addr 147.182.143.50:30301

KillMode=process
KillSignal=SIGINT
TimeoutStopSec=90
Restart=always
RestartSec=5s

[Install]
WantedBy=defaul.target

sudo systemctl enable bnode

sudo systemctl start bnode

Create Node 1 as Service

sudo nano /etc/init.d/geth

#!/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/bin/geth --networkid 6066 --datadir /home/blockservice/node1/data --identity "Main Node" --bootnodes enode://333de758402827269778b4a96f675b3d207ddb4b7fdb2a60d505d7d10d5eac564a0aa2b6cded48bbbaf7328092b81eef293c182a04e302b4b0dd01285a324b60@147.182.143.50:0?discport=30301 --port 30304 --miner.threads 1 --miner.etherbase=0x4f00aa38162c6f24c505c9374c7b6b4631186066 --ipcdisable --syncmode full --http --rpc.allow-unprotected-txs --http.vhosts "rpc.tresleches.finance"  --http.corsdomain "*" --http.port 8545 --nodiscover --nat extip:147.182.143.50  --http.api admin,eth,miner,net,txpool,personal,web3 --http.addr 147.182.143.50 --ws --ws.addr 147.182.143.50 --ws.port 8549 --ws.api eth,net,web3  --miner.etherbase 0xe6D74C742698D26511504FBA2261a6097d556066  --ws.origins "rpc.tresleches.finance" --rpc.gascap 80000000  --rpc.txfeecap 2  &
   fi
   echo $"Bnode 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

Enable Geth Service

sudo update-rc.d geth defaults
sudo update-rc.d geth enable

if you notice your syslog increasing take a look at this.

https://github.com/3LechesCake/Blockchain/tree/main/Miner
Ubuntu: large syslog and kern.log filesStack Overflow
Logo