{
 "number": 36129,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36129",
 "title": "fuzz: reset chainman after external block imports",
 "author": "HowHsu",
 "author_association": "CONTRIBUTOR",
 "created_at": "2026-08-31T13:45:39Z",
 "updated_at": "2026-09-03T12:36:43Z",
 "age_days": 17,
 "draft": true,
 "labels": [
  "Fuzzing"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "eb3c6f296d7350951e5aba9d6407eadd27558a95",
 "head_ref": "fuzz-reset-load-external-chainman",
 "head_repo": "HowHsu/bitcoin",
 "head_history": [
  {
   "t": "2026-09-03T12:36:43Z",
   "sha": "eb3c6f296d7350951e5aba9d6407eadd27558a95"
  }
 ],
 "additions": 23,
 "deletions": 2,
 "changed_files": 1,
 "commit_count": 1,
 "size_bucket": "S",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {},
   "conflicts": []
  }
 },
 "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": [
   "maflcko"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-09-03T12:36:43Z",
  "last_reviewer_activity": "2026-09-01T07:22:10Z",
  "last_reviewer": "maflcko",
  "author_silent_days": 14,
  "waiting_on_author_days": 0,
  "days_since_update": 14
 },
 "refs": {
  "mentioned": [],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "src/test/fuzz/load_external_block_file.cpp"
 ],
 "body": "`LoadExternalBlockFile()` may add headers to the block index even when full block validation fails. Reusing the static chainman therefore lets one fuzz input affect later inputs and makes all-corpus coverage order-dependent.\n\nRecreate the chainman after each processed input, disable unused network setup so `PeerManager` cannot retain a reference to it, and reseed the deterministic test RNG consumed by chainman initialization.\n\nTested with `run_deterministic_fuzz_coverage.sh load_external_block_file 20`: all 930 corpus inputs passed both the individual-repeat and randomized all-corpus checks.",
 "commits": [
  {
   "sha": "eb3c6f296d7350951e5aba9d6407eadd27558a95",
   "date": "2026-09-03T12:36:15Z",
   "message": "fuzz: reset chainman after external block imports\n\nLoadExternalBlockFile may add headers to the block index even when\nfull block validation fails. Reusing the static chainman lets one fuzz\ninput affect later inputs and makes shuffled corpus coverage\norder-dependent."
  }
 ],
 "timeline": [
  {
   "t": "2026-09-01T07:22:10Z",
   "kind": "review_comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "path": "src/test/fuzz/load_external_block_file.cpp",
   "commit": "0243779e735b7da455977d59ab589ab5f1780805",
   "in_reply_to": null,
   "text": "Will it be faster if there is a dirty-guard to only run this when needed?"
  },
  {
   "t": "2026-09-03T09:30:59Z",
   "kind": "review_comment",
   "who": "HowHsu",
   "assoc": "CONTRIBUTOR",
   "path": "src/test/fuzz/load_external_block_file.cpp",
   "commit": "0243779e735b7da455977d59ab589ab5f1780805",
   "in_reply_to": 3901705831,
   "text": "[quoted text omitted]\n\nYes, but seems only check the index size change is not enough, at least the change of  `m_last_notified_header` depends on the input order, there could be other variables at play. How about make this unconditional reset version as our first step?"
  },
  {
   "t": "2026-09-03T12:36:43Z",
   "kind": "force_push",
   "who": "HowHsu",
   "commit": "eb3c6f296d7350951e5aba9d6407eadd27558a95"
  }
 ],
 "labels_log": [
  {
   "t": "2026-08-31T13:45:44Z",
   "action": "labeled",
   "label": "Fuzzing",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 1259,
 "text_tokens_estimate": 314,
 "changed_paths": [
  "src/test/fuzz/load_external_block_file.cpp"
 ],
 "files": [
  {
   "path": "src/test/fuzz/load_external_block_file.cpp",
   "add": 23,
   "del": 2
  }
 ],
 "test_lines": 25,
 "git": {
  "head": "eb3c6f296d7350951e5aba9d6407eadd27558a95",
  "head_matches_backup": true,
  "base": "d2e24e951de45e7e8d328ef36b80c055c90a6fdd",
  "commits": [
   {
    "sha": "eb3c6f296d",
    "subject": "fuzz: reset chainman after external block imports",
    "files": 1,
    "add": 23,
    "del": 2
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "a4598934b6dcbdbd",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}