Skip to content

Instantly share code, notes, and snippets.

View 0xB10C's full-sized avatar
💿

0xB10C 0xB10C

💿
View GitHub Profile
@0xB10C
0xB10C / shell.nix
Last active March 28, 2024 16:35
Nix shell for Bitcoin Core development (moved to https://github.com/0xB10C/nix-bitcoin-core)
# MOVED:
# To enable better collboration, I've moved the shell.nix to https://github.com/0xB10C/nix-bitcoin-core.
# Older revisions remain avaiable here.
# https://gist.github.com/0xB10C/1fd0d4a68bf96914775b1515340926f8/revisions
#
#
#
#
#
#
@0xB10C
0xB10C / 0000000000000000000357088139cba6dc295875d7d3b2dd1fd764705727e451.hex
Created February 15, 2024 08:45
Stale block (829613) as hex and json 0000000000000000000357088139cba6dc295875d7d3b2dd1fd764705727e451
This file has been truncated, but you can view the full file.
0060cc2ec42d0c1d848f4e09ff5b72ef7d1cb58f0b12011a4639010000000000000000007dcd5c1df85b33279178cfb9ea66331af41903ea01768cc870272e5aeced2700e0b3c5655dba03175c9c55aafd4f02010000000001010000000000000000000000000000000000000000000000000000000000000000ffffffff5903ada80c1c4d696e656420627920416e74506f6f6c313032332400fa06cb98875dfabe6d6d471147407db37c089fb97f2e71a952e6711b26046fbdaf4ae1330b67c7773a901000000000000000a83300003d00000000000000ffffffff05220200000000000017a91442402a28dd61f2718a4b27ae72a4791d5bbdade787e1c48f260000000017a9144b09d828dfc8baaba5d04ee77397e04b1050cc73870000000000000000266a24aa21a9ed37bdb12cf929080d681ae1cfa1cb6f438c4eb7dbbf79d5a39ebf492f0f6de6b900000000000000002f6a2d434f52450164db24a662e20bbdf72d1cc6e973dbb2d12897d55997be5a09d05bb9bac27ec60419d0b373f32b2000000000000000002b6a2952534b424c4f434b3a9d2f1c450da3deefdf50f901a637ea086f001ef6522f589368220d20005c94c001200000000000000000000000000000000000000000000000000000000000000000000000000100000000011605be9514296987a513877fc2632f214ff2ca65a608f0ab798c4552
@0xB10C
0xB10C / irr-timestamps.py
Created January 27, 2024 10:44
IRR timestamps
from ftplib import FTP
sources = [
{"server": "ftp.afrinic.net", "directory": "pub/dbase/", "names": ["afrinic.db.gz"], "supports_mlsd": False},
{"server": "ftp.apnic.net", "directory": "pub/apnic/whois/", "names": ["apnic.db.route.gz", "apnic.db.route6.gz"], "supports_mlsd": True},
{"server": "ftp.arin.net", "directory": "pub/rr/", "names": ["arin.db.gz"], "supports_mlsd": True},
{"server": "ftp.ripe.net", "directory": "ripe/dbase/split/", "names": ["ripe.db.route.gz", "ripe.db.route6.gz"], "supports_mlsd": True},
{"server": "ftp.lacnic.net", "directory": "lacnic/irr/", "names": ["lacnic.db.gz"], "supports_mlsd": False},
]
@0xB10C
0xB10C / 788839.json
Last active January 26, 2024 17:50
Some blocks as JSON
This file has been truncated, but you can view the full file.
{
"hash": "0000000000000000000540543428d041299d6e2e35024c0bab0341bd153ab5e4",
"confirmations": 38658,
"height": 788839,
"version": 939515904,
"versionHex": "37ffe000",
"merkleroot": "63014a03242f7f80ccfa8117b56c5dc8e41fdb46895db591c3c3ddcfc7ade44c",
"time": 1683584138,
"mediantime": 1683579890,
"nonce": 2306894968,
@0xB10C
0xB10C / 000000000000000000006840568a01091022093a176d12a1e8e5e261e4f11853.json
Last active October 14, 2023 18:12
MARAPool invalid block 809478 - 000000000000000000006840568a01091022093a176d12a1e8e5e261e4f11853 https://twitter.com/0xB10C/status/1706937041739530556
{
"hash": "000000000000000000006840568a01091022093a176d12a1e8e5e261e4f11853",
"confirmations": -1,
"height": 809478,
"version": 708739072,
"versionHex": "2a3e8000",
"merkleroot": "eada52603fc0657892fe4dc8be490b0da68df4d2d8c7c50c44d9a3c3aec5df66",
"time": 1695762922,
"mediantime": 1695761041,
"nonce": 1619870272,
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[package]
name = "tester"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
octocrab = "0.23.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$ grep -E '^\|' printblocktree.txt
|\
| 90392 (1,40027978) 00000000000ec87057d8 11/8/2010 06:59:03 tx 1
|
|\
| 90676 (1,40261655) 00000000001476bf9bf0 11/9/2010 07:40:40 tx 1
|
|\
| 90858 (1,40369940) 00000000000e21466cd5 11/10/2010 07:41:04 tx 1
|
$ grep -E '^\|' printblocktree.txt
|\
| 90392 (1,40027978) 00000000000ec87057d8 11/8/2010 06:59:03 tx 1
|
|\
| 90676 (1,40261655) 00000000001476bf9bf0 11/9/2010 07:40:40 tx 1
|
|\
| 90858 (1,40369940) 00000000000e21466cd5 11/10/2010 07:41:04 tx 1
|