Bitcoin Graffiti work in progress
← Timeline text · 2013
#!/usr/bin/python3
#
# File downloader
# Requires git://github.com/jgarzik/python-bitcoinrpc.git
#
# (c) 2013 Satoshi Nakamoto All Rights Reserved
#
# UNAUTHORIZED DUPLICATION AND/OR USAGE OF THIS PROGRAM IS PROHIBITED BY US AND INTERNATIONAL COPYRIGHT LAW

import sys
import os
import jsonrpc
import struct
from binascii import crc32,hexlify,unhexlify


if len(sys.argv) != 2:
    print("""\
Usage: %s <txhash>

Set BTCRPCURL=http://user:pass@localhost:portnum""" % sys.argv[0], file=sys.stderr)
    sys.exit()

proxy = jsonrpc.ServiceProxy(os.environ['BTCRPCURL'])

txid = sys.argv[1]

tx = proxy.getrawtransaction(txid,1)

data = b''
for txout in tx['vout'][0:-2]:
    for op in txout['scriptPubKey']['asm'].split(' '):
        if not op.startswith('OP_') and len(op) >= 40:
            data += unhexlify(op.encode('utf8'))

length = struct.unpack('<L', data[0:4])[0]
checksum = struct.unpack('<L', data[4:8])[0]
data = data[8:8+length]

if checksum != crc32(data):
    print('Checksum mismatch; expected %d but calculated %d' % (checksum, crc32(data)),
          file=sys.stderr)
    sys.exit()

sys.stdout.buffer.write(data)
Open the raw reconstruction ↗
text P2FMS ✓ Verified on-chain

Satoshi downloader tool (Python source)

Written to the chain on 06 Apr 2013.

Block
—
Written
06 Apr 2013
Size
1,162 B
Format
CODE
Transactions
1

About this artifact

The companion to the uploader — the Python source that reads the data back out. Together the pair make the archive self-describing: anyone with a copy of the chain has both the files and the code needed to recover them.

How it was stored

Bare multisig outputs list several public keys and say how many signatures are needed to spend them. Uploaders discovered that the public-key slots could carry arbitrary bytes. A transaction can include many such multisig outputs, each carrying one or more fake key-sized chunks.

More about P2FMS
Proof · 1 transaction

Verified against the chain

Every byte shown here was read from these transactions. Open one in a block explorer to check it yourself.