Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jgarzik on github.
  • I am jgarzik (https://keybase.io/jgarzik) on keybase.
  • I have a public key whose fingerprint is AF8B E07C 7049 F3A2 6B23 9D53 25B3 0832 0178 2B2F

To claim this, I am signing this object:

Verifying that +jgarzik is my openname (Bitcoin username). https://onename.io/jgarzik
@jgarzik
jgarzik / mmx-test.c
Created August 14, 2014 13:19
storing data in registers
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <time.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
@jgarzik
jgarzik / paychanproto.md
Last active August 29, 2015 13:57
Payment channel JSON-RPC protocol

This protocol describes a simple payment channel protocol, such as the one presented in https://en.bitcoin.it/wiki/Contracts#Example_7:_Rapidly-adjusted_.28micro.29payments_to_a_pre-determined_party

JSON-RPC methods shown here may be sent via HTTPS or stratum protocol. It is easily adaptable to protocol buffers or another favored marshalling method.

Open channel

Client requests a public key. Server responds with a public key (K2). K2, converted to a bitcoin address, forms the unique identifier for this payment channel. Each public key returned must be unique.

@jgarzik
jgarzik / protocol.txt
Last active December 22, 2015 23:19
Decentralied auction protocol (JSON-RPC)
(1) request payment information, required for auction creation. for zero
creation fees, price is 0, and "txout" is not required.
{
id: 1,
method: "auction.prepare",
params: [
{
// auction creator's address/identity
userid: "mkzfa27nZdHvwTZ6CitKmxroHrPbuvQQ4y",
@jgarzik
jgarzik / bitcoin-packaging-challenges.md
Last active December 20, 2015 03:39
Challenges of packaging Bitcoin software

DRAFT IN PROGESS - DO NOT CIRCULATE

Technical note

The Challenges of Packaging Bitcoin Software

Introduction

Bitcoin technology is complex. Under the hood of the decentralized virtual currency lies a novel form of decentralized, distributed database. It is critical for users, system adminstrators and packaging engineers to understand bitcoin's database consistency model, which is radically different from familiar database consistency models (MySQL, Berkeley DB, Amazon Dynamo, or Google's GPS-based doohickey).

hello test test.

test test test my home page test test test.

test test

@jgarzik
jgarzik / ron-shamir-review.md
Created October 16, 2012 20:51
Peer review of "Quantitative Analysis of the Full Bitcoin Transaction Graph"

This is a review of "Quantitative Analysis of the Full Bitcoin Transaction Graph" by Dorit Ron and Adi Shamir.

There are some incorrect details and analyses that warrant attention.

Oct. 31 UPDATE

The authors have introduced several revisions to their paper, available at the same URL as before.

The criticism below may be outdated in part or in full.

@jgarzik
jgarzik / pynode-ripemd.patch
Created August 4, 2012 04:02
pynode patch for hashlib ripemd160
diff --git a/bitcoin/serialize.py b/bitcoin/serialize.py
index 6d7fc6d..13a3afd 100644
--- a/bitcoin/serialize.py
+++ b/bitcoin/serialize.py
@@ -7,6 +7,7 @@
#
import struct
+import hashlib
from Crypto.Hash import SHA256, RIPEMD160
@jgarzik
jgarzik / samples.cfg
Created August 4, 2012 03:50
sample pynode configs
Example mainnet configuration
-----------------------------
db=/spare/tmp/chaindb
log=/spare/tmp/chaindb/debug.log
Example testnet configuration
-----------------------------
port=18333