It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
import numpy as np
import numba
from numba import cuda, jit
from timeit import default_timer as timer
from fastecdsa import keys, curve
import secp256k1 as ice
# number of addresses to generate
num_generate=100000
# Run on CPU
def cpu(a):
with open('bench.cpu', 'w') as f_cpu:
for i in range(num_generate):
prvkey_dec = keys.gen_private_key(curve.P256)
prvkey_hex = "%064x" % prvkey_dec
wifc = ice.btc_pvk_to_wif(prvkey_hex)
wifu = ice.btc_pvk_to_wif(prvkey_hex, False)
uaddr = ice.privatekey_to_address(0, False, prvkey_dec)
caddr = ice.privatekey_to_address(0, True, prvkey_dec)
f_cpu.write(f'PrivateKey Hex: {prvkey_hex}\nWIF compressed: {wifc}\nWIF uncompressed: {wifu}\nAddress uncompressed: {uaddr}\nAddress compressed:{caddr}\n\n')
a[i]+= 1
# Run on GPU
numba.jit()
def gpu(b):
with open('bench.gpu', 'w') as f_gpu:
for i in range(num_generate):
prvkey_dec = keys.gen_private_key(curve.P256)
prvkey_hex = "%064x" % prvkey_dec
wifc = ice.btc_pvk_to_wif(prvkey_hex)
wifu = ice.btc_pvk_to_wif(prvkey_hex, False)
uaddr = ice.privatekey_to_address(0, False, prvkey_dec)
caddr = ice.privatekey_to_address(0, True, prvkey_dec)
f_gpu.write(f'PrivateKey Hex: {prvkey_hex}\nWIF compressed: {wifc}\nWIF uncompressed: {wifu}\nAddress uncompressed: {uaddr}\nAddress compressed:{caddr}\n\n')
#return b+1
if __name__=="__main__":
a = np.ones(num_generate, dtype = np.float64)
startCPU = timer()
cpu(a)
print("without GPU:", timer()-startCPU)
b = np.ones(num_generate, dtype = np.float64)
startGPU = timer()
gpu(b)
numba.cuda.profile_stop()
print("with GPU:", timer()-startCPU)
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
sudo apt -y install nvidia-cuda-toolkit nvidia-cuda-dev nvidia-driver
import os
os.environ['CUDA_VISIBLE_DEVICES'] = "0"
import numpy as np
import numba
from numba import cuda, jit
from timeit import default_timer as timer
from fastecdsa import keys, curve
import secp256k1 as ice
# Run on CPU
def cpu(a):
for i in range(100000):
dec = keys.gen_private_key(curve.P256)
HEX = "%064x" % dec
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
uaddr = ice.privatekey_to_address(0, False, dec)
caddr = ice.privatekey_to_address(0, True, dec)
a[i]+= 1
# Run on GPU
numba.jit()
def gpu(x):
dec = keys.gen_private_key(curve.P256)
HEX = "%064x" % dec
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
uaddr = ice.privatekey_to_address(0, False, dec)
caddr = ice.privatekey_to_address(0, True, dec)
return x+1
if __name__=="__main__":
n = 100000
a = np.ones(n, dtype = np.float64)
start = timer()
cpu(a)
print("without GPU:", timer()-start)
start = timer()
gpu(a)
numba.cuda.profile_stop()
print("with GPU:", timer()-start)
@numba.jit(target='cuda')
@numba.jit(target='gpu')
@numba.cuda.jit
@numba.jit()
conda install numba & conda install cudatoolkit
pip3 install numba numpy fastecdsa
import numpy as np
import numba
from numba import cuda, jit
from timeit import default_timer as timer
from fastecdsa import keys, curve
import secp256k1 as ice
# Run on CPU
def cpu(a):
for i in range(100000):
dec = keys.gen_private_key(curve.P256)
HEX = "%064x" % dec
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
uaddr = ice.privatekey_to_address(0, False, dec)
caddr = ice.privatekey_to_address(0, True, dec)
a[i]+= 1
# Run on GPU
@numba.jit(forceobj=True)
def gpu(x):
dec = keys.gen_private_key(curve.P256)
HEX = "%064x" % dec
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
uaddr = ice.privatekey_to_address(0, False, dec)
caddr = ice.privatekey_to_address(0, True, dec)
return x+1
if __name__=="__main__":
n = 100000
a = np.ones(n, dtype = np.float64)
start = timer()
cpu(a)
print("without GPU:", timer()-start)
start = timer()
gpu(a)
numba.cuda.profile_stop()
print("with GPU:", timer()-start)
.local/lib/python3.10/site-packages/numba/cuda/cudadrv/devices.py", line 231, in _require_cuda_context
with _runtime.ensure_context():
File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
return next(self.gen)
@numba.jit(forceobj=True)
from fastecdsa import keys, curve
import secp256k1 as ice
while True:
dec = keys.gen_private_key(curve.P256)
HEX = "%064x" % dec
wifc = ice.btc_pvk_to_wif(HEX)
wifu = ice.btc_pvk_to_wif(HEX, False)
uaddr = ice.privatekey_to_address(0, False, dec)
caddr = ice.privatekey_to_address(0, True, dec)
print(wifu, uaddr)
from random import randint
N = 115792089237316195423570985008687907852837564279074904382605163141518161494337
def inv(v): return pow(v, N-2, N)
def divnum(a, b): return ( (a * inv(b) ) % N )
i=0
#input2^^120 = 0x9fd24b3abe244d6c443df56fa494dc
input = 0x5f87 +1
delta = 12
gamma = 2
d1= 80
while i < 2**61:
d= (divnum(input,delta))
s = divnum(i,gamma) %N
result = divnum(d,s)
if result =0:
print("result",hex(result),"i",hex(i),"input",hex(input))
i = i +1
import pycuda.driver as cuda
import pycuda.autoinit
from pycuda.compiler import SourceModule
import numpy
#Working with integers
a = 126
a = numpy.int64(a)
a_gpu = cuda.mem_alloc(a.nbytes)
cuda.memcpy_htod(a_gpu, a)
mod = SourceModule("""
__global__ void doublify(int *a)
{
int idx = threadIdx.x + threadIdx.y*4;
a[idx] *= 2;
}
""")
func = mod.get_function("doublify")
func(a_gpu, block=(4,4,1))
a_doubled = numpy.empty_like(a)
cuda.memcpy_dtoh(a_doubled, a_gpu)
print(a_doubled)
print(a)
a = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140
OverflowError: int too big to convert