Setting up mining / Syncing Geth

peepeedogpeepeedog Member Posts: 32
edited December 2015 in Mining
*Edit* Moved to Mining

Hi there,

I'm totally new to blockchain mining and I've run into a few issues that I can't seem to figure out.

I've religiously followed SilentCicero's guide for Ubuntu 15.04:
https://forum.ethereum.org/discussion/2695/frontier-mining-setup-notes-ubuntu-15-04-geth-v1-0-amd-ethminer

and everything runs perfectly smooth until the portion where you start geth and begin syncing. Essentially nothing happens.
$ geth --rpc --rpccorsdomain "*" --genesis "~/genesis_block.json"

The output of this is:
[email protected]:~$ geth --rpc --rpccorsdomain localhost --genesis genesis_block.json
I1217 12:24:59.112769 14378 database.go:71] Alloted 16MB cache to /home/peepeeminer/.ethereum/chaindata
I1217 12:24:59.113800 14378 database.go:71] Alloted 16MB cache to /home/peepeeminer/.ethereum/dapp
I1217 12:24:59.114455 14378 backend.go:314] Protocol Versions: [63 62 61], Network Id: 1
I1217 12:24:59.461234 14378 genesis.go:89] Genesis block already in chain. Writing canonical number
I1217 12:24:59.461310 14378 backend.go:326] Successfully wrote genesis block. New genesis hash = b4fe9f009588ab1145c4471e7531ee8622c2e87b91fd34323ce81a20520594d9
I1217 12:24:59.461361 14378 backend.go:362] Blockchain DB Version: 3
I1217 12:24:59.461611 14378 blockchain.go:214] Last header: #23 [235a28b4…] TD=410326624546
I1217 12:24:59.461632 14378 blockchain.go:215] Last block: #0 [b4fe9f00…] TD=17179869184
I1217 12:24:59.461642 14378 blockchain.go:216] Fast block: #23 [235a28b4…] TD=410326624546
I1217 12:24:59.464846 14378 cmd.go:114] Starting Geth/v1.3.2/linux/go1.5.1
I1217 12:24:59.464932 14378 server.go:311] Starting Server
I1217 12:25:01.257020 14378 udp.go:204] Listening, enode://bfa418e7ae0897fa40f3007bd2fca39550db7da8cc2a07cff0be759a88f7bff70[email protected][::]:30303
I1217 12:25:01.257124 14378 backend.go:526] Server started
I1217 12:25:01.257520 14378 server.go:552] Listening on [::]:30303
I1217 12:25:01.258983 14378 ipc.go:112] IPC service started (/home/peepeeminer/.ethereum/geth.ipc)

and it just sits there forever. Originall the portion "Last header" "Last Block" was 0, until i started the mining command on another terminal, and overnight it told me I've mined some blocks, but looking at the block # i'm pretty sure it's not correct. It basically started from 0 all the way to 24, and gave me 115 Ether. This makes me think I'm running geth in some sort of lab mode or something, and not on the public blockchain.

I can't for the life of me figure this part out - can anyone point me in the right direction?

net.listening is true, net.peerCount is 0, 1 and sometimes 2. Mostly 0.
I've tried manually adding peers as well.

Much appreciated!
Shaun
Post edited by peepeedog on

