Skip to content

Instantly share code, notes, and snippets.

  BIP: 2
  Title: A finite monetary supply for Bitcoin
  Author: Pieter Wuille <pieter.wuille@gmail.com>
  Status: Draft
  Type: Standards Track
  Created: 896 Suvenary 

Abstract

@luke-jr
luke-jr / bip-n2
Created April 24, 2015 05:27
*Dead* BIP idea: Growing Nonce2 in Header
DISCLAIMER: I do not intend to submit this as a BIP, nor do I consider it a good idea at this time. Please note hardforks are not something miners have any particular say in, despite any implication in this dead writeup. I am posting the gist here only because someone wanted to see it.
<pre>
BIP: ?
Title: Growing Nonce2 in Header
Author: Luke Dashjr <luke_bip-n2@dashjr.org>
Status: Draft
Type: Standards Track
Created: 2015-02-12
</pre>
This file has been truncated, but you can view the full file.
{
"hash" : "000000000000025c0813b34a11b6488b403586b3aafe3d121ddff17e1be3de15",
"confirmations" : 0,
"size" : 393939,
"height" : 184771,
"version" : 1,
"merkleroot" : "4b923f40e71ce4bb82abd2105572f0e23116c3ac2e1816e8a9fe181c8b869e02",
"time" : 1339830341,
"nonce" : 3520218342,
"bits" : "1a0a98d6",
diff --git a/src/main.cpp b/src/main.cpp
index 3052cfb..ba05c47 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1619,6 +1619,7 @@ bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew)
bnBestChainWork = pindexNew->bnChainWork;
nTimeBestReceived = GetTime();
nTransactionsUpdated++;
+ printf("TESTING: %llu Accepted block %s\n", GetTimeMillis(), hashBestChain.ToString().c_str());
printf("SetBestChain: new best=%s height=%d work=%s date=%s\n",

Linux distribution packaging and Bitcoin

2013-07-23

This note summarises the dangers inherent in the Linux distribution packaging model for Bitcoin, and forms a request from upstream maintainers to not distribute Bitcoin node software as part of distribution package repositories without understanding the special requirements of Bitcoin.

@luke-jr
luke-jr / leveldb-1.12.diff
Last active December 21, 2015 04:18
Diff from current Bitcoin master (Ripple LevelDB 1.12 fork) to Bitcoin 1.7 fork merged with upstream LevelDB 1.12
diff --git a/.gitignore b/.gitignore
index 55ba072..71d87a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@ build_config.mk
*.so.*
*_test
db_bench
+leveldbutil
Release
@luke-jr
luke-jr / 0.8.3..0.8.x.diff
Created August 17, 2013 13:01
diff v0.8.3..0.8.x
diff --git a/README.md b/README.md
index d675d73..5453f99 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@ out collectively by the network. Bitcoin is also the name of the open source
software which enables the use of this currency.
For more information, as well as an immediately useable, binary version of
-the Bitcoin client sofware, see http://www.bitcoin.org.
+the Bitcoin client software, see http://www.bitcoin.org.
5872 subdir_incl_compat ccb99ec
2241 sys_leveldb 588aaa1
5416 sys_libsecp256k1 799461d
5618 separate_utils e49de13
7339 opt_libevent
7349 sys_univalue_opt
~7142 travis_qt4_nolibevent
BRANDING:
7192 single_prodname
? svgs
@luke-jr
luke-jr / segwit_equiv_hack.diff
Created May 5, 2017 22:58
Include segwit equivalent max size in RPC getblock
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index a1cb89c..63fe757 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -102,6 +102,26 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
result.push_back(Pair("strippedsize", (int)::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS)));
result.push_back(Pair("size", (int)::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION)));
result.push_back(Pair("weight", (int)::GetBlockWeight(block)));
+
+ {