Getting started with Ethereum
agenda:
- Some interesting reading to start with
- Installation (docker based)
- Your first contract (based on ethereum tutorials)
- Refactor it with truffle
- Implement the two last tutorials of ethereum
The white page Ethereum Homestead Documentation Go Etherum Wiki Solidity Documentation
brew update
brew upgrade
brew tap ethereum/ethereum
brew install ethereum
This is an extract from the documentation
As an alternative look to Browser Solidity
Everything here
Get images with geth client in Golang:
docker pull ethereum/client-go:alpine
Start node in dev mode using geth client with RPC: //TOOD add rpc explanation
docker run -d --name eth-dev-node -p 8545:8545 -p 30303:30303 ethereum/client-go:alpine --dev --rpc
docker exec -it eth-dev-node ./geth attach ipc:/tmp/ethereum_dev_mode/geth.ipc
In the geth console execute:
eth.accounts
should display [] meaning no accountspersonal.newAccount('A_PASSWORD')
where you choose the value for A_PASSWORD. This should output the address of this account.eth.accounts
orpersonal.listAccounts
eth.getBalance(SOME_ADDRESS)
where SOME_ADDRESS is one of an account. Should display 0 for the moment since you have to mine to get some ehter.
Set mining beneficiary account:
miner.setEtherbase(SOME_ADDRESS)
where SOME_ADDRESS is the one of your account.eth.coinbase
will display the address of the account which will be credited while mining.
Start mining:
miner.start()
to start mining. Since in dev-mode you run a private network you will mine easily and so getting faster ether. Note thatminer.start()
have an optional parameter to indicate number of threads used for mining.
Wait for a minute then miner.stop()
.
You can now check the balance.
Solidity web
npm install -g truffle
Follow the steps from here
--datadir "./.ethereum-private" --genesis CustomGenesis.json --nodiscover --maxpeers 0
- qwei?
- no gas is paid to execute a contract
https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options https://github.com/ethereum/go-ethereum/wiki/geth https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console
https://ethereum.gitbooks.io/frontier-guide/content/getting_a_client.html https://souptacular.gitbooks.io/ethereum-tutorials-and-tips-by-hudson/content/private-chain.html
https://github.com/ConsenSys/truffle
https://ipfs.io/ https://golem.network/
http://blogchaincafe.com/les-consensus-proof-of-work-vs-proof-of-stake