moneroexamples / private-testnet

Setting private Monero testnet network
78 stars 33 forks source link

Error: Mining did not start -- BUSY #10

Open 19231224lhr opened 1 year ago

19231224lhr commented 1 year ago

I followed the steps in the README and executed the commands step by step. During the mining process after creating the node, when I executed the mining command in node 1(I set mining difficulty = 5 to make faster)

start_mining  9wviCeWe2D8XS82k2ovp5EUYLzBt9pYNW2LXUFsZiv8S3Mt21FZ5qQaAroko1enzw3eGr9qC7X1D7Geoo2RrAotYPwq9Gm8 1

an error message appeared: Error: Mining did not start -- BUSY. like this picture image the wallet1 also show a busy error: image My compoter is Ubuntu20.04 Thanks!

19231224lhr commented 1 year ago

The new question is : https://github.com/monero-project/monero/issues/8821. wuwu

moneroexamples commented 1 year ago

Which monero version are you using?

19231224lhr commented 1 year ago

Which monero version are you using?

My Monero is the newest which is release-v0.18

19231224lhr commented 1 year ago

Which monero version are you using?

My Monero is the newest which is release-v0.18

and I find that it can mine in the official testnet which shoud Synchronize block data... image

meglio commented 6 months ago

Same for me: I am running a Monero node in --regtest mode. generateblocks always returns status "BUSY". gen_info() does not say it is busy though.

Also, I run 2 monerod nodes in a docker container, and one of them is giving the following errors:

2024-01-17 08:14:12.500 [RPC0]  ERROR   net.p2p src/cryptonote_core/blockchain.cpp:2436 Client sent wrong NOTIFY_REQUEST_CHAIN: genesis block mismatch: 
2024-01-17 08:14:12.501 [RPC0]  ERROR   net.p2p src/cryptonote_core/blockchain.cpp:2436 id: <48ca7cd3c8de5b6a4d53d2861fbdaedca141553559f9be9520068053cda8430b>, 
2024-01-17 08:14:12.503 [RPC0]  ERROR   net.p2p src/cryptonote_core/blockchain.cpp:2436 expected: <418015bb9ae982a1975da7d79277c2705727a56894ba0fb246adaabb1f4632e3>,
dimalinux commented 6 months ago

@meglio:

Client sent wrong NOTIFY_REQUEST_CHAIN: genesis block mismatch:

It looks like you are trying to use a wallet that was created with a previous instantiation of your testnet. If you reset the blockchain, you'll need to reset the wallets too.

meglio commented 6 months ago

@dimalinux can it be that I was trying to run regtest wallets against testnet monero node? I discovered just recently that regtest is branched off mainnet, so it uses mainnet addresses, and of course a different genesis block. If this is the true reason, the error message would benefit from an improvement. It is now a guess game.

dimalinux commented 6 months ago

@meglio I think the "genesis block mismatch" error is clear for the small subset of people that see the message. If the genesis blocks differ, the wallet is communicating with a different blockchain than the one that it had previously synchronized with.

The --regtest flag is for isolated, single-node, private testing. Monerod won't communicate with any other node instances. I wouldn't use the word "testnet" to describe testing with the --regtest flag, as there is no network of nodes, and the testnet prefix will not be used in the first byte of decoded addresses. I would only use the word "testnet" to refer to monerod/monero-wallet-rpc instances that were passed the --testnet flag on startup.

While I suspect that you can use a regtest setup to fork the mainnet block chain when using the --keep-fakechain flag and setting the --data-dir to a copy of the mainnet blockchain, forking is not the way that I (nor probably most people) use it. When running tests, the easiest way to keep your sanity is to delete all test wallets every time you restart monerod with a new blockchain. You can place monerod's data directory and all the wallets synchronized with that monerod instance in the same temporary parent directory, then blow away the parent directory as soon as the tests complete and you have shut down monerod.

meglio commented 5 months ago

My point is that it is not clear at all that regtest uses network bytes of mainnet. It is not easily found in the documentation, and being one coming from Bitcoin programming, I expected regtest would differ from mainnet. So that's why I'm saying, the error message is confusing, it does not solve the goal of making the one making this error realize what the error is and what is the next step to fix it.