Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 1.34 KB

File metadata and controls

57 lines (33 loc) · 1.34 KB

Configure & run geth

If we're in Mist, we can see that there is a geth node running on the background.

We can start our own geth node.

geth is just ethereum implemented in go.

You can download different other implementations.

The most famous is geth.

Offers JSON rpc interface, which is used by Web3 and other programs to interact with the blockchain.

We can transfer ether from account to account, sending an ether from one account to another.

We can see that the confirmation will come through when there are 12 confirmations.

How to do the same in CLI

When we close mist and go to directory with chaindata and create a bash session.

We can use

geth --datadir=./

And in another console we can attach with

geth attach

We can start running commands now

eth.accounts

You can find all the commands in the github RPC API documentation / wiki.

One of these methods is the eth.sendTransaction.

When we send ether from one account to the other, we use this transaction.

personal.unlockAccount(eth.accounts[1]);
eth.sendTransaction({from: eth.accounts[1], to: eth.accounts[2]}, value: web3.toWai(0.5, "ether"));

We have autocomplete as well.

When we unlock an account is when we are able to send transactions, and seleect the from, to, value, etc.

It gives a transaction id, which can be displayed online.