-
m-relay
<keepemup:matrix.org> Thanks, sech1
-
Kapun
After mining a block I will pass it to monerod and got error:
-
Kapun
`{'code': -7, 'message': 'Block not accepted'}`
-
Kapun
Is any change to see the reason in logs or more debug information?
-
moneromooo
Yes, on log level 1.
-
moneromooo
If you can't repro it, then no.
-
moneromooo
Was this mined with the node's builtin miner ?
-
Kapun
No, by xmrig
-
moneromooo
I suppose you can restart monerod with --log-level 1 --fixed-difficulty 1000 and mine another block. If it fails again, you'll know why.
-
moneromooo
Of course that block will be invalid, but you can "pop_block N" when done and restart without --fixed-difficulty 1000 to resync to the network.
-
moneromooo
It might be a broken db. In which case it'll likely be repeatable, and likely need a full resync.
-
Kapun
I don't want to restart production node.
-
Kapun
So I will make a request:
-
Kapun
`curl
127.0.0.1:38081/set_log_categories -d '{"categories": "*:INFO,net.p2p.msg:WARNING,net.p2p.traffic:WARNING,"}' -H 'Content-Type: application/json'`
-
Kapun
btw is it bad to run production mining node with prune enabling? can be latency here for accept blocks / create templates?
-
moneromooo
It is not bad.
-
moneromooo
You're unlikely to find a block in a reasonable amount of time to test this fwiw. Hence fixed difficulty.
-
moneromooo
I guess you can mdb_copy the db elsewhere to run a node with --fixed-difficulty 1000 on the copy.
-
moneromooo
(and I do mean mdb_copy, not cp)
-
Kapun
its fine, I rent nh power to test it.
-
Kapun
Some blocks accepted and some is not due to code -7, and coming to be orphaned.
-
Kapun
Want to know why
-
sech1
There is testnet for this
-
sech1
What's the point to rent nh power to mine real blocks if you're not sure your setup works 100%?
-
Kapun
Yes, you are right.
-
Kapun
Is adding extra data to a coinbase transaction the only method to distribute unique work to miner by a mining pool ?
-
Kapun
In some cases, Monero blocks contain numerous transactions in candidate, and computing the Merkle tree and hashing for each of the thousands of miners can be time-consuming.
-
Kapun
Is there a way to optimize this process?
-
sech1
Updating the extra nonce can be done in O(logN)
-
sech1
Coinbase tx hash changes, then you need to calculate logN hashes to update the Merkle root
-
Kapun
I thought you need to recalculate full merkle for each coinbase change.
-
sech1
I said Merkle root
-
sech1
And you need to recalculate it because it's a part of the hashing blob
-
selsta
.merges
-
xmr-pr
9023
-
selsta
.merge+ 9060 9061 9059 9056 9052 9053
-
xmr-pr
Added
-
Kapun
What is the maximum length of a fork chain in Monero? Can it be something like 8 blocks before being reorganized into the longest chain?
-
moneromooo
I think it can go up to 500000000. It'd have to start at the genesis block though.
-
moneromooo
8 blocks is valid, yes.
-
Kapun
And how the net decide to which one is pick as the main?
-
moneromooo
The one with most cumulative work.
-
moneromooo
If there is a draw, keep the first one you see.
-
selsta
.merge+ 9049
-
xmr-pr
Added