This comes happening being some time with me and i'm getting upset about it. In some terminal, i start geth with:

geth -rpc --mine --fast --cache=1024

And in another terminal i start mine with my GPU with:

ethminer -G --farm-recheck 200

So i get into the console with the third terminal using:

geth attach

There i can list my two wallets

> eth.accounts
["0x2d8a0028428d556882818d9a8d2d1ed7a0aed609", "0x1657ea92300a544aee12a1b57f7ef2a2f37bbc24"]

And with some time, i can even see some ether comming:

> web3.fromWei(eth.getBalance(eth.coinbase), "ether");

But, if a close the first geth (with the -rpcflag), when i restart it, my balance shows 0. At the Etherscan my account still showing 0 eth. I tried to make a transaction from my primary account to the second, with something like:

eth.sendTransaction({from:eth.coinbase, to:"0x1657ea92300a544aee12a1b57f7ef2a2f37bbc24", value: web3.toWei(90, "ether")})

But i got the erro that i'm exceeding gas limit, and sure i'm, 'cause when i aks for my gasLimit, with

> eth.getBlock("latest").gasLimit

I got something near 5060. Some other status of my geth right now:

> net.listening
> eth.getBlock("latest").number
> net.peerCount
> eth.syncing
  currentBlock: 3123614,
  highestBlock: 4253828,
  knownStates: 10525102,
  pulledStates: 10519480,
  startingBlock: 0

There is almost 2 days that my geth -rpc console still importing new blocks and states. How can i make my ether account keeps my balance from every time i reset the -rpc server? I found here that a genesis.json would limit my gasLimit, but i just find how to initialize a new server with sending the json file, how can i update a existing one?


I know I've answered this before, but I can't find it, so I assume the original poster has deleted the question. (If someone can find it, please mark this post as a duplicate!)

Your node isn't fully synced, so when you find a block, you're actually creating a fork on the blockchain. But your fork is not the longest chain and therefore not the one that everyone is using (such as on Etherscan). Whenever your geth receives some new blocks and it sees that the other chain is longer than the one you've been working on, it realizes the ether it thinks you earned is only in your fork. Thus, it "resets" the balance to what everyone else thinks your balance is (which, in this case, is 0). If you had an ether in block 1000, you could "spend" it on your fork and your balance would keep resetting to 1 (at least until you were synced up to the point in time your transaction was actually broadcast). I'm assuming the gas limit is being exceeded because you have no ether with which to fund the transaction.

You're also finding a lot of blocks easily because you're building on the blockchain in an earlier state where the mining difficulty was lower. If you've found 95 ether in, say, the span of a week, you'd needed to have had around 500TH/s of mining capacity (or more than 15 000 GPUs of the R9 580 variety).

  • So i just have to wait until it get fully synced, my balance should get reset to 0 and than i should start mining properly? Or right now i would keep in this fork forever if i don't stop the geth? – Ziul Sep 9 '17 at 16:07
  • If you want to solo mine, you should let your geth fully sync before mining. Otherwise, you're definitely just wasting electricity. – lungj Sep 9 '17 at 16:15

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