Geth 설치
$ git clone https://github.com/ethereum/go-ethereum.git
$ cd go-ethereum
$ make all
Ethereum Network Stats 설치
$ git clone https://github.com/cubedro/eth-netstats
$ cd eth-netstats
$ npm install
$ grunt (sudo npm install -g grunt-cli)
패스 지정
$vi ~/.bash_profile
export GETHPATH="$HOME/go-ethereum/build"
PATH=$PATH:$GETHPATH/bin
$source ~/.bash_profile
workspace 지정
$ mkdir heenet
$ cd heenet
$ mkdir sealer1 sealer2 sealer3
계정생서
$ geth --datadir sealer1 account new
$ geth --datadir sealer2 account new
$ geth --datadir sealer3 account new
$ echo '1234' > password.txt
Address: {530e2c6792988d61f88b578f0db4248207509209}
Address: {9291544e72e4952ba5a9fdd87244203eee425c92}
Address: {83654e6f306aed6d57cbba7d864ee35040712eb4}
genesis.json 생성
$ puppeth
Please specify a network name to administer (no spaces, hyphens or capital letters please)
> heenet
What would you like to do? (default = stats)
1. Show network stats
2. Configure new genesis
3. Track new remote server
4. Deploy network components
> 2
What would you like to do? (default = create)
1. Create new genesis from scratch
2. Import already existing genesis
> 1
Which consensus engine to use? (default = clique)
1. Ethash - proof-of-work
2. Clique - proof-of-authority
> 2
How many seconds should blocks take? (default = 15)
> 5
Which accounts are allowed to seal? (mandatory at least one)
> 0x
Which accounts should be pre-funded? (advisable at least one)
> 0x
Should the precompile-addresses (0x1 .. 0xff) be pre-funded with 1 wei? (advisable yes)
> y
Specify your chain/network ID if you want an explicit one (default = random)
> 1234
What would you like to do? (default = stats)
1. Show network stats
2. Manage existing genesis
3. Track new remote server
4. Deploy network components
> 2
1. Modify existing fork rules
2. Export genesis configurations
3. Remove genesis configuration
> 2
Which folder to save the genesis specs into? (default = current)
Will create heenet.json, heenet-aleth.json, heenet-harmony.json, heenet-parity.json
>
ctrl+c로 종료
genesis 파일 변경
$mv heenet.json genesis.json
bootnode 생성
$ bootnode -genkey boot.key
$ more boot.key
$ bootnode -nodekey boot.key -verbosity 9
$ bootnode -nodekey boot.key -verbosity 9 -addr :30310 -writeaddress
enode://6f425c891c5805a8bc0af6735c58ab4f4bac6e0cd8e58a27ebea06fd7d742ffad9b6077012cbbcbe49704bf33c9127bf0be5c38de726cf74d5f53d1afbb2b362@[::]:30310
$ geth --datadir sealer1/ init genesis.json
$ nohup geth --datadir sealer1/ --ethstats sealer1:soon@192.168.0.98:3000 --syncmode 'full' --port 30302 --rpc --rpcaddr 'localhost' --rpcport 8500 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --bootnodes 'enode://6f425c891c5805a8bc0af6735c58ab4f4bac6e0cd8e58a27ebea06fd7d742ffad9b6077012cbbcbe49704bf33c9127bf0be5c38de726cf74d5f53d1afbb2b362@192.168.0.98:30310' --networkid 1234 --gasprice '1' -unlock '0x530e2c6792988d61f88b578f0db4248207509209' --password password.txt --mine &
$ ps -ef | grep geth
$ geth --datadir sealer2/ init genesis.json
$ nohup geth --datadir sealer2/ --ethstats sealer2:soon@192.168.0.98:3000 --syncmode 'full' --port 30303 --rpc --rpcaddr 'localhost' --rpcport 8501 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --bootnodes 'enode://6f425c891c5805a8bc0af6735c58ab4f4bac6e0cd8e58a27ebea06fd7d742ffad9b6077012cbbcbe49704bf33c9127bf0be5c38de726cf74d5f53d1afbb2b362@192.168.0.98:30310' --networkid 1234 --gasprice '1' -unlock '0x9291544e72e4952ba5a9fdd87244203eee425c92' --password password.txt --mine &
$ ps -ef | grep geth
$ geth --datadir sealer3/ init genesis.json
$ nohup geth --datadir sealer3/ --ethstats sealer3:soon@192.168.0.98:3000 --syncmode 'full' --port 30304 --rpc --rpcaddr 'localhost' --rpcport 8502 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --bootnodes 'enode://6f425c891c5805a8bc0af6735c58ab4f4bac6e0cd8e58a27ebea06fd7d742ffad9b6077012cbbcbe49704bf33c9127bf0be5c38de726cf74d5f53d1afbb2b362@192.168.0.98:30310' --networkid 1234 --gasprice '1' -unlock '0x83654e6f306aed6d57cbba7d864ee35040712eb4' --password password.txt --mine &
$ ps -ef | grep geth
eth-stats 설정
$cd eth-stats
$ vi app.js
var WS_SECRET='soon';
$ nohup npm start &
$ geth --datadir sealer1/ attach
http://192.168.0.98:3000/ 확인
'블록체인' 카테고리의 다른 글
이더리움 pending transaction(펜딩 트랜잭션) 확인 하기 (0) | 2019.11.27 |
---|---|
블록체인 모니터링툴 eth-netstats 설치 (0) | 2019.06.25 |
geth를 백그라운드에서 돌리면서 채굴을 하고 싶다면... (0) | 2019.05.16 |
CentOS7에 카프카와 주키퍼 설치하기 2탄 (0) | 2019.05.02 |
CentOS7에 카프카와 주키퍼 설치하기 1탄 (0) | 2019.05.02 |