Skip to content

Instantly share code, notes, and snippets.

Analysis of full-RBF deployment methods

Given that the release of 24.0 is upon us and there is little time to make a complex decision regarding the deployment method of full-RBF, we've documented the different alternatives and their trade-offs. I hope this helps get to the best possible deployment!

Current deployment options

@esneider
esneider / old-copay-spanish-mnemonic-to-seed.py
Last active September 12, 2020 09:33
Transform an old copay Spanish mnemonic (with the composed unicode bug) into a seed
import sys
import hashlib
import unicodedata
if len(sys.argv) != 2:
print('Usage: python3 old-copay-spanish-mnemonic-to-seed.py "here go the mnemonic words"')
exit(1)
mnemonic = sys.argv[1]

Non-custodial lightning escrow for HodlHodl

phase 1: bitcoin funding

  1. seller generates secret A
  2. seller asks hodlhodl to generate a hold invoice with payment hash = hash(A), notice that hodlhodl doesn’t have the preimage A
  3. seller sends a lightning payment to settle the invoice
  4. once hodlhodl receives the payment, it remains on hold since it doesn’t have the preimage A to settle it
  5. hodlhodl lets the seller know it received the payment, so that it can proceed

phase 2: fiat payment

@esneider
esneider / 8tracks.js
Last active October 11, 2015 21:30
Bookmarklet to color-rank 8tracks search results
function parse(str){
return parseInt(str.replace(/,/g, ""));
};
function cap(num, min, max) {
return Math.max(min, Math.min(num, max));
};
$(".card").each(function(){
var plays = $(this).find(".plays_count").text();
@esneider
esneider / num2bytes.py
Created May 15, 2015 20:58
Comparison of number_to_bytes strategies (unsigned big integer to zero-padded big endian byte buffer)
import binascii
import struct
import timeit
def number_to_bytes__hex(num, num_bytes):
padded_hex = '%0*x' % (2 * num_bytes, num)
big_endian = binascii.a2b_hex(padded_hex.encode('ascii'))
return big_endian
Verifying that +esneider is my openname (Bitcoin username). https://onename.com/esneider
@esneider
esneider / vimTerm.scpt
Last active August 29, 2015 14:09
Open a file in vim terminal (iTerm)
on run {input}
tell application "iTerm"
tell (make new terminal)
tell (launch session "Default")
activate
write text "vim " & quoted form of (POSIX path of input) & "; exit"
end tell
end tell
end tell
end run

Keybase proof

I hereby claim:

  • I am esneider on github.
  • I am esneider (https://keybase.io/esneider) on keybase.
  • I have a public key whose fingerprint is 3F14 0BEE C075 76ED 95DF 475F 8DCF 83F3 6C0D CE31

To claim this, I am signing this object:

#!/usr/bin/python
class Artist:
def __init__(self, name, long_name):
self.discography = []
self.name = name
self.long_name = long_name