Avatar
Reproducibility Matters
1912dbbc2491035b1a376b0acf47bf431d508ea5e4ecea644ffa79311849fa5d
Just a charlatan

Metal in the hands, metal in the ears.

I feel like this applies to specced protocols in general, but not sure about Bitcoin. The problem is that its consensus is always re-implemented from a reference client, and a bug free reimplementation is close to impossible imo.

I think it would take a long time until people would trust the new code base over the old one.

Even though the pay elsewhere is better, I absolutely prefer work on Bitcoin Core. It is an inspiring project.

The donkey's running again.

The only boost I want is for my morale.

Replying to Avatar waxwing

It took a bit of digging but I believe this is the commit that introduced the use of MT19937 into libbitcoin:

https://github.com/libbitcoin/libbitcoin-system/commit/6d5a06e283d81260165e0eab95175069bf03b408

I would like to hear from Eric what was the thought process behind this.

It's widely known (and certainly was, back then) that seeding a PRNG with a mersenne twister is not cryptographically secure. In the case of 32 bit MT19937 it's even comically insecure as you can just brute force every possible seed (you can also 'play back' earlier MT output if you see enough outputs in sequence).

But, the thing is, in that commit you can see that the approach taken is to use uniform_int_distribution taken from the std library, then seed it. As far as I can tell this function is platform dependent/implementation dependent and certainly not claimed to be cryptographically secure. What is going on here? Was there never an attempt in libbitcoin to use cryptographically secure random numbers? There is probably a bit more to the story.

I'm also curious about the rationale, once you're jumping to system time as your entropy, why not just use a proper random device?

The grill is too high up, but we'll make do.

#foodstr

"I thought it would be more fun for reviewers"