Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block chris-belcher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
import matplotlib
import numpy.random
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
cumulative = True
chris-belcher /
Last active Apr 13, 2019
#run with
#/path/to/bitcoin/bin/bitcoin-cli getpeerinfo | python
#output looks like
#zlato@zlato:~/bitcoin-0.17.1/bin$ ./bitcoin-cli getpeerinfo | python
# id addr user-agent iB se re conn'd ping serv lastr
# # host oO nt cv MMDD-HHMM msec ices HHMMSS
# 414 /Satoshi:0.17.1/ oF 20M 28M 0411-2005 358 LNBW 121021
# 417 /Satoshi:0.15.1/ oF 17M 46M 0411-2006 163 NBW 121019
chris-belcher /
Last active Mar 29, 2019
DSPV Security - Miner-resistant design of lightweight bitcoin wallets

edit: this scheme has serious problems, see the comments

DSPV security - Miner-Resistant Design of Lightweight Bitcoin Wallets


What are lightweight wallets

Lightweight wallets are ones which are not full nodes. Lots of people use them because full nodes are costly: they cost time to setup/synchronize, education, disk space, bandwidth, RAM and a few other resources.

chris-belcher / forkers-we-re-not-raising-a-single-byte.txt
Last active Dec 28, 2017
Forkers, we're not raising a single byte
View forkers-we-re-not-raising-a-single-byte.txt
In cryptoland, cypherpunks get clever
Belief in freedom switches off never
So long as nodes are run, bitcoin stays untorn
Six an hour, new blocks are born
To honest miners, new coins are bestow
Going above 21 million is a no
[chorus x2]
View relaybot.config
#Can override these defaults per-section.
#Twisted's default is 30 seconds.
#A single channel to join, or a list of channels: #a-bridged-channel,#some-other-channel
#Can change to allow more specialized behavior.
chris-belcher /
Last active Dec 18, 2017
View from
#copyright # Copyright (C) 2013,2015 by Daniel Kraft <> and phelix /
import base64
import httplib
import json
class JsonRpcError(Exception):
def __init__(self, obj):
self.code = obj["code"]
chris-belcher /
Last active Jul 25, 2017
JoinMarket release 0.2.0 ameliorates this snooping attack.
View raw-privkey-dangers.txt
behave un-intuatively
'giving' a key to someone still means you have it
change addresses / paper wallets
chris-belcher /
Created Dec 14, 2016
IRC script which sends its own pings without creating any other threads
#irc script which sends its own pings without creating any other threads
import socket, random
from datetime import datetime
nick = 'testbot-' + hex(random.randint(0, 0xffffff))[2:]
hostport = ('', 6667)
ping_interval_seconds = 30
ping_timeout_seconds = 60
View no-longer-a-dream.txt
hey cypherpunks, it's the end of the old regime
cryptographic currency, no longer a dream
oh believers in liberty, feel the new sunrise
trustworthy coinage is right before our eyes
it's time to remember the early pioneers
ten thousand coins for a pizza, they look back in tears
You can’t perform that action at this time.