current position:Home>Ethereum private chain transfer mining is still unsuccessful, please give advice; After the private chain is started, the IP address is not 127.0.0.1. I'm not sure if this is the reason. If so, how to solve it?

Ethereum private chain transfer mining is still unsuccessful, please give advice; After the private chain is started, the IP address is not 127.0.0.1. I'm not sure if this is the reason. If so, how to solve it?

2022-02-03 23:32:42 Q & A of Denglian community

Specific operation steps One 、 Configure Genesis block

{    "config":{"chainId":15},    "difficulty":"2000",    "gasLimit":"2100000",    "alloc":{        "AD9E4555F515132aa94626555A14cdff1e86F0df":{"balance":"300000"}    }}

Two 、 Start the private chain

geth --datadir . --networkid 15  console 2>output.log

The startup information is as follows :

WARN [12-16|18:54:11.754] Sanitizing cache to Go's GC limits     provided=1024 updated=656INFO [12-16|18:54:11.756] Maximum peer count                       ETH=50 LES=0 total=50INFO [12-16|18:54:11.756] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"INFO [12-16|18:54:11.792] Set global gas cap                       cap=25000000INFO [12-16|18:54:11.792] Allocated trie memory caches      clean=163.00MiB dirty=164.00MiBINFO [12-16|18:54:11.792] Allocated cache and file handles         database=/home/yjh/ETHProject/chain_test/geth/chaindata cache=328.00MiB handles=524288INFO [12-16|18:54:11.972] Opened ancient database                  database=/home/yjh/ETHProject/chain_test/geth/chaindata/ancientINFO [12-16|18:54:12.023] Initialised chain configuration          config="{ChainID: 15 Homestead: <nil> DAO: <nil> DAOSupport: false EIP150: <nil> EIP155: <nil> EIP158: <nil> Byzantium: <nil> Constantinople: <nil> Petersburg: <nil> Istanbul: <nil>, Muir Glacier: <nil>, YOLO v2: <nil>, Engine: unknown}"INFO [12-16|18:54:12.023] Disk storage enabled for ethash caches   dir=/home/yjh/ETHProject/chain_test/geth/ethash count=3INFO [12-16|18:54:12.023] Disk storage enabled for ethash DAGs     dir=/home/yjh/.ethash count=2INFO [12-16|18:54:12.023] Initialising Ethereum protocol           versions="[65 64 63]" network=15 dbversion=8INFO [12-16|18:54:12.057] Loaded most recent local header          number=354 hash="702ea3…43085e" td=50067798 age=3h22m47sINFO [12-16|18:54:12.057] Loaded most recent local full block      number=354 hash="702ea3…43085e" td=50067798 age=3h22m47sINFO [12-16|18:54:12.057] Loaded most recent local fast block      number=354 hash="702ea3…43085e" td=50067798 age=3h22m47sINFO [12-16|18:54:12.059] Setting new local account                address=0x55Db8f37a9c6C226cf2eaf88874E68267aDa9fbEINFO [12-16|18:54:12.059] Setting new local account                address=0x960e9241A17C7e095E8480870D4d381e8a550163INFO [12-16|18:54:12.059] Loaded local transaction journal         transactions=4 dropped=0INFO [12-16|18:54:12.060] Regenerated local transaction journal    transactions=4 accounts=2WARN [12-16|18:54:12.060] Switch sync mode from fast sync to full sync INFO [12-16|18:54:12.060] Starting peer-to-peer node               instance=Geth/v1.9.25-stable-e7872729/linux-amd64/go1.15.6INFO [12-16|18:54:12.204]** New local node record                    seq=20 id=9f7835f47763f20f ip=127.0.0.1 udp=30303 tcp=30303**INFO [12-16|18:54:12.206] IPC endpoint opened                      url=/home/yjh/ETHProject/chain_test/geth.ipcINFO [12-16|18:54:12.216] Started P2P networking                   self=enode://05fb77fd38daac2cfc79da9e71c337ddffd2e566dfb8e14aa5828d0dadc4e860a[email protected]127.0.0.1:30303INFO [12-16|18:54:12.304] Etherbase automatically configured       address=0x960e9241A17C7e095E8480870D4d381e8a550163INFO [12-16|18:54:20.996] New local node record                    seq=21 id=9f7835f47763f20f ip=111.200.193.19 udp=56985 tcp=30303INFO [12-16|18:54:32.216] Looking for peers                        peercount=1 tried=72 static=0

Node information is

