private으로 geth를 돌리다가 ropsten과 연동해서 잘 돌아가는 script는 다음과 같다.



ropstenGenesis.json

{
"config": {
"chainId": 3,
"homesteadBlock": 0,
"eip150Block": 0,
"eip155Block": 10,
"eip158Block": 10,
"eip160Block": 10
},
"difficulty": "0x100000",
"gasLimit": "0x1000000",
"alloc": {
"49.....<주소>...2ea":
{ "balance": "0" }
},
"coinbase" : "0x49...<주소>...2ea",

"extraData" : "0x3535353535353535353535353535353535353535353535353535353535353535",
"nonce" : "0x0000000000000042",
"mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
"timestamp" : "0x00"
}


ropstenInit.sh


./geth removedb
rm -rf /Users/USERNAME/Library/Ethereum/geth/testnet/transactions.rlp
rm -rf /root/.ethash
./geth --identity "myRopsten" --maxpeers 3 --networkid 3 init ./ropstenGenesis.json


ropstenStart.sh

nohup ./geth --testnet --syncmode "fast" --bootnodes "enode://63327...@52.232.243.152:30303,

enode://94c15@192.81.208.223:30303" --rpc --rpcaddr "127.0.0.1" --rpcport "8545"

--rpcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpccorsdomain "*" --networkid 3

--port 30303 --maxpeers 3 --metrics --mine --minerthreads 1 --cache=3072

--miner.etherbase="0x49...2ea"&


ropstenAttach.sh

./geth attach ipc:/Users/USERNAME/Library/Ethereum/testnet/geth.ipc


Posted by yongary
,