Skip to content

Instantly share code, notes, and snippets.

View Crypt-iQ's full-sized avatar
🦎

Eugene Crypt-iQ

🦎
View GitHub Profile
@Crypt-iQ
Crypt-iQ / v3.md
Last active February 28, 2024 16:59
Short primer

Version 3 transactions in Bitcoin Core

Motivation

  • Cluster mempool gets rid of CPFP Carve-out so Lightning needs a way to prevent pinning once cluster mempool is widely deployed.
    • v3 transactions is the proposed anti-pinning solution. It limits the worst-case for pinning since children are at most 1000 sat/vb and there can only be one child.

v3

@Crypt-iQ
Crypt-iQ / plot.py
Created February 6, 2024 15:41
plot feefilters, put feefilter.log in same directory
import matplotlib.pyplot as plt
import os
import numpy as np
import seaborn as sns
import pandas as pd
from scipy.stats import norm
lines = open("feefilter.log").read().splitlines()
data = []
@Crypt-iQ
Crypt-iQ / htlc-timeout-weights.md
Last active March 1, 2023 18:23
taproot-2nd-level-htlc-timeout-weights

HTLC Timeout Transaction Weight

  • htlc_timeout_script: 70 bytes

    • OP_DATA: 1 byte (local_htlcpubkey length)
    • local_htlcpubkey: 33 bytes
    • OP_CHECKSIGVERIFY: 1 byte
    • OP_DATA: 1 byte (remote_htlcpubkey length)
    • remote_htlcpubkey: 33 bytes
    • OP_CHECKSIG: 1 byte
  • htlc_timeout_control_block: 65 bytes

Keybase proof

I hereby claim:

  • I am crypt-iq on github.
  • I am eugene_ (https://keybase.io/eugene_) on keybase.
  • I have a public key ASBK1oq5Mt92EMGia-ecoJh2521CUyaViP1o47IHn4XXzQo

To claim this, I am signing this object:

I'm verifying ownership of elzeigel@gmail.com at EarnCarrot.
@Crypt-iQ
Crypt-iQ / fuzzerror.go
Created September 1, 2017 12:51
serializedSize example
package wirefuzz
import (
"testing"
"bytes"
)
func TestFuzz(t *testing.T) {
var data []byte = []byte("\x00\x10\a\x96\x96\xa5UYVj\xaaV\xa9\x9a\x9ae\xa6YZf" +
"\x96\x99UV\x9aZj\x99ei\xa5f\xa6\x96Zf\x96\x96\x96j" +