Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Fabian Jahr fjahr

🏠
Working from home
  • Freelancer
  • Berlin
Block or report user

Report or block fjahr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fjahr
fjahr / rolling_utxo_set_hash.md
Last active Sep 5, 2019
Rolling UTXO Set Hash proposal
View rolling_utxo_set_hash.md

Rolling UTXO Set Hash proposal

TL;DR

I have picked up Pieter Wuille's proposal from 2017 to use a rolling hash for the UTXO set hash. It deals with the problem of a long computation time of the UTXO set hash which results in a slow RPC call gettxoutsetinfo (can take several minutes depending on hardware). I investigated three hash functions: MuHash, ECMH and LtHash and started implementing them in Bitcoin Core for comparison. However only MuHash has a rolling hash implementation

@fjahr
fjahr / bitcoin_debugging.md
Last active Oct 21, 2019
Debugging Bitcoin Core
View bitcoin_debugging.md

This document is currently optimized for MacOS. If you would like to help me add Linux equivalent commands, please let me know.

Debugging Bitcoin Core

This guide is designed to give beginners of C++ development and/or people new to the bitcoin core code base an overview of the tools available for debugging issues as well as giving hints where issues may trip you up.

Table of contents

@fjahr
fjahr / bfgminer.md
Last active Jul 7, 2019
Solo CPU Mining on MacOS using BFG Miner
View bfgminer.md
@fjahr
fjahr / lightning_mw_messages.md
Last active Feb 11, 2019
List of all Lightning Network MW Message Types
View lightning_mw_messages.md

Lightning Network MW Message Types

List of all Lightning Network Message Types for easy & quick overview.

Messages with strikethrough style exist in the original RFCs but are currently removed in Lightning MW.

Setup & Control (0 - 31)

Messages related to connection setup, control, supported features, and error reporting.

@fjahr
fjahr / lightning_messages.md
Last active Feb 2, 2019
List of all Lightning Network Message Types
View lightning_messages.md

Lightning Network Message Types

List of all Lightning Network Message Types for easy & quick overview.

Setup & Control (0 - 31)

Messages related to connection setup, control, supported features, and error reporting.

@fjahr
fjahr / debug.ex
Created Apr 24, 2018
Debugging Plug as a last resort for debugging nasty production issue in Elixir/Phoenix/AWS ECS Fargate
View debug.ex
defmodule MyApp.Plugs.Debug do
@behaviour Plug
require Logger
def init(default), do: default
def call(conn, _) do
case conn.request_path do
"/path/to/error" ->
@fjahr
fjahr / pb.py
Last active Apr 20, 2018
Minimize Change Output for Bitcoin transactions, naive implementation
View pb.py
"""
Suppose you are given a list of possible Bitcoin that you control (inputs). You
need to pay someone exactly 0.71 BTC. How would you select exactly 2 inputs in
such a way as to minimize the change output if you could ignore fees? Write a
python function that selects the two inputs.
"""
from itertools import permutations
TEST_INPUTS = [0.21, 0.59, 1.34, 3.45, 0.3, 0.84, 0.53, 0.62, 0.70, 0.21, 0.44,
0.28, 0.39, 200.9, 4.34]
View blockstack.txt
Verifying my Blockstack ID is secured with the address 1DMWKLoHuFQU5QHAa2KyQwEqsyLP5sxXLN https://explorer.blockstack.org/address/1DMWKLoHuFQU5QHAa2KyQwEqsyLP5sxXLN
You can’t perform that action at this time.