In order to disburden private computers from the the CPU-intensive mining process, we have installed a miner at the IISM institute. It is accessible via ssh and ought to be online 24/7.
Install a ssh client of your choice, i.e.:
openssh-client (Linux)
built-in MacOS
Putty (Win)
Establish vpn connection to KIT network and connect via
PW will be distributed upon request.
geth attach ipc:/home/iism/ETH/EthereumPrivate/geth.ipc
Note: Due to electricity costs and limited memory stop mining once nobody is working on the chain ;-) In order to check whether miner is currently running:
eth.mining
geth --datadir /home/USER/privateEthereum/ init /YourPathTo/Genesis.json
geth --datadir /home/USER/privateEthereum/ --networkid 27 console
In order to get going initially you need to add so called bootstrap nodes (in our case it is our only miner):
admin.addPeer("enode://c831dab19841eed1d4fc925e8a5c8103309fec646750c45d4effb43a5c411da6b3f01280d7f1d4a8716989b556bfb3ad792ec0e8aaff74a7737bfd567f7e1d48@[172.22.73.230]:30307")
geth --datadir "/home/USER/privateEthereum" init CustomGenesis.json
geth --port 30303 --rpc --rpcaddr "172.22.73.230" --rpcport 8545 --rpccorsdomain "http://172.22.73.230:8081" --datadir "/home/iism/ETH/EthereumPrivate/" --networkid 27 console
Note: rpcaddr "localhost" does not work for what ever reason ...
{
"nonce": "0x6767676767",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x0",
"gasLimit": "0x800000000",
"difficulty": "0x400",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc": {
"0xd24901517c1a7ce6d6bbcc6bfd93b5547567cefb": {"balance":"1000000000000000000000000000000"}
}
}
web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider("http://172.22.73.230:8545"));
web3.eth.defaultAccount = web3.eth.coinbase;
In order to start and keep a process running via SSH even after disconnecting, one can leverage the screen
command as follows:
ssh [email protected]
screen # starts a new screen session
# start any process, such as mining, nodemon, etc.
Press CTRL
+a
, d
to detach from the screen session and enter exit
to exit the SSH session.
When you want to resume that session, just connect again and enter screen -r
(or additionally -d
in case you still have an open connection elsewhere).
list all processes:
ps x
kill process
kill -15 < pid-ID-number >
show all screens. (ssh terminals with autonomously running processes)
screen -ls
-
Create Folder and pull remote repository via git
-
Create ssh terminal for nodejs server instance and run server.
ssh [email protected]
screen -S myNodeJsServer
node MyServer.js
- detach from the screen session:
CTRL
+a
,d
install nodemon
install mist
install vnc
exchange graphic card
Jonas-Taha El Sesiy (@elsesiy)
Magnus Gödde (@mgsgde)