Skip to content

Instantly share code, notes, and snippets.

View jonatack's full-sized avatar

Jon Atack jonatack

View GitHub Profile

Network partition resistance

For the Bitcoin network to remain in consensus, the network of nodes must not be partitioned. So for an individual node to remain in consensus with the network, it must have at least one connection to that network of peers that share its consensus rules. This document describes how we attempt to achieve this.

We can't rely on inbound peers to be honest, because they are initiated by others. It's impossible for us to know, for example, whether all our inbound peers are controlled by the same adversary.

@AdamISZ
AdamISZ / SNICKER_BIP_draft.mediawiki
Last active April 3, 2023 20:09
SNICKER BIP draft


  BIP: ??
  Layer: Applications
  Title: SNICKER - Simple Non-Interactive Coinjoin with Keys for Encryption Reused
  Author&#58; Adam Gibson <AdamISZ@protonmail.com>
  Comments&#45;Summary&#58; No comments yet.
  Comments&#45;URI&#58; &#45;
  Status&#58; Proposed
  Type&#58; Informational
  Created&#58; &#45;

@ariard
ariard / digital-card.txt
Created May 6, 2020 16:56
Celebrating the 1-year of Bitcoin PR Review Club
jonatack:
U2FsdGVkX18XDMZfMBvtOjbdzP9FglsfNI1IkmfUsmjhUJc1x8YghQL9jjBRA22G
LMC9KLt7L/7sFJfVm7rEW+yeoWXL6S/K1NWdOvoy6O5pfQF2NMltA6Mzb1q4huVM
x+BW7DNEBF9nDknRwFiAD079WOvLyLbWvPHk1FJp9hW5qRgU/629/XQ0pQX1eqdf
OLVS5AGuTxBgc8AE6tp4i+x7mC037bTBuI9c6X4mngfYpfu9PkSK+DzQx6pXqgTh
uvEprusb8PzsWmUSNbFN4umr9bAbUeezWig7mWNbIEbpBR/jD4YSeTXaBXfP2fvB
BJU/38DWll06Ki46CE/tkTMSjuUg2E5T2hTDppSAC9j6OuhLtt8+ZKLtt2X2tCm8
vdERbOHFdZu/Npsj6vLg8SWsKoen5LvGbRWfuXTWEa9FlTu9t7PMbcc5Zbk/5DKr
yY3jW/4u/bWuZlYca3U8dSZEjGZod+paht4acXoJRUy58RWl3Lg72FZXCuzw7Ph2
@abelards
abelards / arel_use.rb
Last active October 11, 2021 16:13
Ruby, Rails, ActiveRecord and Arel
# Welcome to my "arel gist"!
## It started hacky, then as an example, but we want it cleaner.
# ActiveRecord
## This is an ORM: you call Ruby methods and get Ruby objects, it makes SQL and object instantiations for you.
## It's Rails' default, but there are alternatives: https://github.com/Sdogruyol/awesome-ruby#orm
Student.all
Topic.first
Workshop.sum(:hours)

What do you think of just generalising feature negotiation so it's comprehensive?

Suppose "VERSION 80000+" specifies:

initiator sends a VERSION message responder sends a VERSION message

after having both send and received a VERSION message specifying a version >= 80000, both nodes must specify FEATURE support by

@tenderlove
tenderlove / mt_complete.rb
Last active December 11, 2020 19:56
tab completion for minitest tests
#!/usr/bin/env ruby --disable-gems
# Tab completion for minitest tests.
#
# INSTALLATION:
#
# 1. Put this file in a directory in your $PATH. Make sure it's executable
# 2. Run this:
#
# $ complete -o bashdefault -f -C /path/to/this/file.rb ruby

This is not an exhaustive list. This is mostly from looking at PRs or IRC meetings. Any mistakes are my own.

Backports

  • [MERGED] 0.19: Add txids with non-standard inputs to reject filter #19681
  • [MERGED] 0.20: Add txids with non-standard inputs to reject filter #19680
  • 0.20: Backport wtxid relay #19606
  • bitcoin/bitcoin#19569 (comment) (to be opened by jnewbery) with #19610

In progress/priorities

  • [MERGED] Transaction overhaul (#19184 - sipa) (Review by sdaftuar, ajtowns, ariard)
@jnewbery
jnewbery / BitcoinCoreReviewClub.md
Last active October 20, 2020 09:12
Bitcoin Core PR Review Club

Peer Logging

The Bitcoin P2P network is fundamental to the strength of Bitcoin itself. However, as it stands we know very little about the peers we connect to. This makes it difficult to have data-driven conversations about making changes to the P2P protocol. Additionally, we connect and disconnect from peers in a naïve fashion, simply because we are lacking in the information we would need to make better decisions.

We need more data.

To remedy this problem, I propose the following extensions to Bitcoin Core's per-peer logging abilities.

  1. Message Capture
@jnewbery
jnewbery / shared_ptr.cpp
Created April 18, 2020 15:42
Passing shared pointers
#include <iostream>
#include <memory>
struct Base
{
Base() { std::cout << " Base::Base()\n"; }
~Base() { std::cout << " Base::~Base()\n"; }
};
struct TraceByVal