Comments

  • ethfanethfan Member Posts: 458 ✭✭✭
    Omit the --genesis argument (not needed and maybe the cause of your mining on the wrong block chain) as well as adding the console option (to see the geth output and also to enter interactive geth commands). You probably need to delete the .ethereum data directory when starting over.
  • peepeedogpeepeedog Member Posts: 32
    Thanks ethfan, I will work on the rig tonight and post my results shortly!
  • peepeedogpeepeedog Member Posts: 32
    To add more info, this is what i currently see when i'm mining.

    On Ethminer:
    ℹ 22:15:46|gpuminer0 workLoop 1 #00000000… #00000000…
    ℹ 22:15:47|gpuminer0 workLoop 1 #00000000… #00000000…
    ℹ 22:22:47|ethminer Solution found; Submitting to http://127.0.0.1:8545 ...
    ℹ 22:22:47|ethminer Nonce: 143dd2b84384c4be
    ℹ 22:22:47|ethminer Mixhash: 95ec8ed6643b27c2bdd5b47f5a8d2dcc8ada25eab74fb5c530eeae359352143f
    ℹ 22:22:47|ethminer Header-hash: ff9d93eeb436c3fb08c42204129e496f4aeca54d24b87b295caa0a95d79bf09d
    ℹ 22:22:47|ethminer Seedhash: 0000000000000000000000000000000000000000000000000000000000000000
    ℹ 22:22:47|ethminer Target: 0000000043dcf183c9bc81dbacaea2a24855c51b15c33b6d0e46fa0af11f546a
    ℹ 22:22:47|ethminer Ethash: 0000000028ee49297d3d78ea18f3bc0fd85981a64033c2f00c314318a02fc2d5
    ℹ 22:22:47|ethminer B-) Submitted and accepted.
    ℹ 22:22:47|gpuminer0 workLoop 1 #00000000… #00000000…
    ℹ 22:22:47|gpuminer0 workLoop 1 #00000000… #00000000…
    ℹ 22:25:01|ethminer Solution found; Submitting to http://127.0.0.1:8545 ...
    ℹ 22:25:01|ethminer Nonce: 1b2ed78299826377
    ℹ 22:25:01|ethminer Mixhash: 3c09bfefa1cf42ff494f468a938a92896c2fb4d8cf50d001d68c34645b466ece
    ℹ 22:25:01|ethminer Header-hash: b89cc93665f895b4917b8f3f9fb576f55f74f9a4d92c8a950e8130d23dc037ef
    ℹ 22:25:01|ethminer Seedhash: 0000000000000000000000000000000000000000000000000000000000000000
    ℹ 22:25:01|ethminer Target: 0000000043e56e317e24e04befb3e6dcd708ad55e617ca8f4a12db23ed82497a
    ℹ 22:25:01|ethminer Ethash: 000000000c232366ebf1ef6ec9b659de8c195c92eac49a466b0e54ad19dc6eb1
    ℹ 22:25:01|ethminer B-) Submitted and accepted.
    ℹ 22:25:01|gpuminer0 workLoop 1 #00000000… #00000000…
    ℹ 22:25:01|gpuminer0 workLoop 1 #00000000… #00000000…
    ℹ 22:30:58|ethminer Solution found; Submitting to http://127.0.0.1:8545 ...
    ℹ 22:30:58|ethminer Nonce: 269f4539cc42c4f7
    ℹ 22:30:58|ethminer Mixhash: b52dcdc44cceb49fb5d7c3f071ca586461a1680cfa5e1418322fa8d0c5b96891
    ℹ 22:30:58|ethminer Header-hash: e64a6cef33006048c24f2271a4aeeb5380e814cc5cc6d06aac87f2e96f8a0cdd
    ℹ 22:30:58|ethminer Seedhash: 0000000000000000000000000000000000000000000000000000000000000000
    ℹ 22:30:58|ethminer Target: 0000000043edebeef94e6a694ff5b75b5eafd77c27b44f0a6ea133dfa0cdf18c
    ℹ 22:30:58|ethminer Ethash: 00000000131ed9e29f68d1ec29d01a3bae0ce9756e2bce18d468c22e4235c9fe
    ℹ 22:30:58|ethminer B-) Submitted and accepted.
    ℹ 22:30:58|gpuminer0 workLoop 1 #00000000… #00000000…
    ℹ 22:30:58|gpuminer0 workLoop 1 #00000000… #00000000…

    On Geth:
    I1217 21:52:03.033597 2017 database.go:71] Alloted 16MB cache to /home/peepeeminer/.ethereum/chaindata
    I1217 21:52:03.039462 2017 database.go:71] Alloted 16MB cache to /home/peepeeminer/.ethereum/dapp
    I1217 21:52:03.040289 2017 backend.go:314] Protocol Versions: [63 62 61], Network Id: 1
    I1217 21:52:03.040508 2017 backend.go:362] Blockchain DB Version: 3
    I1217 21:52:03.041761 2017 blockchain.go:214] Last header: #23 [235a28b4…] TD=410326624546
    I1217 21:52:03.041839 2017 blockchain.go:215] Last block: #0 [b4fe9f00…] TD=17179869184
    I1217 21:52:03.041852 2017 blockchain.go:216] Fast block: #23 [235a28b4…] TD=410326624546
    I1217 21:52:03.045137 2017 cmd.go:114] Starting Geth/v1.3.2/linux/go1.5.1
    I1217 21:52:03.045211 2017 server.go:311] Starting Server
    I1217 21:52:05.196135 2017 udp.go:204] Listening, enode://bfa418e7ae0897fa40f3007bd2fca39550db7da8cc2a07cff0be759a88f7bff70[email protected][::]:30303
    I1217 21:52:05.196271 2017 backend.go:526] Server started
    I1217 21:52:05.196404 2017 server.go:552] Listening on [::]:30303
    I1217 21:52:05.196768 2017 ipc.go:112] IPC service started (/home/peepeeminer/.ethereum/geth.ipc)
    I1217 21:52:32.230421 2017 miner.go:119] Starting mining operation (CPU=0 TOT=1)
    I1217 21:52:32.231333 2017 worker.go:570] commit new work on block 1 with 0 txs & 0 uncles. Took 780.55µs
    I1217 22:09:19.890822 2017 worker.go:349]
  • peepeedogpeepeedog Member Posts: 32
    ethfan said:

    Omit the --genesis argument (not needed and maybe the cause of your mining on the wrong block chain) as well as adding the console option (to see the geth output and also to enter interactive geth commands). You probably need to delete the .ethereum data directory when starting over.

    ethfan, brilliant - thank you. After deleting both the .ethereum and .ethash files, I reran geth without --genesis and the synchronization has started.
  • railslaverailslave Member Posts: 2
    Geth wont even start on my PC, I'm on win 10, Well, it starts and locks the desktop, no read out or anything. :(
  • antoineantoine Member Posts: 12
    Hi, I have installed geth yesterday and launched it. 12 hours have passed since I launched sync. somebody knows how much time it is supposed to last ?
  • peepeedogpeepeedog Member Posts: 32
    antoine said:

    Hi, I have installed geth yesterday and launched it. 12 hours have passed since I launched sync. somebody knows how much time it is supposed to last ?

    Can you share the output you're seeing on your screen?

    My sync was pretty quick, less than 3 hours i believe, to get to the most up to date blockchain.
  • marcusmarcus Member Posts: 2
    hi, when someone knows that it's to the most up to date blockchain ?
    I'm not sure whatever the blockchain is fully synchronised or not.

    i want to start the mining with the fallowing command `eth --frontier -b -i -m on -G` and i wander if this will delay mining until syncing is complete ?




    in this page about mining are two statements that confuse me:

    1) "NOTE: Ensure your blockchain is fully synchronised with the main chain before starting to mine, otherwise you will not be mining on the main chain."


    2) "Note that mining for real ether only makes sense if you are in sync with the network (since you mine on top of the consensus block). Therefore the eth blockchain downloader/synchroniser will delay mining until syncing is complete, and after that mining automatically starts unless you cancel your intention with miner.stop()."



    Any help is appreciated
  • peepeedogpeepeedog Member Posts: 32
    You'll know the latest block by going to the eth stats site:
    https://stats.ethdev.com/

    And yes, you can only begin mining once your blockchain is fully synchronized.

    As of this moment it's currently sitting at #817,276
Sign In or Register to comment.