Am I mining?

glowkeeperglowkeeper Member Posts: 12
I've been running geth --mine for around 24 hours. I'm running it on a Mac OS X 2.7 GHz Intel Core i5 with 8 GB 1333 MHz DDR3. Apparently, I've managed to mine 4 blocks for a total of 20 ether. However, given everything I've read vis-a-vi difficulty and GPUs, I'm not sure I believe that. How can I check what network I'm running geth --mine on, and whether my ether coinbase, Address: {a0818b21e0989192d57926d173a5f25c501ff3d7}, is a real address containing real ether?

Comments

  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    @glowkeeper It's unlikely that you can mine at all on a laptop/iMac GPU. Mining with 'geth --mine' doesn't work well, on top of that. There's no way you've mined 4 blocks; you'd be luck to get that in 5 or 6 weeks with a single desktop GPU. In short, you need to do a lot more reading to even get close to mining, and you're not going to do it with the machine you're using. I know that's not what you'd like to hear, but right now you're just wasting your time. Sorry.
  • glowkeeperglowkeeper Member Posts: 12
    @dlehenky - thanks - if you read carefully, you'll see that I was a non-believer already. And if you read even more carefully, you may just spot that I'm not really concerned as to whether I have become an overnight ether billionaire. Rather, my concern is how to check what network I'm actually mining on (since I have mined 20 ether somewhere).

    fyi, I'm pretty certain geth is using all four cores of my CPU, not my GPU.
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    @glowkeeper Geth can only access one network, so I don't understand that question. That's like asking: I pick up my telephone and get dial-tone, but I don't know where it's coming from. You're either connected to Ethereum or you're not connected; there's no room for ambiguity. I just checked your account number on etherchain.org, and, no, you don't have 20 ethers anywhere, at least not in that account. If you are mining with your CPU, it would take you many, many months to find 1 block. I guess I'm just saying, at this point, you don't seem to have enough understanding of what you're doing to be able to ask the questions needed to move forward. I really not trying to be an ass, I'm just saying you need to learn a lot more before you're going to get anywhere. Right now, you don't know what you don't know.
  • glowkeeperglowkeeper Member Posts: 12
    @dlehenky - thanks (I think). ps. I'm pretty sure you can supply a network id to have geth mining on a private test network, not just the main one. In fact, I bloody hope so, 'cause that's exactly what I want to do pretty soon! I am just playing for now ;)

    Can anyone else explain from which network my 20 ether have materialised from? All I've done so far is installed eithereum on my Mac OS X via homebrew, ran geth account new, then ran geth --mine.

    Is there a geth console command I can run to see where it's mining? e.g > net.wtf

    I built a Bitcoin mining rig in 2013, using 12 FPGAs and 2 Raspberry Pi's. I don't remember it being this much trouble ;)
  • LagniappeLagniappe Dirty SouthMember Posts: 136 ✭✭
    welcome to the forum.

    One thing I can tell you for sure, there's no way you've mined 20 eth, with a laptop, in a day's time. It would take you several weeks to earn that amount with a fairly decent budget setup. Could you post a screenshot of what is convincing you that you do have 20 ether?
  • ethfanethfan Member Posts: 458 ✭✭✭
    Looks like you are mining on your own block-chain. From your pic you are at block number 4 of that chain. The real chain is at block number 1197474. You obviously did not download the main block-chain before starting mining.
  • LagniappeLagniappe Dirty SouthMember Posts: 136 ✭✭
    Damn. That looks sexy. Sorry, just started mining myself but have yet to get paid out, I'm using to seeing a big fat zero where that twenty is.

    ethfan is correct. 'geth --rpc' is the command you want to use, let it update to 1,190,000+ or so
  • glowkeeperglowkeeper Member Posts: 12
    @ethfan and @Lagniappe - thanks guys! So I've unwittingly managed to create a private blockchain - cool! Question is, how have I done that? I've just checked the wiki again, and it says:

    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().

    So, from that, I assumed that geth --mine would just grab the main blockchain then begin mining real ether. Mind you, I should know better than assuming ;)

    Anyway, how do I reset things so that I'm mining on the main blockchain? @Lagniappe - I'm not certain geth --rpc is correct; I've already been playing with that and I'm pretty sure it just starts a JSON-RPC server that I can talk to via my browser. Or am I wrong?

    Thanks again guys!
  • LagniappeLagniappe Dirty SouthMember Posts: 136 ✭✭
    'Geth --rpc' downloads and synchronizes the blockchain to your computer.
  • philakonephilakone Member Posts: 163 ✭✭
    hey, check this out too. it gives you a step by step guide on how to check your balance while in geth:

    https://www.cryptocompare.com/coins/guides/how-to-do-an-ethereum-transaction-check-your-balance/

    I highly recommend mining in a pool. I promote pools over solo unless you have a 50+ MH/s rig and you're ok with long periods of no block chain chain found.

    I've both solo mined and pool mined. The solo mine with a 100 mh/s rig was slightly more than pool mining (about 5% more only) within a 1 week period.

    I've tracked my mining intensely and would encourage you to go through dwarfpool or nanopool as they're my 2 favorites. dwarfpool has the best real time statistics and nanopool is the simplest but very reliable.

    when you're synchronized, it'll say something like:

    "block synchronization started"
    " x downloaded, 0 queued"

    after you see that, you can start your miner program like etherminer or ethproxy.

    in my opinion, i think you accepted 4 blocks, meaning over that period of 24 hours, you found 4 blocks to work on. You were hashing at all 4, but didn't win it of course.
  • glowkeeperglowkeeper Member Posts: 12
    I've tried resetting things this morning through a variety of means; by running geth removedb, and also by removing ~/Library/Ethereum/chaindata. But I seem incapable of connecting to the main ethereum network, since after running geth in a variety of forms (I've tried --rpc alone, --rpc --fast, --rpc --fast --mine), net.peerCount always returns 0. Attached is a screenshot of one such attempt. Why can't I attach to the main network and why can't I download the main blockchain? Could it be that the university firewall is blocking some necessary network traffic (for instance)? How might I check that?

  • ethfanethfan Member Posts: 458 ✭✭✭
    edited March 2016
    In Linux just delete the entire geth data directory.
    rm -fr ~/.ethereum
    Be aware that everything including old accounts/addresses wil be gone.

    Geth will re-create it when it starts as follows:
    geth --rpc --rpccorsdomain localhost console
  • glowkeeperglowkeeper Member Posts: 12
    I'm on MAC OS X.

    So I cleared out everything in ~/Library/Ethereum (except my keystore) and then deleted everything under ~/.ethash (the MAC OS X equivalent of ~/.ethereum). I then ran geth --rpc --rpccorsdomain localhost console. That immediately dropped me into a console (screenshot attached), without generating DAG, so I tried running >miner.start() and it started to generate DAG - but that's just a private blockchain again, 'cause >net.peerCount is still returning 0.

    This is all interesting, but I'd love to know why my geth client is not downloading the main blockchain and is not connecting to any peers...

  • ethfanethfan Member Posts: 458 ✭✭✭
    In Linux ~/.ethash is where the DAG is located. Usually created by ethminer (but possibly also by geth if geth is used to mine). ~/.ethereum is where the block-chain is. Mac directory structure is not my area of expertise.
  • ethfanethfan Member Posts: 458 ✭✭✭
    edited March 2016
    Don't start mining until block-chain is downloaded. I find that if the miner starts that stops geth from sync'ing the chain.
    You should see this message:
    I0323 10:50:31.070833 22420 downloader.go:288] Block synchronisation started
    I0323 10:50:42.113347 22420 blockchain.go:1251] imported 5 block(s) (0 queued 0 ignored) including 15 txs in 6.293928585s. #1201935 [5cb56ee3 / 363ac95f]
  • glowkeeperglowkeeper Member Posts: 12
    Got you - I assumed the DAG was the blockchain, but now I've reread the ethash section of the wiki properly and see it's a dataset that a miner relies on to implement its ethash (proof of work) algorithm.

    Problems are cool aren't they? They lead to so much more understanding ;) However, I'd still like to know why I seem incapable of downloading the main blockchain....
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    If you've got 0 peers when running 'geth', it's probably your router and/or Mac firewall. The router needs to be set to forward port 30303, and the Max firewall has to allow that same port to come through. I know the Mac default firewall settings will not allow incoming peer connects on *any* port without changing the settings.
  • glowkeeperglowkeeper Member Posts: 12
    @dlehenky - thanks - yeah, I suspect it's something like that. Unfortunately, as the problem is on my university machine, and we're shut for easter for a few days, I won't get to look at it until Tuesday/Wednesday next week :(
  • blueboxbluebox Member Posts: 181 ✭✭
    @glowkeeper If you want to mine on Mac OS X you can, but it's a double-edged sword.

    First, you'll be far, far better to mine on a pool, and for that you can install the homebrew cpp-ethereum repo that has ethminer.

    Downsides: 1) It appears the homebrew/cpp-ethereum ethminer code is older and may not be optimized compared to the latest cpp-ethereum branch, and 2) the Apple AMD drivers may not be as optimized as they could be (particularly with older or "unsupported" cards like mine). I run two new AMD R7-370's in a Pro tower, and the best I can get is ~20MH for the pair. Win7 bootcamp and Genoil's ethminer get 30MH on the pair easy. This is what these cards should do, so having unoptimized code is the problem with ethereum mining. I've hashed other algo's on OS X before without trouble, but this dagger-hashimoto is an unusual beast, very sensitive to driver and code optimizations.

    I put a note in to Bob Summerwill on github about the homebrew code; no idea how long it'll take them to fold in a newer version, if that does any better. The latest cpp-ethereum source has compile issues on El Capitan (llvm with c++11), though I've heard it's ok on Yosemite. Might give that a shot.
  • glowkeeperglowkeeper Member Posts: 12
    @bluebox that's really useful info'. Thanks!

    I'm playing around with Ethereum as part of a PhD research project, which is broadly on the Internet of Things with a particular focus on blockchain technology. So I'm really just trying to understand how it all works. Therefore, I'm not so interested in how well my MAC hashes at the moment.

    Having said that, all these issues and the feedback I'm getting is really good; I have a broad understanding of blockchain technology, I have a little more in-depth knowledge of Bitcoin and Peercoin, but I know nothing of Ethereum. Yet it seems the flavour of the month ;) In fact, I'm really liking some of the Dapp ecosystem that seems to be evolving around it...

    And yet, having said all that about being uninterested in hashing power, I do have 3 towers at my disposal (where I've recently installed Ubuntu 14.04). At the moment, they lack GPU's, but I have a small budget to buy some and I may be doing just that once I have a better handle on Ethereum's requirements...

    Thanks again!
  • blueboxbluebox Member Posts: 181 ✭✭
    I've already done some of the work for you regarding choice of R7-370's — almost all models are single 6-pin boost cable so a Pro tower can easily handle two of them without adding an external PSU (I have the MSI Gaming models), and provide the best hashrate for the money. I added their device ID (0x68111002) in the AMD7000Controller.kext and AMDRadeon4000.kext files and they work just fine, just no apple boot screen. You can do GTX960 or 950's too (they're single 6-pin), but they will hash 30-50% less than the 370's and cost a bit more.

    Ubuntu still isn't the easiest to set up and maintain, though it's free — the fglrx driver situation is still hinky to me, always was more of a pain than nvidia of late. Windows 7/8.0 is by far the easiest path to mining (8.1 and 10 have their issues, but can be overcome).

    Ping me if you want any more help, or better yet go look up Bob Summerwill on one of the Gitter homebrew rooms and ask him where to go for the info you want. Cheers!
  • lithikalithika Member Posts: 1
    Hello

    I'm using my laptop to mine, how can I know whether I'm mining or not

    How can I find it ?
    I'm checking the balance but it shows zero

    Please help me
  • dlehenkydlehenky Member Posts: 2,249 ✭✭✭✭
    You can't mine with a laptop, in general. Even if you have the latest and greatest laptop, and you could get it to mine, the hash rate and income would be *extremely* low.
  • Mark121Mark121 Member Posts: 1
    On my Mac Pro terminal, it is running this endless, what is it? it is normal? Thanks.
    I0314 15:25:53.702362 core/blockchain.go:1070] imported 26 blocks, 70 txs ( 11.889 Mg) in 8.157s ( 1.457 Mg/s). #2322717 [92714217… / 6fa228a5…]
    I0314 15:26:02.972066 core/blockchain.go:1070] imported 19 blocks, 66 txs ( 9.544 Mg) in 9.269s ( 1.030 Mg/s). #2322736 [6fa228a5… / c55f4707…]
    I0314 15:26:21.262267 core/blockchain.go:1070] imported 58 blocks, 273 txs ( 13.733 Mg) in 18.290s ( 0.751 Mg/s). #2322794 [c55f4707… / 16f2b550…]
    I0314 15:26:33.304380 core/blockchain.go:1070] imported 46 blocks, 275 txs ( 7.797 Mg) in 12.042s ( 0.647 Mg/s). #2322840 [16f2b550… / a18f0005…]
    I0314 15:26:47.663332 core/blockchain.go:1070] imported 45 blocks, 338 txs ( 12.387 Mg) in 14.358s ( 0.863 Mg/s). #2322885 [a18f0005… / 1f8d0eee…]
    I0314 15:26:55.674244 core/blockchain.go:1070] imported 27 blocks, 198 txs ( 13.848 Mg) in 8.010s ( 1.729 Mg/s). #2322912 [1f8d0eee… / 001729b2…]
    I0314 15:27:03.948447 core/blockchain.go:1070] imported 25 blocks, 134 txs ( 8.737 Mg) in 8.274s ( 1.056 Mg/s). #2322937 [001729b2… / 2cd6283e…]
    I0314 15:27:15.997837 core/blockchain.go:1070] imported 31 blocks, 124 txs ( 7.180 Mg) in 12.049s ( 0.596 Mg/s). #2322968 [2cd6283e… / 32a56346…]
    I0314 15:27:24.927994 core/blockchain.go:1070] imported 18 blocks, 66 txs ( 5.801 Mg) in 8.930s ( 0.650 Mg/s). #2322986 [32a56346… / fbcc79e3…]
    I0314 15:27:54.063554 core/blockchain.go:1070] imported 35 blocks, 168 txs ( 8.301 Mg) in 29.135s ( 0.285 Mg/s). #2323021 [fbcc79e3… / 01a5ee2d…]
  • dleth72dleth72 Member Posts: 2
    Am I mining here?

    I0318 13:16:58.511785 core/blockchain.go:1070] imported 1 blocks, 2 txs ( 0.042 Mg) in 5.879ms ( 7.143 Mg/s). #3374162 [45a24bcc…]
    I0318 13:17:10.732860 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 4.681ms ( 0.000 Mg/s). #3374163 [081b334f…]
    I0318 13:17:19.690184 core/blockchain.go:1070] imported 1 blocks, 27 txs ( 0.857 Mg) in 24.460ms (35.031 Mg/s). #3374164 [5ffd5880…]
    I0318 13:17:25.422354 core/blockchain.go:1070] imported 1 blocks, 2 txs ( 0.042 Mg) in 5.293ms ( 7.934 Mg/s). #3374165 [351a8bd8…]
    I0318 13:17:29.099116 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 3.664ms ( 0.000 Mg/s). #3374166 [311b9aa7…]
    I0318 13:17:58.431669 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 2.718ms ( 0.000 Mg/s). #3374167 [25ce2cdc…]
    I0318 13:18:07.345378 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 3.346ms ( 0.000 Mg/s). #3374168 [0cda24a9…]
    I0318 13:18:15.112124 core/blockchain.go:1070] imported 1 blocks, 2 txs ( 0.042 Mg) in 6.744ms ( 6.227 Mg/s). #3374169 [6d8469ef…]
    I0318 13:18:40.303651 core/blockchain.go:1070] imported 1 blocks, 34 txs ( 0.938 Mg) in 31.127ms (30.132 Mg/s). #3374170 [7b11434c…]
    I0318 13:19:00.601133 core/blockchain.go:1070] imported 1 blocks, 22 txs ( 0.636 Mg) in 24.585ms (25.870 Mg/s). #3374171 [9b986e5b…]
    I0318 13:19:02.232654 core/blockchain.go:1070] imported 1 blocks, 28 txs ( 0.909 Mg) in 30.300ms (30.000 Mg/s). #3374172 [13d431d2…]
    I0318 13:20:04.849177 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 4.307ms ( 0.000 Mg/s). #3374173 [223baa70…]
    I0318 13:20:24.953147 core/blockchain.go:1070] imported 1 blocks, 67 txs ( 1.690 Mg) in 60.740ms (27.827 Mg/s). #3374174 [690259d1…]
    I0318 13:20:42.219487 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 3.921ms ( 0.000 Mg/s). #3374175 [5641d3e2…]
    I0318 13:20:47.883436 core/blockchain.go:1070] imported 1 blocks, 41 txs ( 1.258 Mg) in 47.873ms (26.271 Mg/s). #3374176 [96514e11…]
    I0318 13:20:48.931777 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 3.628ms ( 0.000 Mg/s). #3374175 [f9790450…]
    I0318 13:21:02.206639 core/blockchain.go:1070] imported 1 blocks, 10 txs ( 0.273 Mg) in 11.707ms (23.278 Mg/s). #3374177 [463833a8…]
    I0318 13:21:07.466227 core/blockchain.go:1070] imported 1 blocks, 15 txs ( 0.443 Mg) in 19.368ms (22.853 Mg/s). #3374178 [af8521aa…]
    I0318 13:21:08.186184 core/blockchain.go:1070] imported 1 blocks, 20 txs ( 0.548 Mg) in 20.632ms (26.543 Mg/s). #3374178 [f0a26003…]
    I0318 13:21:13.663787 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 6.439ms ( 0.000 Mg/s). #3374179 [85302047…]
    I0318 13:21:29.041794 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 6.674ms ( 0.000 Mg/s). #3374180 [42052eef…]
    I0318 13:21:49.186986 core/blockchain.go:1070] imported 1 blocks, 20 txs ( 0.579 Mg) in 18.082ms (32.037 Mg/s). #3374181 [b3c8fc28…]
    I0318 13:22:02.693374 core/blockchain.go:1070] imported 1 blocks, 22 txs ( 0.708 Mg) in 20.746ms (34.128 Mg/s). #3374182 [0b5b5915…]
    I0318 13:22:04.843860 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 2.797ms ( 0.000 Mg/s). #3374183 [1bb02d94…]
    I0318 13:22:11.126655 core/blockchain.go:1070] imported 1 blocks, 0 txs ( 0.000 Mg) in 3.324ms ( 0.000 Mg/s). #3374184 [88294f39…]
    I0318 13:22:30.341991 core/blockchain.go:1070] imported 1 blocks, 33 txs ( 1.088 Mg) in 35.384ms (30.747 Mg/s). #3374185 [410293bb…]
    I0318 13:22:46.700083 core/blockchain.go:1070] imported 1 blocks, 18 txs ( 0.463 Mg) in 17.221ms (26.881 Mg/s). #3374186 [c29b6620…]
    I0318 13:23:26.672289 core/blockchain.go:1070] imported 1 blocks, 9 txs ( 0.434 Mg) in 13.974ms (31.021 Mg/s). #3374187 [d71451a3…]
    I0318 13:23:29.191647 core/blockchain.go:1070] imported 1 blocks, 42 txs ( 1.292 Mg) in 43.397ms (29.766 Mg/s). #3374188 [cf88a000…]

    And where can I see the results of my mining?
  • cidmocidmo Member Posts: 446 ✭✭✭
    no when ur mining it will have a commit work line every block import line
  • dleth72dleth72 Member Posts: 2
    What do I have do to do that? What commands do I need to apply?
  • pburtonpburton Member Posts: 2
    I found this thread as I tried to determine whether I was mining. It is unfortunate that there doesn't seem to be a clear indicator. Just while I am exploring Ethereum, I have geth running on a linux host with 25 cores assigned. There are no GPUs available and I know this configuration will never be profitable, but it will let me explore Ethereum.

    I am sync'd to the main line (took about 13 hours)
    > eth.syncing
    false
    >
    And my log is a commit line for every import like cidmo said above.

    I can understand having a 0 balance as I have only been mining for about 3 days. What I don't understand is my hash rate.
    > eth.hashrate
    0
    >

    Is this because I haven't mined anything yet, so geth has no idea what my cpu hashrate is? I don't know if 0 is the correct value once sync'd but not having solved a block yet; or should eth.hashrate display >0 and a value of 0 means I am not configured correctly and I will never hash any inputs?

    Appreciate you insight.
  • rmhrmh Member Posts: 410 ✭✭✭
    Core i7-3610QM produces this:
    > eth.hashrate
    33285
    > miner.getHashrate();
    33285
    Maybe your hashrate is really that low. :) Mining with cpu was pointless two years ago.
    If you want to experiment, make a private chain, there you'll get coins with any hardware :)
    https://souptacular.gitbooks.io/ethereum-tutorials-and-tips-by-hudson/content/private-chain.html
Sign In or Register to comment.