logoalt Hacker News

OsrsNeedsf2Pyesterday at 4:20 PM3 repliesview on HN

Can someone explain to me why RandomX miners don't just generate programs without branching? I'm a bit confused on why that's not possible


Replies

captn3m0yesterday at 5:39 PM

The program is randomly generated and I am guessing that the seed for this is deterministically determined from the current block head (or something similar) making it hard to attack.

It might lead to scenarios where a miner may optimise block generation itself, I guess?

I was more curious about the possibility of generating optimised branchless variants and then running them in parallel on multiple ASICs to ensure you cover every branch and submit all the results and hope you’re fast? Would that be more inefficient than relying on branch prediction and CPUs?

show 1 reply
kedihackeryesterday at 5:44 PM

It can skip but it has 7 more programs to go and it can only know the program after completing the first one so after first one there is no advantage

tardedmemeyesterday at 4:39 PM

Because it's designed to be hard to execute on anything that is not a CPU.

show 1 reply