Skip to content

Instantly share code, notes, and snippets.

@bitcoinfees
bitcoinfees / feemodel.log.080316
Created March 13, 2016 05:40
feemodel log for 28/2/16-8/3/16
2016-02-28 00:15:18,678 Block 400334 (999988 bytes) by F2Pool, SFR/akn/bkn: 13560/(2054, 2060)/(38, 40)
2016-02-28 00:16:28,783 Block 400335 (289749 bytes) by 152f1muMCNa7_, SFR/akn/bkn: 10009/(188, 190)/(8, 9)
2016-02-28 00:23:15,074 Block 400336 (465926 bytes) by BitFury, SFR/akn/bkn: 5004/(839, 840)/(0, 0)
2016-02-28 00:27:17,194 Block 400337 (295509 bytes) by F2Pool, SFR/akn/bkn: 5272/(561, 565)/(0, 0)
2016-02-28 00:32:10,544 Block 400338 (364089 bytes) by F2Pool, SFR/akn/bkn: 5266/(650, 651)/(0, 0)
2016-02-28 00:36:43,366 Block 400339 (339737 bytes) by BitFury, SFR/akn/bkn: 5887/(583, 586)/(0, 0)
2016-02-28 00:54:00,417 Block 400340 (933853 bytes) by KnCMiner, SFR/akn/bkn: 14357/(1901, 1909)/(30, 30)
2016-02-28 01:41:58,239 Block 400341 (999872 bytes) by F2Pool, SFR/akn/bkn: 44292/(2005, 2014)/(1420, 1552)
2016-02-28 02:05:27,651 Block 400342 (934568 bytes) by AntPool, SFR/akn/bkn: 44247/(2331, 2374)/(1572, 1572)
2016-02-28 02:11:25,704 Block 400343 (749153 bytes) by AntPool, SFR/akn/bkn: 43478/(1226, 12
@bitcoinfees
bitcoinfees / mempool.py
Last active January 21, 2016 07:05
Python script to save / load bitcoin mempool to/from disk
"""
Script to write mempool to disk (pickle) and subsequently load it.
Requires python-bitcoinlib > 0.5.0
python mempool.py <write|read> filename
"""
import sys
import pickle
from collections import defaultdict
"""
Simulation to estimate the rate of occurrences of the event
'>= 48 blocks in 4 hours'.
"""
from random import expovariate
BLOCKRATE = 1. / 600 # Once per 10 min, the equilibrium block rate
NUMBLOCKS = 144*365*1000 # 1000 years of simulation
# Event constants
@bitcoinfees
bitcoinfees / rmpools.py
Last active August 29, 2015 14:19
Remove stale pools from blockchain.info's known pools.json
"""Remove stale pool signatures.
Count the occurrences of pools.json signatures, and remove all
that have not been seen in <expiry> blocks.
pools.json is from: https://github.com/blockchain/Blockchain-Known-Pools
usage: python rmpools.py <expiry> <path to pools.json>
requirements: python2.7