2

I am referring this tutorial and miner.start(1) works fine and mining is started as expected like below.

INFO [09-05|15:41:26.486] Commit new mining work                   number=221 sealhash=1892af…f2ffcd uncles=0 txs=0 gas=0 fees=0 elapsed=243.187µs
INFO [09-05|15:41:26.706] Successfully sealed new block            number=221 sealhash=1892af…f2ffcd hash=10497a…b00914 elapsed=219.629ms
INFO [09-05|15:41:26.706] 🔗 block reached canonical chain          number=214 hash=b3cb32…9dbe53
INFO [09-05|15:41:26.706] 🔨 mined potential block                  number=221 hash=10497a…b00914
INFO [09-05|15:41:26.707] Commit new mining work                   number=222 sealhash=36083f…4c7697 uncles=0 txs=0 gas=0 fees=0 elapsed=202.361µs
INFO [09-05|15:41:32.083] Successfully sealed new block            number=222 sealhash=36083f…4c7697 hash=18607b…9362b7 elapsed=5.376s
INFO [09-05|15:41:32.083] 🔗 block reached canonical chain          number=215 hash=5ce9de…005985
INFO [09-05|15:41:32.083] 🔨 mined potential block                  number=222 hash=18607b…9362b7
INFO [09-05|15:41:32.084] Commit new mining work                   number=223 sealhash=90508f…09cb94 uncles=0 txs=0 gas=0 fees=0 elapsed=158.478µs

Now the author says to check balance after mining starts, so to do that i open a new geth window console says

Fatal: Error starting protocol stack: listen udp :30303: bind: address already in use

which is obvious because of mining window which is running currently.

So my question is how can i check balance after starting miner?

Or should i wait for completion of mining?

If i should wait for mining completion then how much time it will take to complete?

  • Possible duplicate of Error starting protocol stack – Briomkez Sep 5 '18 at 10:24
  • this question does not answer my questions.@Briomkez – Alien Sep 5 '18 at 10:27
  • 1
    Yes, sorry, I selected the wrong one. I do think that this one should fix your error ethereum.stackexchange.com/questions/17084/…. In other words you have to use geth attach and not geth console because with the latter command you start another instance on the same port. – Briomkez Sep 5 '18 at 10:29
  • I think that is better, if you close/delete this question, because it has another answer in another question ^^. – Briomkez Sep 5 '18 at 10:31
  • 1
    let me try that solution it that works then i will close it. – Alien Sep 5 '18 at 10:32
1

So here i am posting an answer to my own post so that somebody else might get benefited.

Q1. how can i check balance after starting miner?

Ans. you can check the balance by running by attaching geth console but if you dont know where is the ipc file then use below command from your base directory to find the ipc file by this command.

sudo find /home/user/ -name "*.ipc"

this will locate the ipc file location so in my case it was /home/blockchain/medium-article/datadir/geth.ipc

now attach geth console like below command.

sudo geth attach /home/blockchain/medium-article/datadir/geth.ipc

Q2. Should i wait for completion of mining?

Ans. No,you don't have to wait for mining to complete. by following above process you can open geth console.

Q3. how much time it will take to complete?

Ans. Time varies from configuration to configuration.

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.