using geth as primary wallet
My background as a security engineer makes me overly cautious at times, skeptical of claims, and frankly - when it comes to what software I use and what I’ll transmit over the network - somewhat paranoid. My wife wonders why the tin foil is always gone…
Don’t get me wrong, I love to experiment with new tech, and recently fooled around with Parity. Mist seems so clunky, and was constantly borking my *nix box just trying to keep the local chain current. So the idea of a lite client that could be used for simple Tx/Rx was appealing. Long story, short I ended up not using Parity.
Even though the app seemed well built, is backed by people who appear to know what they’re doing, and was positively reviewed online, I’m skeptical of code that I don’t know much about and didn’t take the time to review the source. The same reason is what keeps me from using Exodus, although the same justifications for using it also apply. In the end, there just seems to be more going on under the hood that I have not vetted to the degree that I can feel comfortable using either of these apps (amongst others). Unfortunately Parity just got popped, and $30M was stolen.
Ultimately, I feel that all of this technology (Bitcoin, Ethereum, and cryptospace in general) is utterly amazing, revolutionary, and…still quite immature. Furthermore, the financial consequences of exploiting vulns in this technology are higher than in nearly any other system. So let’s just say I’m not super eager to be an early adopter of some of these shiny new apps. In production anyway.
In my estimation, the safest choice for my active Ether wallet is in one of the first, core Ethereum applications: geth
. I will say it’s more fun to use too.
So I wanted to put together some examples of the common functions that one would typically need from a wallet:
sync the blockchain
The first time you run geth you’ll want to do a fast sync of the blockchain. This could take many hours or days to complete, so just let it run before moving on. It also helps to have a fat pipe (ie. a big internet connection) and an SSD.
Fire up a terminal, navigate to your geth binary directory if it isn’t in your PATH and do:
./geth --fast --cache=2048
If you have plenty of RAM, you can use 2GB for caching (or more if you want).
^ Note: you can only use the --fast
parameter the first time you download the blockchain. On subsequent runs, you’ll just do:
./geth console
or
./geth
and in a new terminal pane ./geth attach
This will drop you to a geth console.
create an address
You’ll want an address to send ETH to and from. So in your geth console do:
personal.newAccount()
This will prompt you for a password.
I’m going to assume you already know the importance of protecting your passwords and private keys, so I’m not going to get into that here. If you don’t know, hit me up and I’ll point you in the right direction. This is critically important!
list addresses
personal.listAccounts
or
eth.accounts
check address balance
web3.fromWei(eth.getBalance(eth.accounts[0]), "ether")
Note: in all of these examples be sure to change [0] appropriately to the proper address index. You can use eth.coinbase
rather than eth.accounts[0]
…same thing. But if you have multiple addresses, you can call them individually by their index position such as eth.accounts[1]
, eth.accounts[2]
, etc.
send coins to 0xd316e4f46dab402f8e591f1ce69a4d6c2ed6ff23
Full transparency: if you copy and paste these commands directly, you will be sending me 10 ETH - assuming you have 10 ETH in your eth.coinbase…
personal.unlockAccount(eth.accounts[0])
this should return TRUE
eth.sendTransaction({from:eth.accounts[0],to:"0xd316e4f46dab402f8e591f1ce69a4d6c2ed6ff23",value:web3.toWei(10,"ether"),gas:500000})
this should return the transaction hash (0xtxHash).
view transaction on chain with Tx hash of 0xtxHash
web3.eth.getTransaction('0xtxHash')
Returns NULL if the transaction is not found. Else returns JSON object with details of the transaction.