Skip to content

Instantly share code, notes, and snippets.

View 0xB10C's full-sized avatar
💿

0xB10C 0xB10C

💿
View GitHub Profile
@0xB10C
0xB10C / 000000000000000000006840568a01091022093a176d12a1e8e5e261e4f11853.json
Last active October 14, 2023 18:12
MARAPool invalid block 809478 - 000000000000000000006840568a01091022093a176d12a1e8e5e261e4f11853 https://twitter.com/0xB10C/status/1706937041739530556
View 000000000000000000006840568a01091022093a176d12a1e8e5e261e4f11853.json
{
"hash": "000000000000000000006840568a01091022093a176d12a1e8e5e261e4f11853",
"confirmations": -1,
"height": 809478,
"version": 708739072,
"versionHex": "2a3e8000",
"merkleroot": "eada52603fc0657892fe4dc8be490b0da68df4d2d8c7c50c44d9a3c3aec5df66",
"time": 1695762922,
"mediantime": 1695761041,
"nonce": 1619870272,
View bench_20827-fullIBD.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Cargo.toml
[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"] }
@0xB10C
0xB10C / shell.nix
Last active May 6, 2023 22:08
Nix shell for Bitcoin Core development
View shell.nix
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
autoconf
automake
libtool
pkg-config
boost
libevent
View bloom_nodes_kits_data.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:cd3dd9c17abd28201b8ac289adf49c22
$ 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
|
View gist:bb1bcaa4e7e613a0ea52d29eb0c58d8e
$ 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
View README.txt
# 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
@0xB10C
0xB10C / bitcoin-core-tracepoint-nop-assembly.md
Created December 14, 2021 17:03
Answering the question "7. Can you verify that the tracepoints are NOPs in the binaries? If yes, how?" from https://bitcoincore.reviews/23724
View bitcoin-core-tracepoint-nop-assembly.md

Can you verify that the tracepoints are NOPs in the binaries? If yes, how?

Yes, we can verify that the tracepoints are indeed nop assembly operations in a Bitcoin Core binary with tracepoints.

Listing tracepoint locations in the binary

The Bitcoin Core doc/tracing.md contains a section on listing avaliabe tracepoints.

For example, readelf -n src/bitcoind can be used to list ELF notes in the binary. There is an ELF note in the stapsdt section for each tracepoint. This note contains the location of the tracepoint in the binary.

@0xB10C
0xB10C / pruned-nodes-kits-data.ipynb
Created November 12, 2021 09:48
Percentage of pruned nods based on https://www.dsn.kastel.kit.edu/bitcoin/ data
View pruned-nodes-kits-data.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.