This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
web: | |
image: mempool/frontend:v3.2.1 | |
user: "1000:1000" | |
init: true | |
restart: on-failure | |
stop_grace_period: 1m | |
command: "./wait-for db:3306 --timeout=720 -- nginx -g 'daemon off;'" | |
depends_on: [api] | |
ports: [3006:3006] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
phoenixd: | |
image: acinq/phoenixd | |
volumes: | |
- phoenixd:/phoenix/.phoenix | |
ports: [9740:9740] | |
btpay: | |
image: btcpayserver/btcpayserver:2.1.6 | |
entrypoint: ["dotnet", "BTCPayServer.dll"] | |
restart: on-failure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hashlib import sha512 | |
import os | |
# Prime field and constants | |
p = 2^255 - 19 | |
q = 2^252 + 27742317777372353535851937790883648493 | |
F = GF(p) | |
Zq = Integers(q) | |
# Curve constant d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import needed libraries | |
import hashlib | |
# secp256k1 parameters | |
p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F | |
a = 0 | |
b = 7 | |
n = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 | |
Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240 | |
Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is internal and meant to be run by save-utxo-set.sh | |
BITCOIND="bitcoind -datadir=/data" | |
BITCOIN_CLI="bitcoin-cli -datadir=/data" | |
$BITCOIND & | |
BITCOIND_PID=$! | |
CURRENT_HEIGHT="$($BITCOIN_CLI -rpcwait getblockcount)" | |
let "PRUNED_HEIGHT=$CURRENT_HEIGHT - 289" | |
echo "Pruning to $PRUNED_HEIGHT" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- Setup secp256k1 --- | |
p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F | |
a_curve, b_curve = 0, 7 | |
E = EllipticCurve(GF(p), [a_curve, b_curve]) | |
G = E( | |
55066263022277343669578718895168534326250603453777594175500187360389116729240, | |
32670510020758816978083085130507043184471273380659243275938904335757337482424, | |
) | |
n = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === Curve setup: secp256k1 === | |
F = FiniteField(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F) | |
n = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 | |
E = EllipticCurve([F(0), F(7)]) | |
G = E.lift_x(F(0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798)) | |
# --- Hash function H: SHA256 → integer mod n (BIP340 tagged hash) --- | |
def H_bip340_challenge(data): | |
import hashlib | |
tag = b"BIP0340/challenge" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA512 | |
Date: May 12, 2025 | |
Chaintip: 000000000000000000020f4edda4f3360a96d80c49e2c8590dadd02f8808a432 | |
For a number of reasons, I have recently set up a new OpenPGP key, | |
and will be transitioning away from my old one. | |
The old key will continue to be valid for some time, but I prefer all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bip39::Mnemonic; | |
use bitcoin::absolute::LockTime; | |
use bitcoin::bip32::{DerivationPath, Xpriv, Xpub}; | |
use bitcoin::consensus::{deserialize, serialize}; | |
use bitcoin::hex::{Case, DisplayHex, FromHex}; | |
use bitcoin::{secp256k1, transaction, Network, OutPoint, Psbt, Script, Sequence, Transaction, TxIn, TxOut}; | |
use miniscript::psbt::PsbtExt; | |
use miniscript::{DefiniteDescriptorKey, Descriptor, DescriptorPublicKey}; | |
use std::str::FromStr; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bip39::Mnemonic; | |
use bitcoin::absolute::LockTime; | |
use bitcoin::bip32::{DerivationPath, Xpriv, Xpub}; | |
use bitcoin::consensus::{deserialize, serialize}; | |
use bitcoin::hex::{Case, DisplayHex, FromHex}; | |
use bitcoin::{secp256k1, transaction, Network, OutPoint, Psbt, Script, Sequence, Transaction, TxIn, TxOut}; | |
use miniscript::psbt::PsbtExt; | |
use miniscript::{DefiniteDescriptorKey, Descriptor, DescriptorPublicKey}; | |
use std::str::FromStr; | |
use bitcoin::hashes::{sha256, Hash}; |
NewerOlder