> admin.nodeInfo{  enode: "enode://05fb77fd38daac2cfc79da9e71c337ddffd2e566dfb8e14aa5828d0dadc4e860a[email protected]111.200.193.19:30303?discport=56985",  enr: "enr:-J-4QP4DjNwW5496EtMnlXIsTG6p6RYw_n4wzdbHuB50GhqLXrbaOmMl7xeLUdPAUmniXpyEKG7nBWjk7WjFDo5MJa0Vg2V0aMfGhCE1fqGAgmlkgnY0gmlwhG_IwROJc2VjcDI1NmsxoQIF-3f9ONqsLPx52p5xwzfd_9LlZt-44Uqlgo0NrcToYIN0Y3CCdl-DdWRwgt6ZhHVkcDaCdl8",  id: "9f7835f47763f20fe1e36f22e04c1ec61f2eb2ea088650ee89ad3fea9e04df9f",  ip: "111.200.193.19",  listenAddr: "[::]:30303",  name: "Geth/v1.9.25-stable-e7872729/linux-amd64/go1.15.6",  ports: {    discovery: 56985,    listener: 30303  },  protocols: {    eth: {      config: {        chainId: 15,        eip150Hash: "0x0000000000000000000000000000000000000000000000000000000000000000"      },      difficulty: 50067798,      genesis: "0x35ed2d9b249e6d76635f7f9502b6c1377ea5198458b6a3b678ab7b0bbcdd89f8",      head: "0x702ea3e85c260edd9f2be3c9d7ae3d20c79a64ad44a1cbcb26b4aca61643085e",      network: 15    }  }}

3、 ... and 、 Created two accounts , Through mining, there is ether

> web3.fromWei(eth.getBalance(eth.accounts[0]))1200> web3.fromWei(eth.getBalance(eth.accounts[1]))570

Four 、 Estimated transaction gas Consume , Transfer accounts ( During this period, the account was unlocked successfully ) Generate transactions hash

> eth.estimateGas({from:eth.accounts[0],to:eth.accounts[1],value:web3.toWei(10,'ether')})21000> eth.sendTransaction({from:eth.accounts[0],to:eth.accounts[1],value:web3.toWei(10,'ether')})"0x5a3687165263503df5d38db988c0e8c294f3ea2c9999fb13ef39bebbc3e2b529"

5、 ... and 、 dig

> miner.start(1)null

log Information

INFO [12-16|20:18:58.564] Submitted transaction                    fullhash=0x5a3687165263503df5d38db988c0e8c294f3ea2c9999fb13ef39bebbc3e2b529 recipient=0x55Db8f37a9c6C226cf2eaf88874E68267aDa9fbEINFO [12-16|20:19:00.654] Commit new mining work                   number=375 sealhash="15da0e…0a5a7a" uncles=0 txs=0 gas=0 fees=0 elapsed=40.693msINFO [12-16|20:19:07.581] Looking for peers                        peercount=0 tried=111 static=0INFO [12-16|20:19:13.093] Successfully sealed new block            number=375 sealhash="15da0e…0a5a7a" hash="b4267f…f21604" elapsed=27.515sINFO [12-16|20:19:13.104] ? block reached canonical chain          number=368 hash="e3095b…1f016d"INFO [12-16|20:19:13.156] Commit new mining work                   number=376 sealhash="3b4977…82ddd5" uncles=0 txs=0 gas=0 fees=0 elapsed=62.815msINFO [12-16|20:19:13.157] Commit new mining work                   number=376 sealhash="3b4977…82ddd5" uncles=0 txs=0 gas=0 fees=0 elapsed=63.778msINFO [12-16|20:19:13.158] ? mined potential block                  number=375 hash="b4267f…f21604"INFO [12-16|20:19:17.760] Looking for peers                        peercount=0 tried=27  static=0INFO [12-16|20:19:24.819] Successfully sealed new block            number=376 sealhash="3b4977…82ddd5" hash="96e5d3…75b00b" elapsed=11.714sINFO [12-16|20:19:24.819] ? block reached canonical chain          number=369 hash="cc0b6b…2f7d99"

6、 ... and 、 Check the balance of the collection account

> web3.fromWei(eth.getBalance(eth.accounts[1]))570 The collection account has not received the transfer , The ether has not changed 

7、 ... and 、 Transaction information view

> eth.getTransaction("0x5a3687165263503df5d38db988c0e8c294f3ea2c9999fb13ef39bebbc3e2b529"){  blockHash: null,  blockNumber: null,  from: "0x960e9241a17c7e095e8480870d4d381e8a550163",  gas: 21000,  gasPrice: 1000000000,  hash: "0x5a3687165263503df5d38db988c0e8c294f3ea2c9999fb13ef39bebbc3e2b529",  input: "0x",  nonce: 3,  r: "0x842ec6a9e84e0c782660a6f113159f920c4a4434f5d3fe658b7df3394be1489",  s: "0x112e3958f814401e6f0681787b689595e7c0150b7176ab23ef97cdacffbb7541",  to: "0x55db8f37a9c6c226cf2eaf88874e68267ada9fbe",  transactionIndex: null,  v: "0x42",  value: 10000000000000000000}

8、 ... and 、 Other instructions (1) stay geth --datadir . --dev console 2>output.log You can transfer money next time , After starting ip yes 127.0.0.1.(2) stay geth --datadir . --networkid 15 --rpc console 2>output.log Transfer is also unsuccessful .






Other answers 1:


Other answers 2:


Other answers 3:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032332398111.html

Random recommended