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.
root@bitcoin:/var/lib/p2pool/p2pool/p2pool# git diff work.py
diff --git a/p2pool/work.py b/p2pool/work.py
index 7c5823b..d1bbec8 100644
--- a/p2pool/work.py
+++ b/p2pool/work.py
@@ -1,6 +1,7 @@
from __future__ import division
import base64
+import csv
import random
import sys
import time
@@ -281,6 +282,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
received_header_hashes = set()
def got_response(header, user, coinbase_nonce):
+ got_block, got_share = False, False
assert len(coinbase_nonce) == self.COINBASE_NONCE_LENGTH == 4
new_packed_gentx = packed_gentx[:-4-4] + coinbase_nonce + packed_gentx[-4:] if coinbase_nonce != '\0'*self.COINBASE_NONCE_LENGTH else packed_gentx
new_gentx = bitcoin_data.tx_type.unpack(new_packed_gentx) if coinbase_nonce != '\0'*self.COINBASE_NONCE_LENGTH else gentx
@@ -291,6 +293,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
if pow_hash <= header['bits'].target or p2pool.DEBUG:
helper.submit_block(dict(header=header, txs=[new_gentx] + other_transactions), False, self.node.factory, self.node.bitcoind, self.node.bitcoind_work, self.node.net)
if pow_hash <= header['bits'].target:
+ got_block = True
print 'GOT BLOCK FROM MINER! Passing to bitcoind! %s%064x' % (self.node.net.PARENT.BLOCK_EXPLORER_URL_PREFIX, header_hash)
@@ -332,6 +335,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
log.err(None, 'Error while processing merged mining POW:')
if pow_hash <= share_info['bits'].target and header_hash not in received_header_hashes:
+ got_share = True
share = get_share(header, pack.IntType(32).unpack(coinbase_nonce))
print 'GOT SHARE! %s %s prev %s age %.2fs%s' % (
@@ -364,6 +368,15 @@ class WorkerBridge(worker_interface.WorkerBridge):
print >>sys.stderr, 'Worker %s submitted share more than once!' % (user,)
else:
received_header_hashes.add(header_hash)
+
+ # P2POOL SHARE LOGGING
+ try:
+ with open('/tmp/p2pool-%s-shares.csv' % self.net.SYMBOL, 'ab') as csvfile:
+ diff = bitcoin_data.target_to_difficulty(target) * 1e-8
+ writer = csv.writer(csvfile)
+ writer.writerow([time.time(), self.net.SYMBOL, user, diff, on_time, got_share, got_block])
+ except:
+ log.err(None, 'Could not save share to pool database')
self.pseudoshare_received.happened(bitcoin_data.target_to_average_attempts(target), not on_time, user)
self.recent_shares_ts_work.append((time.time(), bitcoin_data.target_to_average_attempts(target)))
root@bitcoin:/var/lib/p2pool/p2pool/p2pool# git diff work.py
diff --git a/p2pool/work.py b/p2pool/work.py
index 7c5823b..d1bbec8 100644
--- a/p2pool/work.py
+++ b/p2pool/work.py
@@ -1,6 +1,7 @@
from __future__ import division
import base64
+import csv
import random
import sys
import time
@@ -281,6 +282,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
received_header_hashes = set()
def got_response(header, user, coinbase_nonce):
+ got_block, got_share = False, False
assert len(coinbase_nonce) == self.COINBASE_NONCE_LENGTH == 4
new_packed_gentx = packed_gentx[:-4-4] + coinbase_nonce + packed_gentx[-4:] if coinbase_nonce != '\0'*self.COINBASE_NONCE_LENGTH else packed_gentx
new_gentx = bitcoin_data.tx_type.unpack(new_packed_gentx) if coinbase_nonce != '\0'*self.COINBASE_NONCE_LENGTH else gentx
@@ -291,6 +293,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
if pow_hash <= header['bits'].target or p2pool.DEBUG:
helper.submit_block(dict(header=header, txs=[new_gentx] + other_transactions), False, self.node.factory, self.node.bitcoind, self.node.bitcoind_work, self.node.net)
if pow_hash <= header['bits'].target:
+ got_block = True
print 'GOT BLOCK FROM MINER! Passing to bitcoind! %s%064x' % (self.node.net.PARENT.BLOCK_EXPLORER_URL_PREFIX, header_hash)
@@ -332,6 +335,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
log.err(None, 'Error while processing merged mining POW:')
if pow_hash <= share_info['bits'].target and header_hash not in received_header_hashes:
+ got_share = True
share = get_share(header, pack.IntType(32).unpack(coinbase_nonce))
print 'GOT SHARE! %s %s prev %s age %.2fs%s' % (
@@ -364,6 +368,15 @@ class WorkerBridge(worker_interface.WorkerBridge):
print >>sys.stderr, 'Worker %s submitted share more than once!' % (user,)
else:
received_header_hashes.add(header_hash)
+
+ # P2POOL SHARE LOGGING
+ try:
+ with open('/tmp/p2pool-%s-shares.csv' % self.net.SYMBOL, 'ab') as csvfile:
+ diff = bitcoin_data.target_to_difficulty(target) * 1e-8
+ writer = csv.writer(csvfile)
+ writer.writerow([time.time(), self.net.SYMBOL, user, diff, on_time, got_share, got_block])
+ except:
+ log.err(None, 'Could not save share to pool database')
self.pseudoshare_received.happened(bitcoin_data.target_to_average_attempts(target), not on_time, user)
self.recent_shares_ts_work.append((time.time(), bitcoin_data.target_to_average_attempts(target)))
@@ -364,6 +369,15 @@ class WorkerBridge(worker_interface.WorkerBridge):
print >>sys.stderr, 'Worker %s submitted share more than once!' % (user,)
else:
received_header_hashes.add(header_hash)
+
+ # P2POOL SHARE LOGGING
+ try:
+ with open('/tmp/p2pool-shares.csv', 'ab') as csvfile:
+ diff = bitcoin_data.target_to_difficulty(target) * 1000000000
+ writer = csv.writer(csvfile)
+ writer.writerow([time.time(), user, diff, on_time, got_share, got_block])
+ except:
+ log.err(None, 'Could not save share to pool database')
self.pseudoshare_received.happened(bitcoin_data.target_to_average_attempts(target), not on_time, user)
self.recent_shares_ts_work.append((time.time(), bitcoin_data.target_to_average_attempts(target)))
root@bitcoin:/var/lib/p2pool/p2pool/p2pool# git diff work.py
diff --git a/p2pool/work.py b/p2pool/work.py
index 7c5823b..a4c3f38 100644
--- a/p2pool/work.py
+++ b/p2pool/work.py
@@ -5,6 +5,8 @@ import random
import sys
import time
+import csv
+
from twisted.internet import defer
from twisted.python import log
@@ -281,6 +283,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
received_header_hashes = set()
def got_response(header, user, coinbase_nonce):
+ got_block, got_share = False, False
assert len(coinbase_nonce) == self.COINBASE_NONCE_LENGTH == 4
new_packed_gentx = packed_gentx[:-4-4] + coinbase_nonce + packed_gentx[-4:] if coinbase_nonce != '\0'*self.COINBASE_NONCE_LENGTH else packed_gentx
new_gentx = bitcoin_data.tx_type.unpack(new_packed_gentx) if coinbase_nonce != '\0'*self.COINBASE_NONCE_LENGTH else gentx
@@ -291,6 +294,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
if pow_hash <= header['bits'].target or p2pool.DEBUG:
helper.submit_block(dict(header=header, txs=[new_gentx] + other_transactions), False, self.node.factory, self.node.bitcoind, self.node.bitcoind_work, self.node.net)
if pow_hash <= header['bits'].target:
+ got_block = True
print 'GOT BLOCK FROM MINER! Passing to bitcoind! %s%064x' % (self.node.net.PARENT.BLOCK_EXPLORER_URL_PREFIX, header_hash)
@@ -332,6 +336,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
log.err(None, 'Error while processing merged mining POW:')
if pow_hash <= share_info['bits'].target and header_hash not in received_header_hashes:
+ got_share = True
share = get_share(header, pack.IntType(32).unpack(coinbase_nonce))
print 'GOT SHARE! %s %s prev %s age %.2fs%s' % (
@@ -364,6 +369,16 @@ class WorkerBridge(worker_interface.WorkerBridge):
print >>sys.stderr, 'Worker %s submitted share more than once!' % (user,)
else:
received_header_hashes.add(header_hash)
+
+ # P2POOL SHARE LOGGING
+ if got_share or got_block:
+ try:
+ with open('/tmp/p2pool-shares.csv', 'ab') as csvfile:
+ writer = csv.writer(csvfile)
+ writer.writerow([time.time(), user, on_time, got_share, got_block])
+ except:
+ log.err(None, 'Could not save share to pool database')
+
self.pseudoshare_received.happened(bitcoin_data.target_to_average_attempts(target), not on_time, user)
self.recent_shares_ts_work.append((time.time(), bitcoin_data.target_to_average_attempts(target)))
root@bitcoin:/var/lib/p2pool/p2pool/p2pool# git diff work.py
diff --git a/p2pool/work.py b/p2pool/work.py
index 7c5823b..a4c3f38 100644
--- a/p2pool/work.py
+++ b/p2pool/work.py
@@ -5,6 +5,8 @@ import random
import sys
import time
+import csv
+
from twisted.internet import defer
from twisted.python import log
@@ -281,6 +283,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
received_header_hashes = set()
def got_response(header, user, coinbase_nonce):
+ got_block, got_share = False, False
assert len(coinbase_nonce) == self.COINBASE_NONCE_LENGTH == 4
new_packed_gentx = packed_gentx[:-4-4] + coinbase_nonce + packed_gentx[-4:] if coinbase_nonce != '\0'*self.COINBASE_NONCE_LENGTH else packed_gentx
new_gentx = bitcoin_data.tx_type.unpack(new_packed_gentx) if coinbase_nonce != '\0'*self.COINBASE_NONCE_LENGTH else gentx
@@ -291,6 +294,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
if pow_hash <= header['bits'].target or p2pool.DEBUG:
helper.submit_block(dict(header=header, txs=[new_gentx] + other_transactions), False, self.node.factory, self.node.bitcoind, self.node.bitcoind_work, self.node.net)
if pow_hash <= header['bits'].target:
+ got_block = True
print 'GOT BLOCK FROM MINER! Passing to bitcoind! %s%064x' % (self.node.net.PARENT.BLOCK_EXPLORER_URL_PREFIX, header_hash)
@@ -332,6 +336,7 @@ class WorkerBridge(worker_interface.WorkerBridge):
log.err(None, 'Error while processing merged mining POW:')
if pow_hash <= share_info['bits'].target and header_hash not in received_header_hashes:
+ got_share = True
share = get_share(header, pack.IntType(32).unpack(coinbase_nonce))
print 'GOT SHARE! %s %s prev %s age %.2fs%s' % (
@@ -364,6 +369,16 @@ class WorkerBridge(worker_interface.WorkerBridge):
print >>sys.stderr, 'Worker %s submitted share more than once!' % (user,)
else:
received_header_hashes.add(header_hash)
+
+ # P2POOL SHARE LOGGING
+ if got_share or got_block:
+ try:
+ with open('/tmp/p2pool-shares.csv', 'ab') as csvfile:
+ writer = csv.writer(csvfile)
+ writer.writerow([time.time(), user, on_time, got_share, got_block])
+ except:
+ log.err(None, 'Could not save share to pool database')
+
self.pseudoshare_received.happened(bitcoin_data.target_to_average_attempts(target), not on_time, user)
self.recent_shares_ts_work.append((time.time(), bitcoin_data.target_to_average_attempts(target)))