Open agent-0007 opened 4 years ago
Looks like it dies when
fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141
is within the very first batch of keys brainflayer processes, but will handle a zero key fine otherwise.
If you set the starting key to fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0360000
it will work fine and then wrap around, but i should see if i can turn off the asserts in libsecp256k1
This is minor bug, i think the reason in brainflayer start. I haven't looked closely at your code, but suppose that when brainflayer start calculating it trys to calculate 300000+ values, and when seed in the end, it can't do that. If you run bf with values (fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140 - 7A120) it will work correctly and start searchng at the start of seed 0000...001. I repot this, because don't know it's a bug or a future. May be seed have undocumented featuers.
Starting with fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364142
, values aren't valid private keys, most implementations just wrap around to 0000000000000000000000000000000000000000000000000000000000000001
. Doesn't seem worth the performance hit to special case.
Hi. Possible brainflayer not work correctly at the end of seed.
The first valid private key in hexadecimal is 0000000000000000000000000000000000000000000000000000000000000001 and the last valid private key in hexadecimal is fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140
brainflayer -v -I fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140 -b example.blf secp256k1/src/field_impl.h:238: test condition failed: secp256k1_fe_normalizes_to_zero_var(&c) Aborted
I also try fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd036413b, and result the same.