-
m-relay<dark_sky:monero.social> Is anyone aware of any rust project using RandomX, bindings , etc... ?
-
m-relay<boog900:monero.social> github.com/tari-project/randomx-rs
-
parazydHey I'm doing some experiments with a regtest and solomining with my own proxy
-
parazydMonerod gives me a difficulty of "2568" and when I proxy the getblocktemplate to xmrig, I also see diff "2568" in xmrig
-
parazydHowever upon submitting a block, monerod logs: does not have enough proof of work: <hash> at height 2000001, unexpected difficulty: 2568
-
parazydAnd the block verification fails
-
parazydAnyone got an idea why this is happening?
-
parazydPerhaps relevant, I'm removing `extra_nonce` from xmrig's getblocktemplate request and replacing it with `reserve_size`
-
sech1if you modify xmrig's request, maybe you get a response that xmrig doesn't expect, and it computes wrong hashes.
-
parazydsech1: I am not modifying the difficulty though, and monerod says that it fails block verification with "unexpected difficulty". Could that error be misleading?
-
parazydIt's xmrig in daemon mode. What's the assumption in xmrig with its `extra_nonce` that it's sending as part of the getblocktemplate request?
-
parazydI doubt it should be trying to include that in the mined block in any way, since it's not building a block on its own, rather should be mining the one that it gets as a getblocktemplate response
-
parazydMy proxy is modifying blocktemplate_blob and then also updating the blockhashing_blob
-
sech1Maybe you calculate blockhashing_blob wrong
-
sech1xmrig expects extra_nonce to be 8 bytes
-
parazyd
-
sech1Try to check if you get the same hashing blob if you don't modify the template
-
parazydOkay
-
parazydhm interesting, the Rust code prepends a byte
-
parazydPossibly VarInt
-
parazyd
-
parazyd:)
-
sech1monero-rs has a lot of bugs, especially in the rarely used parts of the code
-
parazydWell it's free software, so we can fix it :)
-
parazydsech1: Thanks for the pointer, it works with this change: monero-rs/monero-rs #194/files
-
parazyd(Removing the prepended VarInt)