How many keys are you trying to generate?!
For me to make a 2^32 DB, it took over 5 hours. I used the low memory script and wrote to file 2^26 keys, roughly every 5 minutes. 64 (2^32 / 2^26) x 5 minutes = 320 minutes
Also, just for info, a DB with 2^32 values = 524 MB (incredible!)
Can you share your script to create the database file?
I want to create a file of size 2000000000 keys to test on puzzle 65.
I have it prefilled out for you:
#@mcdouglasx
import secp256k1 as ice
from bitstring import BitArray
import bitcoin
print("Making Binary Data-Base")
target_public_key = "0230210c23b1a047bc9bdbb13448e67deddc108946de6de639bcc75d47c0216b1b"
target = ice.pub2upub(target_public_key)
num = 2000000000 # number of keys.
sustract = 1 #amount to subtract each time.
Low_m= 200
#2^28 / 2^ 26 = 4
#2^29 / 2^26 = 8
#2^30 / 2^26 = 16
#2^32 / 2^26 = 64
lm= num // Low_m
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(lm, target, sustract_pub)
binary = ''
for t in range (lm):
h= (res[t*65:t*65+65]).hex()
hc= int(h[2:], 16)
if str(hc).endswith(('0','2','4','6','8')):
A="0"
binary+= ''.join(str(A))
if str(hc).endswith(('1','3','5','7','9')):
A="1"
binary+= ''.join(str(A))
my_str = bytes(BitArray(bin=binary))
binary_file = open('130Bit.bin', 'wb')
binary_file.write(my_str)
binary_file.close()
for i in range (1,Low_m):
mem= ice.to_cpub(ice.scalar_multiplication(lm).hex())
Apk= bitcoin.multiply(mem, i)
Apk_upu= ice.pub2upub(Apk)
A1= ice.point_addition(target, Apk_upu)
sustract_pub= ice.scalar_multiplication(sustract)
res= ice.point_loop_subtraction(lm, A1, sustract_pub)
binary = ''
for t in range (lm):
h= (res[t*65:t*65+65]).hex()
hc= int(h[2:], 16)
if str(hc).endswith(('0','2','4','6','8')):
A="0"
binary+= ''.join(str(A))
if str(hc).endswith(('1','3','5','7','9')):
A="1"
binary+= ''.join(str(A))
my_str = bytes(BitArray(bin=binary))
binary_file = open('65Bit.bin', 'ab')
binary_file.write(my_str)
binary_file.close()
It will write to file, every 10,000,000 keys.
Let me know if it works for you.