-
sech1
hyc this code
github.com/monero-project/monero/bl…e_core/cryptonote_tx_utils.cpp#L702 makes monerod never use the dataset to verify blocks, even if the dataset is there when solo mining
-
sech1
was it done on purpose?
-
sech1
miners == 0 when it's called to verify a block
-
DataHoarder
trying to get the last few ms off block transmission for p2pool?
-
sech1
yeah
-
sech1
I just wrote a patch for my own nodes to make it always use the dataset even without mining, testing it now
-
hyc
sech1: no, the intention was to let it use the dataset if the miner was already active
-
hyc
haven't looked at that code in a while...
-
sech1
I tested it with active miner today
-
sech1
it doesn't use the dataset
-
hyc
so yeah if it's not using it, that's a bug
-
sech1
-
sech1
it should pass something different from "0" here
-
sech1
it doesn't look like a bug, more like a incomplete feature
-
hyc
-
hyc
change it to check if miners || dataset already init'd
-
sech1
the problem with this is rx_vm is created per thread and if it's created before dataset is initialized, it won't use the dataset
-
sech1
i.e. when you start monerod, let it run for a while, then do `start_mining` in console
-
sech1
my code hack makes it always create the dataset which is good enough for my nodes
-
hyc
ah. and that's not a problem for a miner because they start on their own threads
-
sech1
but I don't see how to untangle it easily
-
hyc
yeah that means you need to tell other threads to recreate their VMs
-
sech1
and then you need to track if it's still available after rx_stop_mining()
-
hyc
quite a hassle
-
sech1
right, my code hack will crash monerod if I start and then stop mining :D
-
sech1
maybe something like "if (rx_dataset && vm doesn't use it) { recreate_vm(); }"
-
sech1
and "if (!rx_dataset && vm uses it) { recreate_vm(); }"
-
hyc
yeah. and maybe add a refcounter for the dataset
-
sech1
randomx API doesn't even have this function
-
sech1
to check if a VM is using dataset
-
hyc
we can just make it another thread-local variable in rx-slow-hash.c
-
hyc
but might be a useful thing to add to librandomx
-
sech1
mining can be stopped while block is being verified, so ref counter needed
-
sech1
I don't want to open this can of worms, let it be for now :D
-
hyc
lol
-
sech1
my hacked code thath I put together quickly:
paste.debian.net/hidden/86c73b99
-
sech1
testing it on one of my nodes
-
sech1
need to test at least one RandomX epoch change :D
-
sech1
it prints a warning if rx_slow_hash took more than 3 ms (so not using dataset or stalled by something else)
-
hyc
you could also just remove the step that destroys the dataset in stop_mining