【区块链】以太坊之001
1、安装
apt-get update
apt-get install software-properties-common
add-apt-repository -y ppa:ethereum/ethereum
add-apt-repository -y ppa:ethereum/ethereum-dev
apt-get update
apt-get install ethereum
2、初始化genesis.json
{ "config": { "chainId": 10, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "alloc" : {}, "coinbase" : "0x0000000000000000000000000000000000000000", "difficulty" : "0x02000000", "extraData" : "", "gasLimit" : "0x2fefd8", "nonce" : "0x0000000000000042", "mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", "timestamp" : "0x00" }
basepath=$(cd `dirname $0`; pwd)
geth --datadir "$basepath/chain" init genesis.json
geth --datadir "$basepath/chain" console
> personal.newAccount('jurassic')
"0x8df4fd909ae2433b98f734ab39c4357928265eda"
geth –targetgaslimit 4294967295 –rpc –rpcaddr “192.168.1.146” –rpcport “8101” –port “30301” –rpcapi “eth,web3,personal” –networkid 2016 –identity 2016 -nodiscover -maxpeers 5 –datadir “%cd%\chain” -unlock 0 -rpccorsdomain “*” –mine console
博客地址: http://www.cnblogs.com/defineconst/
博客版权: 本文以学习、研究和分享为主,欢迎转载和各类爬虫,但必须在文章页面明显位置给出原文链接。 如果文中有不妥或者错误的地方还望高手的您指出,以免误人子弟。如果您有更好的建议,不如留言一起讨论,共同进步! 再次感谢您耐心的读完本篇文章。
博客版权: 本文以学习、研究和分享为主,欢迎转载和各类爬虫,但必须在文章页面明显位置给出原文链接。 如果文中有不妥或者错误的地方还望高手的您指出,以免误人子弟。如果您有更好的建议,不如留言一起讨论,共同进步! 再次感谢您耐心的读完本篇文章。

浙公网安备 33010602011771号