Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am achow101 on github.
  • I am achow101 (https://keybase.io/achow101) on keybase.
  • I have a public key whose fingerprint is 1528 1230 0785 C964 44D3 334D 1756 5732 E08E 5E41

To claim this, I am signing this object:

@achow101
achow101 / sendalert.cpp
Created Nov 1, 2016 — forked from laanwj/sendalert.cpp
Bitcoin send alert code
View sendalert.cpp
/*
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
View cltv-multisig-sign.diff
diff --git a/src/script/ismine.cpp b/src/script/ismine.cpp
index 6b68f0679e8..c4c81715e48 100644
--- a/src/script/ismine.cpp
+++ b/src/script/ismine.cpp
@@ -145,6 +145,27 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey, bool&
return ISMINE_SPENDABLE;
break;
}
+
+ case TX_CLTV_MULTISIG:
View fees-bitcoin-fees-info-cycle.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
40
60
60
50
62
64
42
59
60
41
View simulation-results.md
final value total sent total deposited mean #UTXO final #UTXO #received #spent #payments sent #changes created min change max change mean change stDev of change total fees average fees fees to spend remaining UTXO total cost min input set max input set mean size of input set stdev of input set size Fees file Simulation File BnB Usage
55.88713405 -2484.3994 2540.3143409799973 19.85849529431419568936689756810665130615234375 17 6097 17913 11860 11833 0.00997809 4.15153434 0.10399897 0.28233767 -0.02520509 -0.0000021252184 -0.0000251600000000000030542755824480849469182430766522884368896484375 -0.025230250 1 24 1.510370994940978039977608204935677349567413330078125 1.0410142316722097444170458402368240058422088623046875 fees-bitcoinfees-info-repeats.csv derived-1I-2O.csv 27/1186
View bctalk_modlog_stats.py
import requests
import re
import operator
from bs4 import BeautifulSoup
r = requests.get('https://bitcointalk.org/modlog.php')
p = re.compile('member #\d+')
all_members = p.findall(r.text)
mem_dict = {}
View bnb-sim-results.md

All of the BnB simulation results. Some are right, others are wrong.

Results

All of the valid results for varying fee rate simulations, but readable

Type Fees file Simulation File final value mean #UTXO final #UTXO #received #spent #changes created min change max change mean change stDev of change total fees average fees total cost min input set max input set mean size of input set stdev of input set size BnB Usage
BnB+Core fees-bitcoinfees-info-repeats.csv derived-1I-2O.csv 55.88713405 19.86 17 6097 17913 11833 0.00997809 4.15153434 0.10399897 0.28233767 -0.02520509 -0.00000213 -0.02523025 1 24 1.51 1.04 27/11860
Core fees-bitcoinfees-info-repeats.csv derived-1I-2O.csv 55.88712329 27.51 22 6097 17935 11860 0.00001005 10.30069834 0.29223202 0.72740965 -0.02521585
View alert-fix.patch
diff --git a/src/alert.cpp b/src/alert.cpp
index aa7ac748da..1c679e9fda 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -192,13 +192,41 @@ bool CAlert::ProcessAlert(const std::vector<unsigned char>& alertKey, bool fThre
nMaxVer == maxInt &&
setSubVer.empty() &&
nPriority == maxInt &&
- strStatusBar == "URGENT: Alert key compromised, upgrade required"
+ strStatusBar == "URGENT: Alert key compromised, upgrade required" &&
View srd-fallback-simulation-results.md

Simulations Results for SRD Fallback strategies

SRD Fallback

Simulation File final value mean #UTXO final #UTXO #received #spent #payments sent #changes created min change max change mean change stDev of change total fees average fees fees to spend remaining UTXO total cost min input set max input set mean size of input set stdev of input set size BnB Usage SRD Usage
derived-1I-2O-statoshi-6block.csv 115.55086265 102.27 139 6097 16424 11565 10467.00000000 0.00007778 10.10469422 0.94600269 1.21818317 -2.35333207 -0.00020349 -0.00020572 -2.35353779 1 14 1.42014700 1.17345193 1098 10467
derived-balanced-statoshi-6block.csv 106.49087057 199.77 287 12194 20883 11600 8976.00000000 0.00002474 9.94578008 0.70230363 1.07709449 -2.54395062 -0.00021931 -0.00042476 -2.54437538 0 22 1.80025862 1.622
View block-packages.py
import requests
import pprint
r = requests.get('https://blockchain.info/rawblock/0000000000000000002540e369b106bfd929585e0f059409bd2a956e6a6af79c')
r = r.json()
txs = r['tx']
first = True
packages = []
for i,tx in enumerate(txs):
if first: