보관함

ethereum geth

  • 환경
    • Ubuntu 20.04
  • 설치
    • 소스를 받아서 빌드하는 방법도 있겠지만 간편하게 시스템을 운영하기 위해 apt를 사용하는 방식으로 설치
sudo apt install ethereum
  • 개발 환경 구성
    • genesis.json 구성 : 특별히 eiplxxblock 부분은 ethereum이 발전되어 가면서 계속 항목이 추가 되는 것 같다. 만약 이 글을 보고 그 후에 돌리려 하는데 제대로 안 도는 경우 새로 생성된 부분이 있는지 확인이 필요
{
  "config": {
        "chainId": 8484,
        "homesteadBlock": 0,
        "eip150Block": 0,
        "eip155Block": 0,
        "eip158Block": 0,
	"byzantiumBlock": 0,
	"constantinopleBlock": 0,
	"petersburgBlock": 0,
	"istanbulBlock": 1000
    },
  "alloc"      : {},
  "coinbase"   : "0x0000000000000000000000000000000000000000",
  "difficulty" : "0x2",
  "extraData"  : "",
  "gasLimit"   : "0x47e7c5",
  "nonce"      : "0x0000000000000042",
  "mixhash"    : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000",
  "timestamp"  : "0x00"
}
  • geth 초기화 (최초 블록 생성 genesis.json 사용)
geth  --datadir  ethereum  init genesis.json
  • geth 실행
geth --networkid 8484 \
        --nodiscover \
        --maxpeers 0 \
        --http --http.corsdomain "*" \
        --http.api web3,miner,eth,debug,personal,net,admin,clique \
        --allow-insecure-unlock \
        --snapshot=false \
        --unlock 0xbaeea1f241f74a95e33db04a70c3c115868c58b9 \
        --password pword \
        --ethstats bootnode1:[email protected]:8080 \
        console 2>> eth.log

 

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

  

  

  

이 사이트는 Akismet을 사용하여 스팸을 줄입니다. 댓글 데이터가 어떻게 처리되는지 알아보세요.