Skip to content

Instantly share code, notes, and snippets.

@btcdrak
btcdrak / sendalert.cpp
Created March 20, 2016 17:55 — forked from laanwj/sendalert.cpp
Bitcoin send alert code
/*
So you need to broadcast an alert...
... here's what to do:
1. Copy sendalert.cpp into your bitcoind build directory
2. Decrypt the alert keys
copy the decrypted file as alertkeys.h into the src/ directory.
3. Modify the alert parameters in sendalert.cpp
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
index 332abc4..e3ed7be 100644
--- a/src/policy/policy.cpp
+++ b/src/policy/policy.cpp
@@ -55,7 +55,7 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType)
bool IsStandardTx(const CTransaction& tx, std::string& reason)
{
- if (tx.nVersion > CTransaction::CURRENT_VERSION || tx.nVersion < 1) {
+ if (tx.nVersion > CTransaction::MAX_STANDARD_VERSION || tx.nVersion < 1) {
@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
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.
-----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
@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 / 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

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 / 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