Post
Topic
Board Announcements (Altcoins)
Re: [ANN] SOIL - fair launch, environmentally conscious, community driven
by
altsheets
on 19/10/2015, 03:52:22 UTC
Soil on Linux, v03

A shorter way is in the OP#1 ... this is just another variant ... to do ~the same ... With some explanations; a different way to install 'golang'; a folder, path, and link to make gsoil available as a command; plus a keystore backup; and gsoil as a background-process 'screen'.

Plus some first useful JavaScript console commands <-- they work on  any platform, not only Linux.

preparations
Code:
# dependencies
apt-get update && apt-get install -y git binutils bison gcc make libgmp3-dev build-essential curl screen zip

# go language - first try official packages version:
apt-get -V -s install golang

# but on Debian 8 the golang version is still 1.3.3 < 1.4, so install from tar:
curl -O https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.4.2.linux-amd64.tar.gz

# go/bin/ folder, PATH
mkdir -p ~/go/bin; echo "export GOPATH=$HOME/go" >> ~/.bashrc
echo "export PATH=\$PATH:$HOME/go/bin:/usr/local/go/bin" >> ~/.bashrc
source ~/.bashrc

gsoil
Code:
# clone source code, build gsoil, and link binary
mkdir ~/soil
cd ~/soil
git clone https://github.com/soilcurrency/go-ethereum.git
cd go-ethereum
make gsoil

ln -s ~/soil/go-ethereum/build/bin/gsoil ~/go/bin/

account & backup
Code:
# new SOIL account
gsoil account new

# put this backup into a safe place, then delete
zip -r ~/soil-keystore-20151018.zip  ~/.soil/keystore
rm ~/soil-keystore-20151018.zip

start
Code:
# start server
screen -S soil gsoil

# screen is comfortable to send to / get from background
# Ctrl-A D           detach screen
# screen -ls         list all screens
# screen -r     resume
# screen -r soil     resume the screen with name soil

Everything below here ... works on any system, not only Linux.


JSRE console
Code:
# attach to running gsoil server
gsoil attach

# things to try:
eth.accounts
personal.unlockAccount("8da4fc05ca343e6a41646194e91931d9f413a40c","********", 1)
admin.nodeInfo
net.peerCount
eth.blockNumber
miner.start()
miner.stop()
exit

so much more to come ...
Code:
# more complex JS:

# show single balances on each address
eth.accounts.forEach(function(e){console.log(e,web3.fromWei(eth.getBalance(e),'soil'));});

# total balance on all addresses:
total=0; eth.accounts.forEach(function(e){total+=parseFloat(eth.getBalance(e));}); console.log(web3.fromWei(total,"soil"));

And now?
Any suggestions, criticism, ideas? Please tell me, happy to improve this.

send ...
Code:
# ... a tip to altsheets' donation address, from your eth.coinbase address (your "main address")
eth.sendTransaction({from: eth.coinbase, to: '0x8da4fc05ca343e6a41646194e91931d9f413a40c', value: web3.toWei(100, "soil")})

<-- If you like this, show it:  0x8da4fc05ca343e6a41646194e91931d9f413a40c  Thanks.

  Smiley

EDIT: new tutorial on how to upgrade.