How to connect into Private Ethereum Blockchain (eBloc)
Geth
Preinstallations
Installation Instructions for Mac
git clone https://github.com/ethereum/go-ethereum
brew install go
cd go-ethereum
make geth
Installation Instructions for Linux
Go-installation (go-ethereum requires go version 1.7+.):
tar -zxvf go1.7.1.linux-amd64.tar.gz -C /usr/local/
sudo tar -zxvf go1.7.1.linux-amd64.tar.gz -C /usr/local/
export PATH=$PATH:/usr/local/go/bin
cp /usr/local/go/src/go /usr/bin/go
Geth Installation
sudo apt-get install git
git clone https://github.com/ethereum/go-ethereum
sudo apt-get install -y build-essential libgmp3-dev golang
cd go-ethereum/
git pull
make geth
eBloc Setup on Linux and macOS
After go-ethereum is installed copy geth into/usr/local/bin:
[~] ls go-ethereum/build/bin
geth
[~] sudo cp build/bin/geth /usr/local/bin/
[~] which geth
/usr/local/bin/geth
Now when you just type geth, it should work.
eBloc Setup on Linux and macOS
git clone https://github.com/ebloc/MyEthereumEbloc_geth.git
cd MyEthereumEbloc_geth
ebloc_path="$PWD";
sudo geth --datadir="$ebloc_path" account new
Your new account is locked with a password. Please give a password. Do not forget this password. Please enter a difficult passphrase for your account.
[~] sudo geth --datadir="$ebloc_path" init CustomGenesis.json
WARN [10-06|11:21:38] No etherbase set and no accounts found as default
INFO [10-06|11:21:38] Allocated cache and file handles database=/Users/user/MyEthereumEbloc/geth/chaindata cache=16 handles=16
INFO [10-06|11:21:38] Writing custom genesis block
INFO [10-06|11:21:38] Successfully wrote genesis state database=chaindata hash=a6e0e1...dab438
INFO [10-06|11:21:38] Allocated cache and file handles database=/Users/user/MyEthereumEbloc/geth/lightchaindata cache=16 handles=16
INFO [10-06|11:21:38] Writing custom genesis block
INFO [10-06|11:21:38] Successfully wrote genesis state database=lightchaindata hash=a6e0e1...dab438
[geth]> primary = eth.accounts[0]
"0x42760ddded01a938666a34444e478b710d43cb5a"]
[geth] web3.fromWei(web3.eth.getBalance(primary));
0 //Your balance will increase when you mine.
[geth]> web3.fromWei(web3.eth.getBalance("0xda1e61e853bb8d63b1426295f59cb45a34425b63"));
46221.847517764296887374 //This is the some account active on the Blockchain. If you are connected into eBloc, you should see it.
If you would like to start your miner, just type following inside geth: miner.start() .To stop mining:
miner.stop()
You could also decide how many CPU you would like to invest to mine. For example, following line will add additional 1 CPU.
miner.start(1)
Helpful Script
Please update ebloc_path variable on server.sh and client.sh files with path of MyEthereumEbloc folder.
To run:
Let's make scripts executable:
sudo chmod +x server.sh client.sh
You can now run the bash:
sudo ./server.sh
Now open a new terminal and run: ./client.sh.
net should return minimum 1.
How to connect into Private Ethereum Blockchain (eBloc)
Geth
Preinstallations
Installation Instructions for Mac
Installation Instructions for Linux
Go-installation (go-ethereum requires go version 1.7+.):
Geth Installation
eBloc Setup on Linux and macOS
After go-ethereum is installed copy
geth
into/usr/local/bin
:Now when you just type
geth
, it should work.eBloc Setup on Linux and macOS
Your new account is locked with a password. Please give a password. Do not forget this password. Please enter a difficult passphrase for your account.
peerCount
should be 1, after running following command inside geth.Now open a new terminal and open a client:
To check your account using
geth
:If you would like to start your miner, just type following inside
geth
:miner.start()
.To stop mining:miner.stop()
You could also decide how many CPU you would like to invest to mine. For example, following line will add additional 1 CPU.
miner.start(1)
Helpful Script
Please update
ebloc_path
variable onserver.sh
andclient.sh
files with path ofMyEthereumEbloc
folder.To run: Let's make scripts executable:
sudo chmod +x server.sh client.sh
You can now run the bash:
sudo ./server.sh
Now open a new terminal and run:
./client.sh
.net
should return minimum 1.