Skip to content

Instantly share code, notes, and snippets.

@btcdrak
btcdrak / blockchain_notary.md
Last active August 29, 2015 14:05
Blockchain notary

Blockchain Notary

Timestamps a cryptographic digest of a given document into the blockchain and connects it to a pubkeyhash to prove a chain of ownership. The document is considered to be owned by the initial creator and can be transferred to others. This is similar to how assets are issued and the issuer remains in control unless he transfers issuer status to a new ownership.

When reading back the blockchain the system should parse out notary data into the local database so when presented with a document, the API it can quickly hash it and determine if it already exists.

  • Block no recorded in
  • Hash of the document
  • Txid
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
This is a list of unspendable addresses with which to burn coins to. When you send a coin to any of these addresses, they are permanently gone and can never be redeemed.
You can prove this by sending a small test amount to the address and then checking a block explorer or using `getrawtransaction txid 1`. You should see the coins output to somehting like `"raw_scriptPubKey": "76a914000000000000000000000000000000000000000088ac"` Some block explorers are also smart enough to indicate in their user interface that the coins were destroyed.
You can find the version number matching to the desired altcoin by checking two places in the code:
chainparams.cpp for bitcoin 0.9 and later based coins:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace Base58ReverseEncoder
{
@btcdrak
btcdrak / litecoin_heavy_pockets.md
Created December 19, 2014 09:34
Litecoin might make your pockets heavy in 2015

Litecoin might make your pockets heavy in 2015

Throughout this year I've been saying LTC under 0.01 would be a steal. In fact anything in the $2 range seems a good deal. My reasoning has been twofold, and frankly, obvious.

Early in 2014 when Charlie Lee (creator of litecoin) joined Coinbase, he gave a presentation about bitcoin. He was asked if Coinbase would add litecoin to which he responded, “not at the moment”. His reasoning was that the mass markets still didn't understand bitcoin, so it would potentially confuse people to add another crypto currency.

2014 has been the year of big bitcoin adoption, with names like Paypal (half in), Microsoft and Time, and the bitlicense. I believe by 2015, bitcoin will be a lot more mainstream and that Coinbase will have to adapt the the business model of GoCoin. The most likely candidate would be litecoin given the connection with Charlie Lee.

Whether this makes litecoin more valuable in the long term, it will bring litecoin in front of millions of existing Coinbas

@btcdrak
btcdrak / addrindex-0.10.0.txt
Created February 13, 2015 13:05
Bitcoin Core 0.10.0 addrindex patched release
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Tagged from c354b3155c213f76f96ad20085f8cadc63abd3cd as addrindex-0.10.0
308569ed62d33becf26825bfd5a4707f9a5264d5f4030591a8f1d13df1792bd2 bitcoin-addrindex-0.10.0-win32-setup.exe
ea9a5ef25b51d101da7de845d08cc284724369503e5f3d6c1e6255ef73b733c3 bitcoin-addrindex-0.10.0-win64-setup.exe
4ea3b2d51bdb04ca11c970ce49945f11debcb31b0a8d553e317363a60f33a674 bitcoin-addrindex-0.10.0-osx-unsigned.dmg
a11a0725a9e758edd93816b353875da84592ce6fa6950ebd1f140b75e8de1d9a bitcoin-addrindex-0.10.0-linux32.tar.gz
f315cbe27e06c72c595bfa0921644bf3570dc5ce2f56758a9c7995c76886efc4 bitcoin-addrindex-0.10.0-linux64.tar.gz
@btcdrak
btcdrak / bitcoin-addrindex-0.10.1.txt
Created April 27, 2015 15:18
Bitcoin Core 0.10.1 + addrindex patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Tagged from e09e1f45ac092229374c03aa72718614972cc9b0 as addrindex-0.10.1
88b3497eff5472bf5c9b0266c7ac4e5af53c964d1f96e5160923015a564ca216 bitcoin-addrindex-0.10.1-win32-setup.exe
256ca06d42284b6513405e04da0013aaa6bfeddc45fce7e093f30c2e29720c90 bitcoin-addrindex-0.10.1-win32.zip
56dd02f0569b6f6f6e0b4efebeccf8adf69a99a7f2b6dc0eb73ff75f2ffa99e8 bitcoin-addrindex-0.10.1-win64-setup.exe
becbb4f74030d64a7c9ffa85e549bd70d1d1485f2ca37a549e0c421042dead20 bitcoin-addrindex-0.10.1-win64.zip
1f64944dbad33ffdbf1d4aca676bf40262eeadd725f523d5f97c5f58e1b86b7a bitcoin-addrindex-0.10.1-osx-unsigned.dmg
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Tagged from d48d9c0e9b0cbbca196957d4fa1c5da56431e51e as addrindex-0.10.2
93b9c299378a01915411501484b28b946635f6fddd217f49b48a9f08f787f091 bitcoin-addrindex-0.10.2-win32-setup.exe
e273fa0f107d08748280ae77bc8bcb51d2eede7fc80a1d44140ccf477cdd489b bitcoin-addrindex-0.10.2-win32.zip
1e935e259e6534a4f47f924d0cc9f1b799f6d16237616d3e5aed381534dd3234 bitcoin-addrindex-0.10.2-win64-setup.exe
d10f8932910105b4f1cc79d97ba70efbd373b1d1fe1b7bfe818fe8b61744ad09 bitcoin-addrindex-0.10.2-win64.zip
734370a74149f0a97ce2a056521351f1d62074277de0e20b866b252b84715503 bitcoin-addrindex-0.10.2-osx-unsigned.dmg
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev build-essential libtool autotools-dev autoconf pkg-config libssl-dev libevent-dev bsdmainutils libboost-all-dev libminiupnpc-dev libzmq3-dev git-core
## if you want to build Qt then you will need to add this below:
# sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
git clone https://github.com/bitcoin/bitcoin
cd bitcoin
git checkout v0.11.2
./autogen.sh
./configure --with-tests=no --enable-gui=no # --enable-gui=yes for Qt also.
@btcdrak
btcdrak / exporter.js
Created January 17, 2016 10:17 — forked from simon-jentzsch/exporter.js
slack message exporter
'use strict';
var _ = require("underscore");
var fs = require("fs");
var Slack = require('slack-api');
var token = "YOUR-TOKEN";
Slack.users.list({token:token}, function (error, data) {
// create a map with the real usernames