Skip to content

Instantly share code, notes, and snippets.

View Sjors's full-sized avatar

Sjors Provoost Sjors

View GitHub Profile
@Sjors
Sjors / README.md
Last active January 16, 2024 14:53
Run (much of) Bitcoin CI on your own machine

Tested on Ubuntu 23.04 with Gnome desktop.

This runs 11 of the Bitcoin Core CI machines, opening one terminal window for each. The window is automatically closed if the tests pass, otherwise it stays open.

My AMD Ryzen 9 7950X machine has 16 cores (32 threads) at 64 GB of memory. Memory peaks at about 25 GB. Everything but native_fuzz completes in 50 minutes, with CPU usage mostly at 100%. The fuzzer idles around (?) for another 10 minutes and then finishes.

Usage

block_height OP_RETURN
@Sjors
Sjors / README
Last active October 3, 2022 17:17
WOO-2022-0000202149 2e deelbesluit Wob-verzoek aanbevelingen en regelgeving cryptodienstverlening
https://www.rijksoverheid.nl/documenten/woo-besluiten/2022/09/30/2e-deelbesluit-wob-verzoek-aanbevelingen-en-regelgeving-cryptodienstverlening
```sh
# On linux, use "sha256sum" instead of "shasum -a 256"
shasum -a 256 -c checksums.txt 2>&1 | grep OK
gpg -v --auto-key-locate=clear,wkd --locate-key sjors@sprovoost.nl
gpg --verify checksums.txt.asc
```
@Sjors
Sjors / functions.php
Created May 27, 2022 21:19
Disable billing fields for virtual products WooCommerce
add_filter('woocommerce_billing_fields','wpb_custom_billing_fields');
function wpb_custom_billing_fields( $fields = array() ) {
add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false');
// No billing details
unset($fields['billing_first_name']);
unset($fields['billing_last_name']);
unset($fields['billing_company']);
unset($fields['billing_address_1']);
unset($fields['billing_address_2']);
@Sjors
Sjors / Welder
Last active September 20, 2021 13:40
Bitcoin Explained episode 9 transcript
Participant #1:
Life permit. This is defend. Wishers NATO. That's right. Hello. Sure. Welcome back. Thank you. You confirmed your status as Bitcoin Core elite developer this week. Absolutely. Thanks to me, there has never been a more amazing way to send Bitcoin. This is absolutely groundbreaking. It changed everything. It changed nothing. Okay. Typically, this is not what the episode's gonna be about. The episode's gonna be about Lipstick P 256K, one library. That's right. But I want to know about this game changing technology that you just build and implement it. What is it? What does it do? Okay. So how did it change the world short. So there are many ways to send Bitcoin, but one of them is you download the Bitcoin Core software, and then it gives you a really nice graphical interface. You click at Mosi buttons and poof. So good. So far, so good. So far, so good. But there's also a command line way to do it. And especially if you need to do anything advanced, like using it with a hardware wallet, you'll ha
@Sjors
Sjors / overview.md
Last active December 1, 2023 02:37
Hardware Wallet Support in GUI and RPC, using HWI

Project: https://github.com/bitcoin/bitcoin/projects/15

Final User Experience

A user plugs in their hardware wallet and creates a new wallet. It automatigically detects the device and imports the keys:

The user can verify a receive address on their device with just a click:

find output/ -type f -print0 | sort -z | xargs -r0 sha256sum
41c3b48d14163975f4fd27548a904b77fd3c8c816877f699add061871a1cae89 output/bitcoin-0.18.99-aarch64-linux-gnu-debug.tar.gz
f0ebbc072f5c1b5786e4468690396d7cf4522afef11b639e944f7b6d37760eec output/bitcoin-0.18.99-aarch64-linux-gnu.tar.gz
2c7358a14f8ffb25b5f3678e33d9ed94a17b0f8ed2523fc9d319aac3d7ccd025 output/bitcoin-0.18.99-arm-linux-gnueabihf-debug.tar.gz
34d7e7bc97f274d526042bc16a6bfdb9eccb96c9cf0b5eff269e07db27d2f1bd output/bitcoin-0.18.99-arm-linux-gnueabihf.tar.gz
912764cb7f740185d44658eadc817990b2cd08ae5c3db6135cacefa99244a5b6 output/bitcoin-0.18.99-i686-linux-gnu-debug.tar.gz
13a42d9dafa7a223c2c2d30b3fbf0d92ad2050480ae60d8f683f7142149779bd output/bitcoin-0.18.99-i686-linux-gnu.tar.gz
a1be0c8a543320237903c8b6f2848dc6112524a5f2979faf678aaf1cc9c79ad7 output/bitcoin-0.18.99-riscv64-linux-gnu-debug.tar.gz
62c5cae9eda45884be34ee25e2dc446ed1792a78f73f30d326f4e698bec6fa3e output/bitcoin-0.18.99-riscv64-linux-gnu.tar.gz
831ea3ccdb21f3be8483dd52c2ec7
@Sjors
Sjors / magic.sh
Created May 7, 2019 18:32
Install Bitcoin Core from Gitian
sudo tar -xzvf /home/gitian/bitcoin-binaries/0.18.0/bitcoin-0.18.0-x86_64-linux-gnu.tar.gz -C /usr/local --strip 1
@Sjors
Sjors / README.md
Created May 6, 2019 13:09
LibrePatron without Docker (Ubuntu)

Warning: this is highly experimental

It assumes you're already running BTCPay Server somehwere.

Create a user and group:

sudo adduser patron --disabled-password
@Sjors
Sjors / bitcoin.conf
Created August 26, 2018 09:09
Bitcoin Core remote dev
testnet=1
[main]
[test]
server=1
rpcpassword=bitcoin
rpcuser=bitcoin