1

Installed the latest Ethereum windows client , both in home and office network . I see subtle differences when its mines with Testnet.

When in office , I see it always mines new blocks and in home network it starts importing as the immediate next steps. In office network its is not connected to testnet outside as i don't see any peers connected. while in home i see peers connected and it tries to download the whole blocks .

As i use ethereum client to acess both nodes , Why am i unable to connect to other peers in office . I do understand their will be firewall issues , but then my node should not mine itself . I am not clear on why its self mining when its not connected out .

Logs below

1) From office node

I1116 11:19:56.836850 ethdb/database.go:83] Alloted 128MB cache and 1024 file handles to C:\Users\Administrator\AppData\Roaming\Ethereum\testnet\chaindata
I1116 11:19:56.850851 ethdb/database.go:176] closed db:C:\Users\Administrator\AppData\Roaming\Ethereum\testnet\chaindata
I1116 11:19:56.852851 ethdb/database.go:83] Alloted 128MB cache and 1024 file handles to C:\Users\Administrator\AppData\Roaming\Ethereum\testnet\chaindata
I1116 11:19:56.892853 ethdb/database.go:83] Alloted 16MB cache and 16 file handles to C:\Users\Administrator\AppData\Roaming\Ethereum\testnet\dapp
I1116 11:19:56.898853 eth/backend.go:172] Protocol Versions: [63 62], Network Id: 2
I1116 11:19:56.898853 core/genesis.go:92] Genesis block already in chain. Writing canonical number
I1116 11:19:56.898853 eth/backend.go:180] Successfully wrote custom genesis block: 0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303
I1116 11:19:56.898853 eth/backend.go:201] Blockchain DB Version: 3
I1116 11:19:56.900853 core/blockchain.go:214] Last header: #918 [641bfed3…] TD=127765120
I1116 11:19:56.900853 core/blockchain.go:215] Last block: #918 [641bfed3…] TD=127765120
I1116 11:19:56.900853 core/blockchain.go:216] Fast block: #918 [641bfed3…] TD=127765120
I1116 11:19:56.900853 eth/handler.go:114] blockchain not empty, fast sync disabled
I1116 11:19:56.902854 p2p/server.go:313] Starting Server
I1116 11:19:58.945970 p2p/discover/udp.go:217] Listening, enode://8f9345c2a2e4eb830406b431342a67e045277d6a099dbadc612f6ae6704a680066419ab9ca8e9ac3b6e91df354351fe61ed288e459555993c823c9211b08fbc0@0.0.0.0:30303
I1116 11:19:58.956971 p2p/server.go:556] Listening on [::]:30303
I1116 11:19:58.958971 node/node.go:296] IPC endpoint opened: \\.\pipe\geth.ipc
I1116 11:20:17.832051 eth/backend.go:454] Automatic pregeneration of ethash DAG ON (ethash dir: C:\Users\Administrator\AppData\Ethash)
I1116 11:20:17.832051 miner/miner.go:119] Starting mining operation (CPU=1 TOT=2)
I1116 11:20:17.832051 eth/backend.go:461] checking DAG (ethash dir: C:\Users\Administrator\AppData\Ethash)
I1116 11:20:17.833051 miner/worker.go:539] commit new work on block 919 with 0 txs & 0 uncles. Took 1.0001ms
I1116 11:20:17.833051 ethash.go:259] Generating DAG for epoch 0 (size 1073739904) (0000000000000000000000000000000000000000000000000000000000000000)
I1116 11:20:47.695759 ethash.go:276] Done generating DAG for epoch 0, it took 29.862708s
I1116 11:21:26.476977 miner/worker.go:342] 🔨  Mined block (#919 / d281aea0). Wait 5 blocks for confirmation
I1116 11:21:26.476977 miner/worker.go:539] commit new work on block 920 with 0 txs & 0 uncles. Took 0s

2) From home node

