-
m-relay
<strawberry:monero.social> If 2 blocks are found by different miners at the same height around the same time, is there an objective rule to decide which one should "win", such as choosing the one which solves the highest difficulty, or will my node just pick the first one it sees?
-
m-relay
<strawberry:monero.social> In other words, is it possible for honest nodes to disagree on the top block despite having seen both candidates for it, based on which they saw first?
-
m-relay
<jeffro256:monero.social> Yes
-
m-relay
<jeffro256:monero.social> When cumulative difficulty is the same (which it would be for a 1 block disagreement), then nodes choose the first-seen block
-
m-relay
<strawberry:monero.social> In that case, you can't get all top block hashes via ZMQ unless there's an event I'm missing
-
m-relay
<strawberry:monero.social> That's kind of inconvenient for what I'm trying to do but thanks for answering
-
m-relay
<strawberry:monero.social> That's kind of inconvenient for what I'm trying to do but thanks for answering
-
m-relay
<redhawk18:matrix.org> does xmrig have its own implementation of randomx? Tevador's randomx project doesn't seem to be whats used in xmrig at all. Also what's the difference between the rx folder and randomx folder?
-
m-relay
<jeffro256:monero.social> Yes xmrig has its own implementation which far exceeds the speed of the reference impl
-
m-relay
<jeffro256:monero.social> rx and randomx folder where?
-
m-relay
<redhawk18:matrix.org> in src/crypto
-
m-relay
<redhawk18:matrix.org> Is there a doc/whitepaper explaining differences that were made over traditional randomx?
-
m-relay
<jbabb:cypherstack.com> it should produce the same outputs, but faster. not sure that xmrig made a whitepaper describing the specific differences
-
m-relay
<redhawk18:matrix.org> was Tevador's project at least the starting point so maybe I can use a difff tool to see the differences or was it developed from scratch?
-
m-relay
<jbabb:cypherstack.com> I'd go back in time/commits thru the history of xmrig/src/crypto/rx & randomx to check or ask xmrig or sech1
-
m-relay
<jbabb:cypherstack.com> may I ask the purpose? general auditing, learning, etc?
-
m-relay
<redhawk18:matrix.org> I'm building my own miner in rust for learning
-
m-relay
<redhawk18:matrix.org> its a better way to learn than just reading code forever
-
m-relay
<redhawk18:matrix.org> Maybe what I should do is use a premade crate for randomx and then try to optimize it with a rewrite later on
-
m-relay
<jbabb:cypherstack.com> agreed. cool project, link it here someday
-
m-relay
<jbabb:cypherstack.com> yeah I'd crawl back thru the commit history to the beginnings of src/crypto/rx and src/crypto/randomx if you want to compare those with tevador's impl
-
m-relay
<jbabb:cypherstack.com> and yeah use something premade at first imo, Rolling Your Own Crypto is supposed to be a Bad Thing
-
m-relay
<jbabb:cypherstack.com> (but I don't see the issue if you pass all the same unit tests/produce the same vectors)
-
m-relay
<redhawk18:matrix.org> does xmrig have premade tests I can run?
-
m-relay
<redhawk18:matrix.org> with crypto I've seen people try to mine the first block of the coin and such to verify it
-
m-relay
<redhawk18:matrix.org> I'm not sure if that would work because the algo on monero has changed a few times
-
m-relay
<ofrnxmr:monero.social> monero has regtest, but xmrig questions are likely out of scope for this room. perhaps p2pool or Monero PoW would be better