Skip to content

Add stale-blocks seen by forkmonitor.info - #34

Merged
0xB10C merged 3 commits into
masterfrom
2025-08-add-forkmonitor-data
Aug 29, 2025
Merged

0xB10C merged 3 commits into
masterfrom
2025-08-add-forkmonitor-data

Conversation

@0xB10C

@0xB10C 0xB10C commented Aug 27, 2025

Copy link
Copy Markdown
Collaborator

Adds a few stale blocks on forkmonitor.info that we didn't yet have.

closes #28
closes #30

@0xB10C

0xB10C commented Aug 27, 2025

Copy link
Copy Markdown
Collaborator Author

Forkmonitor runs an ancient v0.10.3 node. Turns out, v0.10.3 didn't have getblockheader and the getblock RPC fails with Can't read block from disk.

Maybe there's an alternative way of getting that block..

Here's the nodes getchaintips:

getchaintips of v0.10.3 node
[
    {
        "height" : 911977,
        "hash" : "00000000000000000001be21f807e4fc39b12bc852989b02448dc65f946168b8",
        "branchlen" : 0,
        "status" : "active"
    },
    {
        "height" : 907051,
        "hash" : "00000000000000000001aad53cc3e15fcf36766a25b15ac8c6d84fe2c2055e82",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 906343,
        "hash" : "00000000000000000001784f10b0ab41d62235f5e383701e2439466ce7c80ae5",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 904623,
        "hash" : "00000000000000000002274bf6db24519f56a7d6b4841f216cb82e7dc345b499",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 901092,
        "hash" : "00000000000000000000c543475826e7970ec3d635c1cf03a867f5008fdb9825",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 899701,
        "hash" : "000000000000000000017c1b530f5b25ba6659f40a343af4218fc5bc5d31c2c9",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 897442,
        "hash" : "00000000000000000001c4ffd8f406c69ed7bd1e1aff0e5486f3e808bd230f27",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 894657,
        "hash" : "00000000000000000002311b7c31f1ffef1261bb53740958ed98c600ae2abd41",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 883183,
        "hash" : "00000000000000000002585e763064d66b3f2554ef9dfb8603a2251ae16439e2",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 881953,
        "hash" : "000000000000000000007faee36bc09b2ab33e348e5991858f1ad938fb88a570",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 881780,
        "hash" : "00000000000000000002745046f0bb6fab9fd306b5df8afea25e5a4cc80f9282",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 877770,
        "hash" : "00000000000000000000451bdfb9fbd0b836ee62da952e68bbb7c5a3ceb191df",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 874036,
        "hash" : "00000000000000000002829ecf6967a9729412446dd571de06e02007a3cdc451",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 866719,
        "hash" : "0000000000000000000114d1f1c1ddf51e83d6c0d660b2c1fa9f9a345f36624a",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 865699,
        "hash" : "00000000000000000002648ba35429c4e46e38d5261331bbddd7244baf94d515",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 864527,
        "hash" : "00000000000000000000eba0dd417c220a4f2b0d58bfd35e9b61f8410e70fade",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 863888,
        "hash" : "000000000000000000022336ca639c1483ce4bfc33f07909659c1be89d133238",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 862068,
        "hash" : "000000000000000000004b7f2b9b9a9c910a93500d84fbb8926a17dd1ace2f8d",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 859749,
        "hash" : "000000000000000000001b2d82e3c85f3e9a6d64056a9af77cfceb2819f01059",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 856689,
        "hash" : "0000000000000000000049ed2a8a4527f8c83192f9ab13fcd5444aed37405cc3",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 853120,
        "hash" : "000000000000000000019066a8be0724175e18539db741579622738f1ce1f2ee",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 853051,
        "hash" : "000000000000000000007ad9be842fdb143133a8e5353627473006f94bcc086b",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 851248,
        "hash" : "00000000000000000001b302a79f8db40c150cdbaccaf43666b1ecfac9560a69",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 851170,
        "hash" : "0000000000000000000283dca37cca165a799e910fb566026968cfd28cffc3b3",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 849233,
        "hash" : "0000000000000000000020ea4b48f075a066131024c242b6f83eb20724c642d1",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 848860,
        "hash" : "000000000000000000003f620e65976fc1768e6f81705cc7fdf25cfcb421825a",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 848477,
        "hash" : "00000000000000000002ad15f6680bf74febab1020128641fab0da4bdfa5b4bd",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 847849,
        "hash" : "0000000000000000000327cda2d3d99ac20342aaaa6986837fbfa8903a7b2196",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 845627,
        "hash" : "0000000000000000000011018adf88550ea5d3e90ed0cfba89976aebc4e7f098",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 838792,
        "hash" : "00000000000000000002af7214c8796e102b0e9074a5d469266d7afe5af2f087",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 837929,
        "hash" : "000000000000000000016978fc164a420a2060c0a54290365df2f88587204c40",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 829613,
        "hash" : "0000000000000000000357088139cba6dc295875d7d3b2dd1fd764705727e451",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 827853,
        "hash" : "00000000000000000002c7de4016a0d09a47c19075cb73947e7f66e3461efd27",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 826152,
        "hash" : "00000000000000000000d4e6d4c176163b6c0608aee462ada8dd95b2e694dea1",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 823226,
        "hash" : "0000000000000000000365e705dbbea406f6e383f510d400fa23e40eae71e056",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 822261,
        "hash" : "00000000000000000003cc5fcca883d8474fe09d4d5fbbaaf526a201c61be2fb",
        "branchlen" : 1,
        "status" : "headers-only"
    },
    {
        "height" : 820819,
        "hash" : "000000000000000000008c3db1b630fe634eaef3c5a18d2e6289aa3bb8538d8d",
        "branchlen" : 1,
        "status" : "headers-only"
    },
    {
        "height" : 819343,
        "hash" : "0000000000000000000262af3fb1dd3bc62ad5a119c48a57267a3b96145ce82c",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 818038,
        "hash" : "000000000000000000029afbc6cbd660df5548a90ca9202e80866c5c680f29e4",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 816358,
        "hash" : "00000000000000000001d5f92e2dbbfcbc1e859873117e7983dd574857da5e14",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 815570,
        "hash" : "000000000000000000024c1b977ae540b29e329ccfc3bbb37f3b0880c2336212",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 815202,
        "hash" : "0000000000000000000093917031004a140b6db5c6adec217f814db98d7f0bde",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 815041,
        "hash" : "000000000000000000018dbe43dce84e99e8b6e3c486b6b99f5d35664ac3d894",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 813210,
        "hash" : "000000000000000000021c9f203786c0adcd7ae9a68a25d5e430d2a3dba613d5",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 804900,
        "hash" : "00000000000000000004c20bfe0ed1a9b714fbc07710531b8252dc998f9ccd67",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 803389,
        "hash" : "00000000000000000002ea858e57fc91ec34ae26a1d2a53720d7d4e08334fba2",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 800786,
        "hash" : "000000000000000000020e419bbdd75f21609d5a050a24bafe45b73a1574127d",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 797434,
        "hash" : "00000000000000000000fe9e3172a5d9ee3b815d952476a31056bc007657b83f",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 795426,
        "hash" : "000000000000000000045d66a7991b54de7e11776eed27e34df24a59b7de370e",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 789603,
        "hash" : "00000000000000000002cf6c7ae527fb21ce7721a7772c1da2998aa866b8a37a",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 789147,
        "hash" : "000000000000000000044390f8c5e9cfec8b27ba6d876d3cb7986b961f0eb30d",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 789135,
        "hash" : "0000000000000000000271e983f5999ee41b8fada533ffeb77a750e7d3a47c31",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 788837,
        "hash" : "00000000000000000002f51100fafb5c60b2dc9623554c219afef3cf398cecbe",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 788805,
        "hash" : "0000000000000000000313dae7541b4c58e93832ddeaf96f8d6a5b5f8157d494",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 788687,
        "hash" : "0000000000000000000070ec61b72a3cab40a0f5cea33e4266a08044fd48ee27",
        "branchlen" : 2,
        "status" : "valid-fork"
    },
    {
        "height" : 788254,
        "hash" : "000000000000000000015fe8c549ffcf5ef09e4ca884688d37c93e101a4f185c",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 783830,
        "hash" : "0000000000000000000366d2c12772a350f507879a5325203424e58ec440249b",
        "branchlen" : 1,
        "status" : "headers-only"
    },
    {
        "height" : 783478,
        "hash" : "0000000000000000000446f7d3093688ae697386fed3f52a63812678ea6b251d",
        "branchlen" : 1,
        "status" : "valid-fork"
    },
    {
        "height" : 782333,
        "hash" : "00000000000000000001a1abda3a2eb4acc211f64f8748d1a7635aad80690b7a",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 782129,
        "hash" : "000000000000000000036f461ab63c78f08401d3907a67fd2237166d8a373193",
        "branchlen" : 1,
        "status" : "valid-headers"
    },
    {
        "height" : 781487,
        "hash" : "0000000000000000000125e5d7c0d2e1b83982e5284ea21e08f5a73b8109d41b",
        "branchlen" : 1,
        "status" : "headers-only"
    }
]

