TeamEmpireCoin / EmpireCoin

EmpireCoin is an experimental cryptocurrency where players vote on outcomes to win coins
http://empirecoin.org
MIT License
2 stars 2 forks source link

New blocks not being generated on testnet despite mining #6

Closed joeyfrich closed 8 years ago

joeyfrich commented 8 years ago

See both shared Ubuntu testing servers. Testnet seems to be stuck at 911 blocks, even after leaving these servers mining for a period of weeks. I don't see any helpful error messages in debug.log

Could this be related to a fork, or the change of COINBASE_MATURITY from 100 to 10?

xmadisco commented 8 years ago

Well yeah, that's a network rule, for most changes that you're requesting (i.e. changing voting payout, etc), we have to start the testnet over. Sometimes re-hash the genesis block too. For now, let's restart testnet and debug from there.

joeyfrich commented 8 years ago

Ok great, let's do it that way.

joeyfrich commented 8 years ago

I'm not sure if the testnet reboot was successful, maybe we need to try again.

The latest core code is now running on both shared dev machines under the empirecoin user. But new blocks are not being generated. The top command shows 99% CPU usage on the empirecoind process.

xmadisco commented 8 years ago

I don't know what you mean. I just started up a client, and mined us up to block 360. Need more detail.

xmadisco commented 8 years ago

See issue #13. I think you're confusing what's needed here and perhaps not being careful enough about controlling how the testnet is managed. One simple slip up that allows a connect to a node on the 'old testnet' will destroy your new testnet in an instant.

I've successfully re-created the blockchain many times already, so either make sure you're able to do it on your own in an isolated environment, or make sure everyone participating knows exactly what to do (it's very difficult to get everyone on board, so it's easiest to do this in a controlled environment on your own with exactly 2 nodes).

My guess is that 1) you're nodes are not fully sync'd on the right blockchain, or 2) you're mining on a node not connected to another node. Those are the only times I've seen stuck blocks. And as I mentioned, I don't know how you're connecting to the testnet I setup, but I was able to mine some blocks easily.

joeyfrich commented 8 years ago

Ok I followed that recommendation and was able to get a clean reboot of testnet.

My first 37 blocks were mined almost instantly, but I've been stuck on block 37 for over an hour now.

joeyfrich commented 8 years ago

Just tried again by starting a clean testnet with 3 nodes. 2 were in sync and quickly reached 199 blocks, then stopped getting new blocks. The other (debug.log.txt) had this error early on and only reached 10 blocks: "2015-12-10 18:12:11 ERROR: AcceptBlock() : incorrect proof of work"

debug.log.txt debug-139.log.txt debug-212.log.txt

xmadisco commented 8 years ago

Just a heads up -- for testnet as it is now, DO NOT have more than one miner mining at a time. The difficulty is set to not move and it's at the lowest it can possibly be. A single weak CPU can provide more than enough mining power for the whole testnet.

The accept block error just stops listening to the other peer if it receives a bad block, which effectively halts the network.

Much later on, the actual error appears, which is the coinbase value check -- I'll add an issue.

joeyfrich commented 8 years ago

I'm still experiencing this issue. I can usually mine ~100 blocks quickly before mining halts. Sometimes running "setgenerate false" and then "setgenerate true" gets blocks to start being created again, but other times it does not. This is on a setup of two connected nodes, only one of which is mining.

It sounds like this may be a quirk related to the low difficulty, in which case could we just bump up the difficulty slightly to fix the problem?

xmadisco commented 8 years ago

The difficulty shouldn't affect anything. What does it mean that mining halts? Are blocks being generated but not accepted? Does the mining stop because new work can't be produced? Can you skim the logs and provide relevant info?

xmadisco commented 8 years ago

Closing since I cannot reproduce. Re-open with more details if the next testnet has this issue.