{
 "number": 33854,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/33854",
 "title": "fix assumevalid is ignored during reindex",
 "author": "Eunovo",
 "author_association": "MEMBER",
 "created_at": "2025-11-11T14:21:14Z",
 "updated_at": "2026-09-17T11:27:52Z",
 "age_days": 310,
 "draft": false,
 "labels": [
  "Validation",
  "Needs rebase"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "ce8eeac9be2fee77c0fc968c2886de309c6ef01c",
 "head_ref": "reindex-assumevalid-take2",
 "head_repo": "Eunovo/bitcoin",
 "head_history": [
  {
   "t": "2025-11-12T22:17:17Z",
   "sha": "dd0d5c5ae6c73e2f313fc46db86aac135a3528e0"
  },
  {
   "t": "2025-11-12T22:22:21Z",
   "sha": "8128a5ed848706306fcec4755af90b0a496c7cf3"
  },
  {
   "t": "2025-11-12T22:35:24Z",
   "sha": "86c3dc7a31e86437692145cf8279fea224c23642"
  },
  {
   "t": "2025-11-19T13:00:26Z",
   "sha": "da3cad603e292b839a2f9ef88cfd0ff762ae80ba"
  },
  {
   "t": "2025-11-19T13:19:00Z",
   "sha": "bb6563681ca9e86d130498d12bbd858e64a0f06f"
  },
  {
   "t": "2025-11-20T11:08:23Z",
   "sha": "b91f63093f2e17a3d86bf4081ad5e1b17581ffd5"
  },
  {
   "t": "2025-11-21T16:18:11Z",
   "sha": "b59ca7602bf9efaad80b3465129685ee1d09a028"
  },
  {
   "t": "2025-11-25T16:04:41Z",
   "sha": "729bf4d627f3bc3414af22990fcf67af2d50d4cf"
  },
  {
   "t": "2025-12-17T09:00:57Z",
   "sha": "6eab0e8ad14745338d32a59fed40d6792c0750dc"
  },
  {
   "t": "2026-01-08T12:11:19Z",
   "sha": "984ccb58b3016fba5fcc5b68b1544de1aafd61c5"
  },
  {
   "t": "2026-01-08T15:45:55Z",
   "sha": "d6420a8487e48db0e77e3a4e4b77aedf4b8b9697"
  },
  {
   "t": "2026-01-09T10:16:54Z",
   "sha": "4ced1ae7875e5dce8fa82361e4237a1c934b5845"
  },
  {
   "t": "2026-02-02T15:16:06Z",
   "sha": "f3c6e15faa55727df8d309b7f741088ee65ba372"
  },
  {
   "t": "2026-02-08T12:58:11Z",
   "sha": "795c9189223b5e438b31e3ca5dc941354eef0a4f"
  },
  {
   "t": "2026-04-29T09:53:08Z",
   "sha": "8e078dab5fbef19cadfab56b2713550c74b58505"
  },
  {
   "t": "2026-04-29T11:30:07Z",
   "sha": "74a73bb477adc084834bb473ced3fa3044e03fcc"
  },
  {
   "t": "2026-07-21T11:11:43Z",
   "sha": "ce8eeac9be2fee77c0fc968c2886de309c6ef01c"
  }
 ],
 "additions": 285,
 "deletions": 96,
 "changed_files": 11,
 "commit_count": 8,
 "size_bucket": "M",
 "mergeable_state": "dirty",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "concept_ack": [
     {
      "login": "l0rinc",
      "url": "https://github.com/bitcoin/bitcoin/pull/33854#issuecomment-3570695985"
     }
    ]
   },
   "conflicts": [
    {
     "number": 36182,
     "title": "fees: return `block_policy` fee rate estimate when `mempool_policy` is not ready",
     "author": "ismaelsadeeq"
    },
    {
     "number": 36000,
     "title": "validation: prefetch blocks while connecting",
     "author": "l0rinc"
    },
    {
     "number": 35646,
     "title": "RFC: Separate out runtime errors from BlockValidationState using `util::Expected`",
     "author": "yuvicc"
    },
    {
     "number": 35570,
     "title": "refactor: Change some validation.cpp methods to return BlockValidationState",
     "author": "optout21"
    },
    {
     "number": 35522,
     "title": "refactor: Extract per-message helpers from SendMessages() (move-only)",
     "author": "pablomartin4btc"
    },
    {
     "number": 35071,
     "title": "Reindex: save progress to continue after interruption",
     "author": "pinheadmz"
    },
    {
     "number": 34743,
     "title": "p2p: don't disconnect manual peers for block stalling",
     "author": "willcl-ark"
    },
    {
     "number": 33637,
     "title": "refactor: optimize block index comparisons (1.4-6.8x faster)",
     "author": "l0rinc"
    },
    {
     "number": 33324,
     "title": "blocks: add resumable reobfuscation for existing block files",
     "author": "l0rinc"
    },
    {
     "number": 30342,
     "title": "kernel, logging: Pass Logger instances to kernel objects",
     "author": "ryanofsky"
    },
    {
     "number": 29700,
     "title": "kernel, refactor: return error status on all fatal errors",
     "author": "ryanofsky"
    }
   ]
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "gmaxwell",
   "hodlinator",
   "l0rinc",
   "mzumsande",
   "sedited"
  ]
 },
 "signals": {
  "needs_rebase": true,
  "ci_failed": false,
  "mergeable_state": "dirty",
  "last_author_activity": "2026-07-21T11:11:43Z",
  "last_reviewer_activity": "2026-09-17T11:27:43Z",
  "last_reviewer": "sedited",
  "author_silent_days": 58,
  "waiting_on_author_days": 0,
  "days_since_update": 0
 },
 "refs": {
  "mentioned": [
   10357,
   31494,
   31615
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 31494,
    "type": "issue",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "assumevalid is not always applied when reindexing"
   },
   {
    "number": 31615,
    "type": "pull",
    "state": "closed",
    "merged": false,
    "merged_at": null,
    "title": "validation: ensure assumevalid is always used during reindex"
   },
   {
    "number": 10357,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2017-09-06",
    "title": "Allow setting nMinimumChainWork on command line"
   }
  ],
  "conflicts": [
   36182,
   36000,
   35646,
   35570,
   35522,
   35071,
   34743,
   33637,
   33324,
   30342,
   29700
  ]
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "During a reindex, the assumevalid setting may be ignored if the chainwork of the best header is below `minimumchainwork`. This happens when the previous IBD was stopped before connecting enough blocks to reach the required `minimumchainwork`. The assumevalid block will also be missing from the block index because the assumevalid block is set to match the `minimumchainwork`. See [Issue #31494](https://github.com/bitcoin/bitcoin/issues/31494).\n\nAs a result, `reindex` can take significantly longer to complete than necessary.\n\nThis PR addresses the issue by modifying reindex behaviour: if the chainwork of the `best_header` is below `minimumchainwork`, the node skips the `ActivateBestChain()` step and proceeds directly to synchronisation.\n\nThis PR takes a different approach from [PR #31615](https://github.com/bitcoin/bitcoin/pull/31615) to keep the validation path for `reindex` the same as the regular IBD validation path.\n\nDevelopers benchmarking IBD with `-reindex` may find this behaviour undesirable. In such cases, it\u2019s recommended to use `-reindex-chainstate` instead or ensure that the available blocks have sufficient chainwork.\n\n`libbitcoinkernel` exposes the `ImportBlocks` function and expects `reindex` to connect blocks, so an attempt was made to preserve the existing behaviour for `libbitcoinkernel`.",
 "commits": [
  {
   "sha": "dc7aac5e193dbb683e0136df178c46ac54f3ad96",
   "date": "2026-07-16T09:54:23Z",
   "message": "importblocks: ensure genesis block is activated\n\nThis commit sets the stage for future commits that will change the behavior of ImportBlocks to conditionally ActivateBestChain after reindex"
  },
  {
   "sha": "54d68c17a6c94d73c545cb3ca7908c7d6273d8b7",
   "date": "2026-07-16T09:55:42Z",
   "message": "importblocks: don't connect reindexed low work chains\n\nThis change will allow headers sync to discover a long enough chain before connecting blocks.\n`force_activation` is required to preserve `ImportBlocks` behavior in libbitcoinkernel."
  },
  {
   "sha": "3cdad2721177b53ae8d8c193a530d63075b444ec",
   "date": "2026-07-16T09:55:42Z",
   "message": "notifications: add header_tip mutex\n\nThe background init thread will wait on this mutex for header tip updates to determin whether to ActivateBestChain  in future commits.."
  },
  {
   "sha": "143c840df44a01428cddbc42bb164ef4a4fba796",
   "date": "2026-07-16T09:55:42Z",
   "message": "net: allow headers sync during reindex\n\nThis commit removes:\n- LoadingBlocks() guard that prevent HEADERS sync during reindex, and\n- adds a LoadingBlocks() guard that prevents requesting blocks during reindex\n\nBlocks must not be requested while LoadingBlocks() is `true` because they will be\nrejected when received and this might lead to the peer being disconnected because\nthe requested block will never be removed from vBlocksInFlight.\n\nNote that we cannot connect Blocks while LoadingBlocks() is `true` because this can\nblock the p2p process message thread for a long time if a long chain is being connected\nin the background."
  },
  {
   "sha": "9a48a6cc399157cb067e5aec437bd4c9d598b6db",
   "date": "2026-07-16T09:55:42Z",
   "message": "test: update anti-dos test\n\nFuture commits will change the LoadingBlocks stage to only end after best_header has at least minchainwork.\nMining a block at the tip will no longer be enough to trigger the \"unrequested block\" scenario."
  },
  {
   "sha": "9484be15aa3860624ca4c3ba574003b1b162f830",
   "date": "2026-07-16T13:00:37Z",
   "message": "init: keep bg init thread until headers sync is done\n\nLoadingBlocks() will now remain true until headers sync is complete.\nTo preserve `btck_chainstate_manager_import_blocks` behaviour,\n`ImportBlocks` will set `m_blockman.m_importing` if called with\n`force_activation = True`, otherwise, `ImportBlocks` has been called\nfrom the background init thread and we assert that `m_blockman.m_importing`\nis already set."
  },
  {
   "sha": "6db013660405529e655bcdcbb6a6e920f1168ff8",
   "date": "2026-07-16T13:00:37Z",
   "message": "test/reindex: only connect minchainwork chain"
  },
  {
   "sha": "ce8eeac9be2fee77c0fc968c2886de309c6ef01c",
   "date": "2026-07-16T13:00:37Z",
   "message": "test: script ver is skipped during reindex with -assumevalid\n\nTest that `-assumevalid` is not ignored even when `minchainwork` is higher\nthan the `best_header` on disk during reindex."
  }
 ],
 "timeline": [
  {
   "t": "2025-11-11T17:55:59Z",
   "kind": "review",
   "who": "mzumsande",
   "assoc": "MEMBER",
   "state": "COMMENTED",
   "commit": "66bf75bf91e9336a6050e2744e074654546e9342",
   "text": "Have you tried this out on signet or mainnet?\nI haven't yet, but just from looking at the code I would suspect that we now\n\n1. do the -reindex part without connecting any blocks (except genesis [here](https://github.com/bitcoin/bitcoin/blob/138726a6f8101e0fe7e9ae701ef17b37fcbdee73/src/validation.cpp#L5161))\n2. omplete headers-sync with a peer until minchainwork\n3.  Download the first block we don't have on disk from a peer and only then call `ActivateBestChain()`\n4. try to connect that block, which will result in the entire chain up to that block being connected by the `msghand` thread. This could block the thread hours, in which no other peer would be processed, so existing peers will get disconnected (ping timeout), while net thread will still continually make new connections (that never complete the version handshake because we are too busy connecting blocks).\n\nAlso, attempting to reindex while offline wouldn't work anymore if we are below minchainwork."
  },
  {
   "t": "2025-11-12T08:54:15Z",
   "kind": "comment",
   "who": "hodlinator",
   "assoc": "MEMBER",
   "text": "Thanks for trying this out @Eunovo!\n\n[quoted text omitted]\nWould it be acceptable to emit an error and halt, saying that `-reindex` for cases where nodes don't have sufficient block data also requires decreasing `-minimumchainwork=` to whatever level we have in the block data?\nCould also explain that this is in order to keep logic consistent regardless of `-reindex`, and also say that running with lowered `-minimumchainwork` long-term is not advisable.\n\nNot the cleanest perhaps. But we have 2 main usages of `-reindex` AFAIK:\n* Regular node-runners which run into some kind of disk corruption issue - they should typically have peers available to sync headers from.\n* Developers doing benchmarks/other work who either have sufficient block data or are okay with lowering `-minimumchainwork` temporarily."
  },
  {
   "t": "2025-11-12T10:36:33Z",
   "kind": "comment",
   "who": "l0rinc",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI don't know anyone who does `-reindex` benchmarks anymore - `-reindex-chainstate` is usually enough, `-reindex` isn't representative of IBD so we have stopped relying on it.\n\n[quoted text omitted]\nI haven't checked the code yet (am planning on doing that later), but would it be possible to just issue a warning if we're offline and attempt the reindex anyway (especially now that we have proper script verification logging to show if script verification was enabled)?"
  },
  {
   "t": "2025-11-12T22:17:17Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "dd0d5c5ae6c73e2f313fc46db86aac135a3528e0"
  },
  {
   "t": "2025-11-12T22:22:21Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "8128a5ed848706306fcec4755af90b0a496c7cf3"
  },
  {
   "t": "2025-11-12T22:35:24Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "86c3dc7a31e86437692145cf8279fea224c23642"
  },
  {
   "t": "2025-11-12T22:38:52Z",
   "kind": "comment",
   "who": "Eunovo",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI don't think it is particularly important that reindex be able to complete offline. As @hodlinator pointed out:\n\n[quoted text omitted]\nIn both use cases, network access is not an issue.\n\n[quoted text omitted]\nIt is possible to do this, but will this be considered a better solution than automatically doing headers sync?\n\n[quoted text omitted]\nIBD does not work offline anyway. I'm not sure this will be better to implement, unless there is a use-case that requires `-reindex` to work offline with a low-work chain."
  },
  {
   "t": "2025-11-19T13:00:26Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "da3cad603e292b839a2f9ef88cfd0ff762ae80ba"
  },
  {
   "t": "2025-11-19T13:19:00Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "bb6563681ca9e86d130498d12bbd858e64a0f06f"
  },
  {
   "t": "2025-11-20T11:08:23Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "b91f63093f2e17a3d86bf4081ad5e1b17581ffd5"
  },
  {
   "t": "2025-11-21T16:18:11Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "b59ca7602bf9efaad80b3465129685ee1d09a028"
  },
  {
   "t": "2025-11-21T20:51:30Z",
   "kind": "comment",
   "who": "Eunovo",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI've pushed a solution to this. In the current implementation, the background init thread waits for enough headers to be indexed.  When `best_header.nChainwork` becomes greater than or equal to `MinimumChainWork()`, the outstanding blocks will be connected on the background init thread; the p2p message processing thread will reject any new blocks while the outstanding blocks are being connected."
  },
  {
   "t": "2025-11-24T08:16:12Z",
   "kind": "comment",
   "who": "hodlinator",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nThis suggestion was meant for the case where we can't do headers sync due to being offline (using zero peers after a certain timeout or something like that, I'm not sure how to best check whether we are offline). I guess the error message could also point out that going online should resolve the situation."
  },
  {
   "t": "2025-11-24T09:15:50Z",
   "kind": "comment",
   "who": "Eunovo",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI see. A message that indicates that the node is waiting for headers sync to finish reindex will be valuable. We probably don't need to check that we are offline at all."
  },
  {
   "t": "2025-11-24T13:02:57Z",
   "kind": "comment",
   "who": "l0rinc",
   "assoc": "MEMBER",
   "text": "I have checked if it fixes the problem I have noticed a year ago and now that https://github.com/bitcoin/bitcoin/pull/33336 landed it's even simpler to do a reproducer:\n```bash\nfor COMMIT in 509dc91db143fe2ebb4e910680aca97ba62233b9 b59ca7602bf9efaad80b3465129685ee1d09a028; do\n  (echo \"\"; git fetch -q origin $COMMIT >/dev/null 2>&1 && git checkout -q $COMMIT && git log -1 --pretty='%h %s' || exit 1) && \\\n  cmake -B build >/dev/null 2>&1 && cmake --build build -j$(nproc) >/dev/null 2>&1 && \\\n  killall -9 bitcoind >/dev/null 2>&1; rm -rf demo >/dev/null 2>&1; mkdir -p demo >/dev/null 2>&1 && \\\n  build/bin/bitcoind -datadir=demo -stopatheight=10 >/dev/null 2>&1 && \\\n  build/bin/bitcoind -datadir=demo -stopatheight=10 -reindex >/dev/null 2>&1 && \\\n  build/bin/bitcoind -datadir=demo -stopatheight=10 -reindex-chainstate | grep \"script verification\"\ndone\n```\n\nWhich correctly prints:\n```bash\n509dc91db1 Merge bitcoin/bitcoin#33026: test, refactor: Embedded ASMap [1/3]: Selected minor preparatory work\n2025-11-24T12:54:28Z Enabling script verification at block #1 (00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048): assumevalid hash not in headers.\n\nb59ca7602b test/reindex: only connect minchainwork chain\n2025-11-24T12:59:32Z Disabling script verification at block #1 (00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048).\n```\n\nnit: maybe this style of checking via the logs could simplify the testing of the PR\nnit2: the `LLM Linter` has 2 valid comments\n\nConcept ACK"
  },
  {
   "t": "2025-11-25T16:04:41Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "729bf4d627f3bc3414af22990fcf67af2d50d4cf"
  },
  {
   "t": "2025-11-26T16:06:23Z",
   "kind": "comment",
   "who": "Eunovo",
   "assoc": "MEMBER",
   "text": "Thanks for the reviews.\n\n@l0rinc I added your test as an automated test in https://github.com/bitcoin/bitcoin/pull/33854/commits/729bf4d627f3bc3414af22990fcf67af2d50d4cf\n@hodlinator I added a useful log message in https://github.com/bitcoin/bitcoin/pull/33854/commits/729bf4d627f3bc3414af22990fcf67af2d50d4cf"
  },
  {
   "t": "2025-11-27T04:19:55Z",
   "kind": "comment",
   "who": "gmaxwell",
   "assoc": "CONTRIBUTOR",
   "text": "I think minimumchainwork being configurable may violate the underlying security assumption that made me feel comfortable writing assumevalid in the first place.\n\nThe concern is that attackers (or developers operating under coercion) could target victims with false statements that due to some \"network incident\" they must start nodes with -assumevalid=<badchainhash> (and use DOS attacks to prevent syncing an honest chain).  AV security assumption there is that the bad chain needs to have two weeks of work at a contemporary difficulty on top of it.  If an attacker is able to do that then there are other at-least-as-serious problems.\n\nThe idea is that the attacker must either control enough hashpower to cause serious reorgs OR convince the users to actually patch/replace the software and not just reconfigure it.  (And of course, if they can convince the user of that-- it's game over as they can do anything).\n\nThis security assumption is documented in the source code:\n```\n                // The equivalent time check discourages hash power from extorting the network via DOS attack\n                //  into accepting an invalid block through telling users they must manually set assumevalid.\n                //  Requiring a software change or burying the invalid block, regardless of the setting, makes\n                //  it hard to hide the implication of the demand.\n```\n\nSo I think advising anywhere to change that value is not a good idea and that it was a mistake to make this value configurable on mainnet without clamping it to the hardcoded value... though #10357 doesn't really explain the motivation outside of test harnesses enough for me to say for certain.   As it is, however, it does break my security assumptions in a way that concerns me."
  },
  {
   "t": "2025-12-17T09:00:57Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "6eab0e8ad14745338d32a59fed40d6792c0750dc"
  },
  {
   "t": "2026-01-08T12:11:19Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "984ccb58b3016fba5fcc5b68b1544de1aafd61c5"
  },
  {
   "t": "2026-01-08T15:45:55Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "d6420a8487e48db0e77e3a4e4b77aedf4b8b9697"
  },
  {
   "t": "2026-01-09T10:16:54Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "4ced1ae7875e5dce8fa82361e4237a1c934b5845"
  },
  {
   "t": "2026-02-02T15:16:06Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "f3c6e15faa55727df8d309b7f741088ee65ba372"
  },
  {
   "t": "2026-02-08T12:58:11Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "795c9189223b5e438b31e3ca5dc941354eef0a4f"
  },
  {
   "t": "2026-04-29T09:53:08Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "8e078dab5fbef19cadfab56b2713550c74b58505"
  },
  {
   "t": "2026-04-29T11:30:07Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "74a73bb477adc084834bb473ced3fa3044e03fcc"
  },
  {
   "t": "2026-07-21T11:11:43Z",
   "kind": "force_push",
   "who": "Eunovo",
   "commit": "ce8eeac9be2fee77c0fc968c2886de309c6ef01c"
  },
  {
   "t": "2026-09-17T11:27:43Z",
   "kind": "comment",
   "who": "sedited",
   "assoc": "MEMBER",
   "text": "This is a quite complicated change for what should be such a simple concept! I'm also not sure about the approach. AFAICT this makes it hard to reindex when you are not connected to the network? This pull request has also not been getting review since last year and I'm sure it is not very easy to keep rebased.\n\nHow about limiting the changes to just the functionality that the fourth commit introduces: Allowing for the reindex to continue while headers are being processed again. That would be inherently racy, but it also seems like a simpler alternative that would get us most of the way there? Maybe the juice is also just not worth the squeeze for a salvage scenario that does not happen often."
  }
 ],
 "labels_log": [
  {
   "t": "2025-11-11T14:21:18Z",
   "action": "labeled",
   "label": "Validation",
   "who": "DrahtBot"
  },
  {
   "t": "2025-11-11T15:57:00Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2025-11-12T23:33:05Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2025-11-19T14:43:59Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2025-11-21T17:41:46Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2025-12-16T15:28:36Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2025-12-17T10:37:08Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2025-12-22T16:45:25Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-01-08T12:53:28Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-01-08T13:28:26Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-01-09T11:33:47Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-01-29T13:12:58Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-02-02T17:04:00Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-02-07T01:38:05Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-02-08T13:10:58Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-19T10:07:15Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-29T10:44:24Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-29T10:59:36Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-04-29T12:45:49Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-07-06T13:59:52Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-07-21T12:35:50Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-09-14T15:53:52Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2025-11-11T15:33:35Z",
   "kind": "convert_to_draft",
   "who": "Eunovo"
  },
  {
   "t": "2025-11-21T20:51:51Z",
   "kind": "ready_for_review",
   "who": "Eunovo"
  },
  {
   "t": "2025-11-24T09:30:52Z",
   "kind": "renamed",
   "who": "Eunovo",
   "from": "validation: fix assumevalid is ignored during reindex",
   "to": "fix assumevalid is ignored during reindex"
  }
 ],
 "text_chars": 11525,
 "text_tokens_estimate": 2881,
 "changed_paths": [
  "src/init.cpp",
  "src/net_processing.cpp",
  "src/node/blockstorage.cpp",
  "src/node/blockstorage.h",
  "src/node/kernel_notifications.cpp",
  "src/node/kernel_notifications.h",
  "src/validation.cpp",
  "src/validation.h",
  "test/functional/feature_assumevalid.py",
  "test/functional/feature_reindex.py",
  "test/functional/p2p_unrequested_blocks.py"
 ],
 "files": [
  {
   "path": "src/init.cpp",
   "add": 49,
   "del": 20
  },
  {
   "path": "src/net_processing.cpp",
   "add": 5,
   "del": 9
  },
  {
   "path": "src/node/blockstorage.cpp",
   "add": 39,
   "del": 24
  },
  {
   "path": "src/node/blockstorage.h",
   "add": 32,
   "del": 1
  },
  {
   "path": "src/node/kernel_notifications.cpp",
   "add": 4,
   "del": 0
  },
  {
   "path": "src/node/kernel_notifications.h",
   "add": 4,
   "del": 1
  },
  {
   "path": "src/validation.cpp",
   "add": 31,
   "del": 25
  },
  {
   "path": "src/validation.h",
   "add": 13,
   "del": 0
  },
  {
   "path": "test/functional/feature_assumevalid.py",
   "add": 26,
   "del": 1
  },
  {
   "path": "test/functional/feature_reindex.py",
   "add": 55,
   "del": 1
  },
  {
   "path": "test/functional/p2p_unrequested_blocks.py",
   "add": 27,
   "del": 14
  }
 ],
 "test_lines": 124,
 "git": {
  "head": "ce8eeac9be2fee77c0fc968c2886de309c6ef01c",
  "head_matches_backup": true,
  "base": "70d9ec7f3d452789d04dce81dc02db0b3b778bb5",
  "commits": [
   {
    "sha": "dc7aac5e19",
    "subject": "importblocks: ensure genesis block is activated",
    "files": 4,
    "add": 64,
    "del": 28
   },
   {
    "sha": "54d68c17a6",
    "subject": "importblocks: don't connect reindexed low work chains",
    "files": 3,
    "add": 18,
    "del": 5
   },
   {
    "sha": "3cdad27211",
    "subject": "notifications: add header_tip mutex",
    "files": 3,
    "add": 12,
    "del": 2
   },
   {
    "sha": "143c840df4",
    "subject": "net: allow headers sync during reindex",
    "files": 1,
    "add": 5,
    "del": 9
   },
   {
    "sha": "9a48a6cc39",
    "subject": "test: update anti-dos test",
    "files": 1,
    "add": 27,
    "del": 14
   },
   {
    "sha": "9484be15aa",
    "subject": "init: keep bg init thread until headers sync is done",
    "files": 3,
    "add": 81,
    "del": 39
   },
   {
    "sha": "6db0136604",
    "subject": "test/reindex: only connect minchainwork chain",
    "files": 1,
    "add": 54,
    "del": 0
   },
   {
    "sha": "ce8eeac9be",
    "subject": "test: script ver is skipped during reindex with -assumevalid",
    "files": 1,
    "add": 26,
    "del": 1
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "81e37fa07d44cc4e",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}