18:03:09 hyc this code https://github.com/monero-project/monero/blob/master/src/cryptonote_core/cryptonote_tx_utils.cpp#L702 makes monerod never use the dataset to verify blocks, even if the dataset is there when solo mining 18:03:14 was it done on purpose? 18:03:35 miners == 0 when it's called to verify a block 18:04:56 trying to get the last few ms off block transmission for p2pool? 18:06:21 yeah 18:13:39 I just wrote a patch for my own nodes to make it always use the dataset even without mining, testing it now 18:46:09 sech1: no, the intention was to let it use the dataset if the miner was already active 18:46:27 haven't looked at that code in a while... 18:46:28 I tested it with active miner today 18:46:34 it doesn't use the dataset 18:46:43 so yeah if it's not using it, that's a bug 18:48:37 https://github.com/monero-project/monero/blob/master/src/cryptonote_core/blockchain.cpp#L4276 18:48:45 it should pass something different from "0" here 18:51:14 it doesn't look like a bug, more like a incomplete feature 18:55:08 chane this https://github.com/monero-project/monero/blob/master/src/crypto/rx-slow-hash.c#L335 18:55:25 change it to check if miners || dataset already init'd 18:56:57 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 18:57:22 i.e. when you start monerod, let it run for a while, then do `start_mining` in console 19:00:23 my code hack makes it always create the dataset which is good enough for my nodes 19:00:30 ah. and that's not a problem for a miner because they start on their own threads 19:00:31 but I don't see how to untangle it easily 19:02:14 yeah that means you need to tell other threads to recreate their VMs 19:03:14 and then you need to track if it's still available after rx_stop_mining() 19:03:48 quite a hassle 19:04:51 right, my code hack will crash monerod if I start and then stop mining :D 19:08:05 maybe something like "if (rx_dataset && vm doesn't use it) { recreate_vm(); }" 19:08:19 and "if (!rx_dataset && vm uses it) { recreate_vm(); }" 19:09:18 yeah. and maybe add a refcounter for the dataset 19:09:26 randomx API doesn't even have this function 19:09:32 to check if a VM is using dataset 19:10:24 we can just make it another thread-local variable in rx-slow-hash.c 19:11:09 but might be a useful thing to add to librandomx 19:13:52 mining can be stopped while block is being verified, so ref counter needed 19:14:00 I don't want to open this can of worms, let it be for now :D 19:14:09 lol 19:21:53 my hacked code thath I put together quickly: https://paste.debian.net/hidden/86c73b99/ 19:22:01 testing it on one of my nodes 19:22:12 need to test at least one RandomX epoch change :D 19:22:56 it prints a warning if rx_slow_hash took more than 3 ms (so not using dataset or stalled by something else) 19:23:54 you could also just remove the step that destroys the dataset in stop_mining