[geth]以太坊私链搭建

/ 3评论 / 397阅读 / 4点赞

环境


注:


私链搭建

{
   "config":{
      "chainId":7,
      "homesteadBlock":0,
      "eip150Block":0,
      "eip155Block":0,
      "eip158Block":0,
      "byzantiumBlock":0,
      "constantinopleBlock":0,
      "petersburgBlock":0,
      "istanbulBlock":0,
       "ethhash":{}
   },
   "alloc":{},
   "coinbase":"0x0000000000000000000000000000000000000000",
   "difficulty":"0x2",
   "extraData":"",
   "gasLimit":"0xffffffff",
   "nonce":"0x0000000000000042",
"mixhash":"0x0000000000000000000000000000000000000000000000000000000000000000", "parentHash":"0x0000000000000000000000000000000000000000000000000000000000000000",
   "timestamp":"0x00"
}
geth --datadir ./data --networkid 7  --http --http.addr 0.0.0.0 --http.vhosts "*" --http.api "admin,debug,web3,eth,txpool,personal,ethash,miner,net" --http.corsdomain "*" --snapshot --mine --miner.threads 1 --allow-insecure-unlock  console 2> 1.log
INFO [01-15|10:34:55.186] Maximum peer count                       ETH=50 LES=0 total=50
INFO [01-15|10:34:55.186] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
WARN [01-15|10:34:55.188] Sanitizing cache to Go's GC limits       provided=1024 updated=611
INFO [01-15|10:34:55.188] Set global gas cap                       cap=50,000,000
INFO [01-15|10:34:55.188] Allocated cache and file handles         database=/home/ubuntu/eth/rungeth/data/geth/chaindata cache=16.00MiB handles=16
INFO [01-15|10:34:55.213] Writing custom genesis block 
INFO [01-15|10:34:55.217] Persisted trie from memory database      nodes=1 size=149.00B time="45.27µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [01-15|10:34:55.218] Successfully wrote genesis state         database=chaindata hash=6ef04e..bd9488
INFO [01-15|10:34:55.218] Allocated cache and file handles         database=/home/ubuntu/eth/rungeth/data/geth/lightchaindata cache=16.00MiB handles=16
INFO [01-15|10:34:55.231] Writing custom genesis block 
INFO [01-15|10:34:55.232] Persisted trie from memory database      nodes=1 size=149.00B time="40.785µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [01-15|10:34:55.232] Successfully wrote genesis state         database=lightchaindata hash=6ef04e..bd9488

使用remix远程连接私链并部署合约


操作命令


常见问题

      "byzantiumBlock":0,
      "constantinopleBlock":0,
  1. […] geth版本 – 1.10.15-stable (以太坊私链搭建) […]

  2. […] geth版本 – 1.10.15-stable (以太坊私链搭建) […]

发表回复

您的电子邮箱地址不会被公开。