I1116 08:53:03.014558 ethdb/database.go:83] Alloted 128MB cache and 1024 file handles to /home/admin/.ethereum/testnet/chaindata
I1116 08:53:03.120005 ethdb/database.go:176] closed db:/home/admin/.ethereum/testnet/chaindata
I1116 08:53:03.120552 ethdb/database.go:83] Alloted 128MB cache and 1024 file handles to /home/admin/.ethereum/testnet/chaindata
I1116 08:53:03.159311 ethdb/database.go:83] Alloted 16MB cache and 16 file handles to /home/admin/.ethereum/testnet/dapp
I1116 08:53:03.161476 eth/backend.go:172] Protocol Versions: [63 62], Network Id: 2
I1116 08:53:03.162021 core/genesis.go:92] Genesis block already in chain. Writing canonical number
I1116 08:53:03.162072 eth/backend.go:180] Successfully wrote custom genesis block: 0cd786a2425d16f152c658316c423e6ce1181e15c3295826d7c9904cba9ce303
I1116 08:53:03.162119 eth/backend.go:201] Blockchain DB Version: 3
I1116 08:53:03.163257 core/blockchain.go:214] Last header: #1 [ad474131…] TD=262144
I1116 08:53:03.163277 core/blockchain.go:215] Last block: #733466 [60207b3e…] TD=18580056623328
I1116 08:53:03.163283 core/blockchain.go:216] Fast block: #1 [ad474131…] TD=262144
I1116 08:53:03.163523 eth/handler.go:114] blockchain not empty, fast sync disabled
I1116 08:53:03.164392 p2p/server.go:313] Starting Server
I1116 08:53:05.262933 p2p/discover/udp.go:217] Listening, enode://aa794aed2387bd40ab9ccbd34c8f390cb1ad255da287349e5221899694783a8bbb6d4e80a916a1adebd22f152267f9047ed052f7507e530bb40d146a72073482@[::]:30303
I1116 08:53:05.264009 p2p/server.go:556] Listening on [::]:30303
I1116 08:53:05.275000 node/node.go:296] IPC endpoint opened: /home/admin/.ethereum/geth.ipc
I1116 08:53:15.264965 eth/downloader/downloader.go:319] Block synchronisation started
I1116 08:53:18.639232 core/blockchain.go:1001] imported 2 block(s) (0 queued 0 ignored) including 5 txs in 1.727807199s. #733468 [5357f08b / 804baeb7]
I1116 08:53:26.649472 core/blockchain.go:1001] imported 14 block(s) (0 queued 0 ignored) including 54 txs in 8.007118921s. #733482 [756c5176 / c5087d9b]
I1116 08:53:32.381528 miner/miner.go:109] Can not start mining operation due to network sync (starts when finished)
I1116 08:53:32.381555 eth/backend.go:454] Automatic pregeneration of ethash DAG ON (ethash dir: /home/admin/.ethash)
I1116 08:53:32.381605 eth/backend.go:461] checking DAG (ethash dir: /home/admin/.ethash)
I1116 08:53:34.686174 core/blockchain.go:1001] imported 61 block(s) (0 queued 0 ignored) including 107 txs in 8.036689713s. #733543 [c5087d9b / 23d88fcb]
I1116 08:53:42.855455 core/blockchain.go:1001] imported 38 block(s) (0 queued 0 ignored) including 64 txs in 8.169291292s. #733581 [23d88fcb / c10b8113]
I1116 08:53:50.904279 core/blockchain.go:1001] imported 64 block(s) (0 queued 0 ignored) including 75 txs in 8.048815351s. #733645 [c10b8113 / 332895b0]
I1116 08:53:58.925573 core/blockchain.go:1001] imported 36 block(s) (0 queued 0 ignored) including 84 txs in 8.021294312s. #733681 [332895b0 / 282533fa]
I1116 08:54:06.991803 core/blockchain.go:1001] imported 48 block(s) (0 queued 0 ignored) including 63 txs in 8.066222288s. #733729 [282533fa
  • Which commands did you use to start both the nodes? – galahad Nov 16 '16 at 5:07
2

As you said:

It seems the main difference is the connection:

  • Your office node is not connecting to other peers (probably by firewall/corporate proxy/other security measures). So it considers the Blockchain as synced, so starts mining new blocks to get rewards.
  • Your home node, otherwise, can get other peers, so it realizes there are many blocks it does not own. So before mining, your home node starts syncing the blockchain.

Solutions:

  • If you don't want your office node to mine: type in console miner.stop().
  • If you want to connect your office node to other peers: first try manually the admin.addPeer("nodeadresshere"). If you still get no peers, then contact your IT dept.
  • thanks @kaneikDev . admin.addPeer() doesnt work . BTW , it does get any error also to the geth console . I would had suppose at least some connection error . It returns true – Raj Nov 21 '16 at 4:15
  • if admin.addPeer is not working, then you're having some firewall/proxy connection block. You should talk with your IT dept to solve this issue. – KanekiDev Nov 21 '16 at 8:41
  • Tried in a private network and it worked. Thanks for your help . Disabled discovery and then added :-) – Raj Nov 25 '16 at 9:28
  • great then :) keep going with your investigations :) – KanekiDev Nov 25 '16 at 12:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.