Skip to content

Instantly share code, notes, and snippets.

@janhajk
Forked from anonymous/Step-by-step.txt
Last active September 29, 2017 12:30
Show Gist options
  • Save janhajk/b13590da28ec8a22a915 to your computer and use it in GitHub Desktop.
Save janhajk/b13590da28ec8a22a915 to your computer and use it in GitHub Desktop.
########################################################
# How To stake archcoins on raspberry pi with raspbian
########################################################
# Install required Packages:
## update apt
> sudo apt-get update
## install packages
> sudo apt-get install -y automake build-essential libcurl4-openssl-dev git zip libssl-dev libdb++-dev libboost-all-dev libqrencode-dev
# Increase Swapfile:
# Raspberry only has 512 MB of Memory, which is not enough to compile arch wallet
# so wee need to enable and increase the raspian default swap file size
# the swap file will be on default path /var/swap
# remember that having a swapfile on a SD card will shorten the live
# of your SD card quickly. But you may disable the swapfile after having compiled
# arch wallet
> sudo nano /etc/dphys-swapfile
# change CONF_SWAPSIZE=100 to CONF_SWAPSIZE=1000
# Save file and close nano
Ctrl-O
Enter
Ctrl-X
# Reload swap settings
> sudo dphys-swapfile setup
> sudo dphys-swapfile swapoff
> sudo dphys-swapfile swapon
# now Download Wallet from official EdgarSoares Github source
> cd
> git clone https://github.com/EdgarSoares/ARCH
# go to src folder of wallet-source
> cd ARCH/src
# compile wallet with
USE_UPNP=- which means no UPnP support, miniupnp not required;
> make -f makefile.unix "USE_UPNP=-"
# wait for roughly 2h to finish compiling… (it took 2h 9minutes on my raspberry)
# Create Wallet config File:
> nano /home/pi/.archcoin/archcoin.conf
# Add to following to the wallet config file:
listen=1
daemon=1
alertnotify=echo %s | mail -s "Archcoin Alert" username@email.com
rpcuser=archcoinrpc
rpcpassword=randompassword
rpcport=1441
addnode=supernode.archcoin.co
addnode=amsterdam.archcoin.co
addnode=singapore.archcoin.co
addnode=london.archcoin.co
addnode=atlanta.archcoin.co
addnode=sanjose.archcoin.co
addnode=78.69.187.207:60828
addnode=65.130.220.216:8998
addnode=76.104.152.181:64828
addnode=184.59.53.113:56917
addnode=135.23.211.248:46558
addnode=104.131.126.211:8998
addnode=85.69.35.7:4793
addnode=50.135.177.14:62787
addnode=108.52.39.102:53085
addnode=178.222.120.159:14059
addnode=70.176.236.106:54709
addnode=81.244.167.134:58040
addnode=46.165.209.140:49321
ddnode=188.193.230.108:8998
addnode=68.231.192.15:8998
addnode=115.134.228.92:8998
addnode=121.73.217.8:62436
addnode=23.233.2.101:49328
addnode=184.250.110.82:8998
addnode=100.1.223.230:8998
addnode=65.46.58.82:50042
addnode=108.61.149.146:8998
addnode=187.34.118.106:57703
addnode=37.251.45.147:8998
addnode=98.252.237.16:51393
addnode=109.123.37.156:3005
addnode=75.159.65.195:49275
addnode=174.95.1.159:57808
addnode=198.27.102.164:53402
addnode=75.81.17.55:8998
addnode=87.222.197.209:8998
addnode=24.108.112.237:8998
addnode=8.24.108.58:8998
addnode=94.253.130.128:49654
addnode=124.150.110.92:8998
addnode=31.48.139.223:8998
addnode=66.229.2.9:50952
addnode=96.254.118.19:54943
addnode=196.206.207.220:63703
addnode=209.124.227.24:57496
# check for new nodes at:
https://archsupport.freshdesk.com/support/articles/5000497258-how-to-download-archcoin-conf-file-how-to-update-nodes-
# start wallet:
> /home/pi/ARCH/src/archcoind
# Wait for a couple seconds…
# Check if wallet is p and running with
> /home/pi/ARCH/src/archcoind getinfo
# Should return something like:
{
"version" : "v1.2.0.0-g",
"protocolversion" : 70001,
"walletversion" : 60000,
"balance" : 0.00000000,
"newmint" : 0.00000000,
"stake" : 0.00000000,
"blocks" : 0,
"timeoffset" : 0,
"moneysupply" : 0.00000000,
"connections" : 0,
"proxy" : "",
"ip" : "0.0.0.0",
"difficulty" : {
"proof-of-work" : 0.00024414,
"proof-of-stake" : 0.00024414
},
"testnet" : false,
"keypoololdest" : 1420466965,
"keypoolsize" : 101,
"paytxfee" : 0.00010000,
"mininput" : 0.00000000,
"errors" : ""
}
# Now wait for connections…
# This can take some time…
# Recheck with ./archcoind getinfo
# BONUS:
# Script to autorestart, in case wallet crashes:
> nano /home/pi/checkarchwallet.sh
# Insert following:
#!/bin/bash
check_process() {
echo "$ts: checking $1"
[ "$1" = "" ] && return 0
[ `pgrep -n $1` ] && return 1 || return 0
}
# timestamp
ts=`date +%T`
echo "$ts: begin checking..."
check_process "archcoind"
[ $? -eq 0 ] && echo "$ts: not running, restarting..." && `/home/ubuntu/ARCH/src/archcoind > /dev/null`
#Make shell script executable:
> chmod 740 checkarchwallet.sh
# Add script to crontab
> crontab –e
# Add following line to crontab:
30 * * * * /home/pi/checkarchwallet.sh
# This will check every 30 minutes, if wallet is still running. If wallet is not running, it will start the wallet
# You can test run the script:
> /home/pi/checkarchwallet.sh
# If running, it should return something like:
15:54:47: begin checking...
15:54:47: checking archcoind
# You could now turn swap off again
# Reload swap settings
> sudo dphys-swapfile setup
> sudo dphys-swapfile swapoff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment