From dab7d01dc0357a926993e5205d02a063b6bdcda0 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Sat, 10 Dec 2022 18:30:59 +0100 Subject: Refactored rx-slow-hash.c - Straight-forward call interface: `void rx_slow_hash(const char *seedhash, const void *data, size_t length, char *result_hash)` - Consensus chain seed hash is now updated by calling `rx_set_main_seedhash` whenever a block is added/removed or a reorg happens - `rx_slow_hash` will compute correct hash no matter if `rx_set_main_seedhash` was called or not (the only difference is performance) - New environment variable `MONERO_RANDOMX_FULL_MEM` to force use the full dataset for PoW verification (faster block verification) - When dataset is used for PoW verification, dataset updates don't stall other threads (verification is done in light mode then) - When mining is running, PoW checks now also use dataset for faster verification --- src/cryptonote_core/blockchain.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cryptonote_core/blockchain.h') diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 4795fc55c..c61ce4466 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -1598,9 +1598,11 @@ namespace cryptonote /** * @brief sends new block notifications to ZMQ `miner_data` subscribers * + * @param height current blockchain height + * @param seed_hash seed hash to use for mining * @param prev_id hash of new blockchain tip * @param already_generated_coins total coins mined by the network so far */ - void send_miner_notifications(const crypto::hash &prev_id, uint64_t already_generated_coins); + void send_miner_notifications(uint64_t height, const crypto::hash &seed_hash, const crypto::hash &prev_id, uint64_t already_generated_coins); }; } // namespace cryptonote -- cgit v1.2.3