Installation of the Ethereum (Ethereum) development environment in a MAC environment

Source: Internet
Author: User
Tags pack
First visit GitHub on the Go Language development client URL: Https://github.com/ethereum/go-ethereum

Installing Ethereum Https://github.com/ethereum/go-ethereum/wiki/Building-Ethereum

Install on Mac
Brew Tap Ethereum/ethereum
Brew Install Ethereum

Dogiant@bogon: /usr/local$brew Tap Ethereum/ethereum
Updating Homebrew ...
==> Tapping Ethereum/ethereum
Cloning into '/usr/local/homebrew/library/taps/ethereum/homebrew-ethereum ' ...
Remote:counting Objects:6, done.
Remote:compressing objects:100% (6/6), done.
Remote:total 6 (Delta 1), reused 1 (Delta 0), pack-reused 0
Unpacking objects:100% (6/6), done.
Checking connectivity ... done.
Tapped 3 Formulae (files, 33.9K)
Dogiant@bogon: /usr/local$brew Install Ethereum
==> installing Ethereum from Ethereum/ethereum
==> Installing dependencies for Ethereum/ethereum/ethereum: Go
==> Installing Ethereum/ethereum/ethereum dependency: Go
==> downloadinghttps://homebrew.bintray.com/bottles/go-1.7.4_1.el_capitan.bottle.tar.gz
######################################################################## 100%
==> Pouring go-1.7.4_1.el_capitan.bottle.tar.gz
==> Caveats
As of Go 1.2, a valid Gopath is required to use the ' Go get ' command:
Https://golang.org/doc/code.html#GOPATH

wish to add the Goroot-based install location to your PATH:
Export path= $PATH:/usr/local/opt/go/libexec/bin
==> Summary
/usr/local/cellar/go/1.7.4_1:6,438 files, 250.7M
==> Installing Ethereum/ethereum/ethereum
==> Cloninghttps://github.com/ethereum/go-ethereum.git
Cloning into '/users/dogiant/library/caches/homebrew/ethereum--git ' ...
Remote:counting objects:2737, done.
Remote:compressing objects:100% (2066/2066), done.
Remote:total 2737 (delta 963), reused 1654 (Delta 553), pack-reused 0
Receiving objects:100% (2737/2737), 14.91 MiB | 112.00 kib/s, done.
Resolving deltas:100% (963/963), done.
Checking connectivity ... done.
Note:checking out ' ff07d54843ea7ed9997c420d216b4c007f9c80c3 '.

You're in the ' detached HEAD ' state. You can look around, make experimental
Changes and commit them, and you can discard any commits do in this
State without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits your create, may
Do and later by Using-b with the checkout command again. Example:

Git checkout-b <new-branch-name>

Checking out files:100% (2487/2487), done.
==> Checking out Tag v1.5.5
==> Go env
==> make all
==> Caveats
To has launchd start ethereum/ethereum/ethereum now and restart at login:
Brew Services Start Ethereum/ethereum/ethereum
==> Summary
/usr/local/cellar/ethereum/1.5.5:9 files, 47.7M, built in 5 minutes seconds


After the installation is complete
Geth-h
Lists the current User Geth account list shows empty
Dogiant@bogon: ~/ethereum/workspace$geth--datadir "~/ethdev"--dev
I1228 15:16:46.907316 cmd/utils/flags.go:615] Warning:no etherbase set and No accounts found as default
I1228 15:16:46.907493 ethdb/database.go:83] allotted 128MB cache and 1024x768 file handles To/users/dogiant/ethdev/geth/chai Ndata
I1228 15:16:46.911765 ethdb/database.go:176] closed Db:/users/dogiant/ethdev/geth/chaindata
I1228 15:16:46.912892 node/node.go:176] instance:geth/v1.5.5-stable-ff07d548/darwin/go1.7.4
I1228 15:16:46.912925 ethdb/database.go:83] allotted 128MB cache and 1024x768 file handles To/users/dogiant/ethdev/geth/chai Ndata
I1228 15:16:46.935109 eth/backend.go:280] successfully wrote custom Genesis Block: E5be92145a301820111f91866566e3e99ee344d155569e4556a39bc71238f3bc
I1228 15:16:46.935127 eth/backend.go:299] Ethash used in test mode
I1228 15:16:46.935536 eth/db_upgrade.go:346] Upgrading db log Bloom bins
I1228 15:16:46.935580 eth/db_upgrade.go:354] upgrade completed in 48.143µs
I1228 15:16:46.935601 eth/backend.go:191] Protocol Versions: [over], Network id:1
I1228 15:16:46.935744 eth/backend.go:219] Chain config: {chainid:1 homestead:1150000 dao:1920000 daosupport:true EIP15 0:2463000 eip155:2675000 eip158:2675000}
I1228 15:16:46.935983 core/blockchain.go:219] Last header: #0 [e5be9214 ...] td=131072
I1228 15:16:46.935998 core/blockchain.go:220] last block: #0 [e5be9214 ...] td=131072
I1228 15:16:46.936007 core/blockchain.go:221] Fast block: #0 [e5be9214 ...] td=131072
I1228 15:16:46.936626 p2p/server.go:342] Starting server
I1228 15:16:49.127910 p2p/discover/udp.go:227] Listening, enode:// 05399f51a43805c17f82e5016d5969d14b3092018cae87eec77ed52291d66c50c7d7bf024d953b0afcccd44c717f17aaf251b897d770054205ea268b4 9a3050b@10.0.37.126:58049
I1228 15:16:49.128111 whisper/whisperv2/whisper.go:176] Whisper started
I1228 15:16:49.128115 p2p/server.go:610] Listening on [::]:55739
I1228 15:16:49.129641 node/node.go:341] IPC endpoint opened:/USERS/DOGIANT/ETHDEV/GETH.IPC



