Skip to content

Instantly share code, notes, and snippets.

View 0xB10C's full-sized avatar

b10c 0xB10C

View GitHub Profile
@hebasto
hebasto / guix-sigs.md
Last active March 28, 2024 10:11
The `bitcoin-core/guix.sigs` Repository Workflow

The bitcoin-core/guix.sigs Repository Workflow

Common environment variables

export SIGNER="hebasto"
export GUIX_SIGS_REPO="/home/hebasto/guix.sigs"
export DETACHED_SIGS_REPO="/home/hebasto/bitcoin-detached-sigs"
@ajtowns
ajtowns / bips.txt
Last active January 2, 2024 01:58
bip-activation-history
1MB limit (no bip):
commited: 2010-09-07
flag-day: 79400 2010-09-12
burial: 2010-09-20
dup-tx (bip 30):
bip: 2012-02-22
flag-day: 2012-03-15
p2sh (bip 16):
@jnewbery
jnewbery / BitcoinCoreReviewClub.md
Last active October 20, 2020 09:12
Bitcoin Core PR Review Club
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:
@DavidVorick
DavidVorick / feeproposal.md
Last active October 17, 2017 21:13
Fee Market Mechanics Proposal

Purpose: Suggest a new method for choosing fees on a transaction. Goal is to get a transaction confirmed as cheap as possible within the provided timeframe, with emphasis on both not missing the time window, and also on not going over the user's maximum fee.

Existing Problems:

  1. Transaction fee setting is currently really 'loose'. Blocks will have transaction fees between 300 sats and 500 sats, which means that, at the very least, everyone at 500 sats could have gotten in at 300 sats. That's a huge spread.

  2. Loose fee markets just generally drives prices up quite a bit. People see '300' and '500' as the 0-1 block confirmation rate, and that's where they set their expectations. They don't like it, but they know that's what the market is, so that's where they put their fees. Basically, we've ended up with a market where people are trying hard to make sure that they are using fees that are good enough instead of using fees that are what they could reasonably get away with.

  3. The emphasis on getting confir

@morcos
morcos / FeeEstimationHighLevel.md
Last active June 14, 2023 10:57
Bitcoin Core Fee Estimation Algorithm

High level description Bitcoin Core's fee estimation algorithm

The algorithm takes as input a target which represents a number of blocks within which you would like your transaction to be included in the blockchain. It returns a fee rate that you should use on your transaction in order to achieve this.

The algorithm is conceptually very simple and does not attempt to have any predictive power over future conditions. It only looks at some recent history of transactions and returns the lowest fee rate such that in that recent history a very high fraction of transactions with that fee rate were confirmed in the block chain in less than the target number of blocks.

Transactions can occur with a nearly continuous range of fee rates and so in order to avoid tracking every historical transaction independently, they are grouped into fee rate "buckets". A fee rate bucket represents a range of fee rates within which the algorithm treats all transactions as having approximately the same fee rate and the answer th

@chris-belcher
chris-belcher / block-probability.py
Created May 15, 2016 02:55
block probability
import matplotlib
import numpy.random
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
#https://www.reddit.com/r/Bitcoin/comments/4gp28d/how_to_avoid_getting_ripped_off_in_large_btc/
#https://en.bitcoin.it/wiki/Confirmation
cumulative = True