Skip to content

Instantly share code, notes, and snippets.

View 0xB10C's full-sized avatar
💿

0xB10C 0xB10C

💿
View GitHub Profile
@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.
@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,
@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
|
@0xB10C
0xB10C / README.txt
Last active January 27, 2022 16:01
Scripts used to IBD benchmark Bitcoin Core PR #20827 -- feel free to reuse -- ping me if you run into problems
# PR 20827 IBD benchmarks
Bitcoin Core PR #20827 reduces the number of UTXO cache flushes to disk by increasing
the number of pruned blk/rev files per prune operation. Each prune operation causes a
dbcache flush. Fewer prune operations cause fewer flushes. Flushes are expensive with
slower disks.
I benchmarked this PR on a otherwise idle, properly cooled, and dedicated server. The
server has two HDDs in a RAID0 and an i7 4c/8t CPU. It runs a fully synced Bitcoin
Core peer that I connect to from the benchmarking node to sync from (to rule out