@0xB10C
0xB10C force-pushed the 2025-08-add-forkmonitor-data branch from 1bbb127 to a899a2e Compare August 27, 2025 19:12
@ajtowns

ajtowns commented Aug 29, 2025 •

Copy link
Copy Markdown
Contributor

Forkmonitor runs an ancient v0.10.3 node. Turns out, v0.10.3 didn't have getblockheader and the getblock RPC fails with Can't read block from disk.

Maybe there's an alternative way of getting that block..

Did you figure this out? I don't see any missing blocks from that list of chaintips?

Previously, we were fetching the header but didn't end up using it
as it was already in `existing`.
@0xB10C

0xB10C commented Aug 29, 2025 •

Copy link
Copy Markdown
Collaborator Author

Added a commit to only fetch headers if we don't have them.

Did you figure this out? I don't see any missing blocks from that list of chaintips?

It tried to getblockheader on branchlen: 2 from the v0.10.3 node. As a work around I used getblock which also has previousblockhash. I don't know why it gave me a Can't read block from disk previously.

{
    "height" : 788687,
    "hash" : "0000000000000000000070ec61b72a3cab40a0f5cea33e4266a08044fd48ee27",
    "branchlen" : 2,
    "status" : "valid-fork"
},
diff --git a/get-data.py b/get-data.py
index 186be1f..2395160 100755
--- a/get-data.py
+++ b/get-data.py
@@ -87,7 +87,7 @@ def main(args):
             depth -= 1
             if depth == 0: break
             height -= 1
-            header = json.loads(cli("getblockheader", blockhash))
+            header = json.loads(cli("getblock", blockhash))
             blockhash = header["previousblockhash"]

     with open(args.header_csv, "w", newline="") as f:

@0xB10C
0xB10C marked this pull request as ready for review August 29, 2025 11:23
@0xB10C

0xB10C commented Aug 29, 2025

Copy link
Copy Markdown
Collaborator Author

thanks @Sjors @jonathanbier!

@0xB10C
0xB10C merged commit 80c2c07 into master Aug 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

forkmonitor.info block at height: 909489 Missing forkmonitor.info stale block at height 865333

2 participants