DOGIANT@DUBIAOQIDEMBP: ~$geth--dev Console 2>> file_to_log_output
Welcome to the Geth JavaScript console!

instance:geth/v1.5.5-stable-ff07d548/darwin/go1.7.4
modules:admin:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 shh:1.0 txpool:1.0 web3:1.0

> eth.accounts
[]
> Personal.newaccount (' 123456 ')
"0x556d64ecb09b5df590a2ab842b53a8041e3961b4"
> eth.accounts
["0X556D64ECB09B5DF590A2AB842B53A8041E3961B4"]
> eth.accounts
["0X556D64ECB09B5DF590A2AB842B53A8041E3961B4"]
> Personal.newaccount (' 123456 ')
"0XB0945A303834FF763695E21ED8ACBE80AEFEE9BB"
> eth.accounts
["0x556d64ecb09b5df590a2ab842b53a8041e3961b4", "0XB0945A303834FF763695E21ED8ACBE80AEFEE9BB"]
>


DOGIANT@DUBIAOQIDEMBP: ~$geth--dev Account List
Account #0: {556d64ecb09b5df590a2ab842b53a8041e3961b4}/var/folders/jy/q2f6pdjn6p11ytfx0xk8yp7m0000gn/t/ethereum_ Dev_mode/keystore/utc--2016-12-28t07-20-52.337017793z--556d64ecb09b5df590a2ab842b53a8041e3961b4
Account #1: {B0945A303834FF763695E21ED8ACBE80AEFEE9BB}/var/folders/jy/q2f6pdjn6p11ytfx0xk8yp7m0000gn/t/ethereum_ Dev_mode/keystore/utc--2016-12-28t07-25-51.683157537z-b0945a303834ff763695e21ed8acbe80aefee9bb


> user1 = eth.accounts[0]
"0x556d64ecb09b5df590a2ab842b53a8041e3961b4"
> user2 = eth.accounts[1]
"0XB0945A303834FF763695E21ED8ACBE80AEFEE9BB"
> User1
"0x556d64ecb09b5df590a2ab842b53a8041e3961b4"
> User2
"0XB0945A303834FF763695E21ED8ACBE80AEFEE9BB"
> eth.getbalance (User1)
0
> eth.getbalance (user2)
0
> Eth.blocknumber
0
> Miner.start ()
true
> eth.getbalance (User1)
390000000000000000000
> eth.getbalance (user2)
0
> Miner.stop ()
true
> Eth.blocknumber
99
> eth.getbalance (User1)
495000000000000000000
> eth.getbalance (user2)
0
> eth.sendtransaction ({from:user1,to:user2,value:web3.towei (3, "Ether")})
Error:account is locked
At web3.js:3119:20
At web3.js:6023:15
At web3.js:4995:36
At <anonymous>:1:1

> Personal.unlockaccount ("0x556d64ecb09b5df590a2ab842b53a8041e3961b4", "123456")

true
> eth.sendtransaction ({from:user1,to:user2,value:web3.towei (3, "Ether")})
"0X39D604A1DF899F6C80CE33279ABE88AEC28B6D97F83E2DDA5F062DD3C099FCF3"
> eth.getbalance (user2)
0
> Miner.start ()
true
> Miner.stop ()
true
> eth.getbalance (user2)
3000000000000000000
>

Issue 1: Start with Get account list always do not see the new user, and later consider that the development of the console created by the user to be consistent with the development of the-dev to see the normal display account to see the log ether transfer, after transfer needs mining confirmation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.