A simple doublespend-relay mining probability simulator
To explore a very specific question about whether widespread double-spend relay will result in miners more likely to mine DS, I wrote a crude simulator. It does not account for lots of variation in a real network, but I think it's a place to start.
Apologies for writing in Matlab, but this is the only thing I'm good enough at to cook up in an afternoon. It *should* run on Octave, but let me know if it doesn't.
The preliminary results might surprise you! Whether relaying immediately or with "trickle" logic, I found that DS relay does not seem to increase risk of tx2 mined over tx1. It might even improve it a tiny bit, though it's too thin to be significant.
I'll encourage people to give me ideas on how to improve this simulator as well as try running it themselves; one glaring problem is that inventory states are not communicated between two ends of a connection, but i think it's good enough for this purpose. Who knows, a keen observer might notice something in my code that renders the results dubious - I'll encourage that - but I figured we should do more data analysis instead of yelling at each other on Reddit and endless Github threads.
3 of 3 reviewers say it's worth paying for
0 of 3 reviewers say it's not worth paying for