Skip to content

Instantly share code, notes, and snippets.

@willcl-ark
willcl-ark / xor-blocks.py
Last active August 3, 2023 15:22
xor a Bitcoin Core blocks directory
#!/usr/bin/env python3
import argparse
import logging
import os
import random
import traceback
from functools import partial
from multiprocessing import Pool, cpu_count
will@ubuntu in ~/src/bitcoin (505e3de) [$?] : C v16.0.6-clang : 🐍 3.8.16
₿ /home/will/src/bitcoin/src/bitcoin-cli getmempoolinfo
{
"loaded": true,
"size": 138992,
"bytes": 48314670,
"usage": 295850976,
"total_fee": 2.22768977,
"maxmempool": 300000000,
"mempoolminfee": 0.00001000,
@willcl-ark
willcl-ark / keybase.md
Created July 1, 2024 08:42
keybase.md

Keybase proof

I hereby claim:

  • I am willcl-ark on github.
  • I am willcl_ark (https://keybase.io/willcl_ark) on keybase.
  • I have a public key whose fingerprint is 67AA 5B46 E7AF 7805 3167 FE34 3B8F 814A 7842 18F8

To claim this, I am signing this object:

(define-module (bitcoin-core-local)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (gnu packages bash)
#:use-module (gnu packages base)
#:use-module (gnu packages compression))
use std::marker::PhantomData;
use tokio::sync::mpsc;
use anyhow::Result;
// Define a trait for RPC methods
pub trait RpcMethod<C> {
type Input;
type Output;
fn call(client: &C, input: Self::Input) -> Result<Self::Output>;
@willcl-ark
willcl-ark / persistent_worker.md
Created September 10, 2024 09:04
Notes on setting up a persistent worker on Hetzner

Beefy workers

  • Can't use "projects" on Hetzner as they are for cloud only. Therefore just set up servers manually and connect to each, running cirrus-cli in screen

  • Testing TSAN job using 1 AX52 Server

  • Version of containernetworking-plugins on Jammy 22.04 Ubuntu is broken for podman. Workaround:

    curl -O http://archive.ubuntu.com/ubuntu/pool/universe/g/golang-github-containernetworking-plugins/containernetworking-plugins_1.1.1+ds1-3build1_amd64.deb
@willcl-ark
willcl-ark / flake.nix
Created April 25, 2025 10:53
bitcoin deve flake
{
description = "Bitcoin development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-2022.url = "github:NixOS/nixpkgs?rev=028048884dc9517e548703beb24a11408cc51402"; # For boost 1.81.0, libevent 2.1.12, qrencode 4.1.1, zeromq 4.3.5
nixpkgs-lief.url = "github:NixOS/nixpkgs?rev=47c1824c261a343a6acca36d168a0a86f0e66292"; # lief 0.13.2
nixpkgs-sqlite.url = "github:NixOS/nixpkgs?rev=f597e7e9fcf37d8ed14a12835ede0a7d362314bd"; # sqlite 3.38.5
nixpkgs-fontconfig.url = "github:NixOS/nixpkgs?rev=136a26be29a9daa04e5f15ee7694e9e92e5a028c"; # fontconfig 2.12.6
nixpkgs-freetype.url = "github:NixOS/nixpkgs?rev=fadaef5aedb6b35681248f8c6096083b2efeb284"; # freetype 2.11.0