{
 "number": 33973,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/33973",
 "title": "test: Improve STRICTENC/DERSIG unit tests in script_tests.json",
 "author": "billymcbip",
 "author_association": "CONTRIBUTOR",
 "created_at": "2025-11-30T14:51:28Z",
 "updated_at": "2025-12-12T16:21:17Z",
 "age_days": 291,
 "draft": true,
 "labels": [
  "Tests"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "188f67326df243d45dbdef58d0a3f9ee453ba297",
 "head_ref": "script-tests",
 "head_repo": "billymcbip/bitcoin",
 "head_history": [
  {
   "t": "2025-12-05T22:38:12Z",
   "sha": "95e35cab4a108fbb1d88ce9ab727d73cb3e89279"
  },
  {
   "t": "2025-12-05T23:04:03Z",
   "sha": "6224b272ac291afd3af89f91e1deaccf233718bf"
  },
  {
   "t": "2025-12-10T16:26:06Z",
   "sha": "9bed0658bf55b190772cf222492792754e0deb25"
  },
  {
   "t": "2025-12-12T14:12:36Z",
   "sha": "188f67326df243d45dbdef58d0a3f9ee453ba297"
  }
 ],
 "additions": 48,
 "deletions": 9,
 "changed_files": 1,
 "commit_count": 1,
 "size_bucket": "S",
 "mergeable_state": "blocked",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "approach_ack": [
     {
      "login": "darosior",
      "url": "https://github.com/bitcoin/bitcoin/pull/33973#pullrequestreview-3541895187"
     }
    ]
   },
   "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": [
   "darosior",
   "fanquake"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "blocked",
  "last_author_activity": "2025-12-12T14:12:36Z",
  "last_reviewer_activity": "2025-12-09T16:35:00Z",
  "last_reviewer": "darosior",
  "author_silent_days": 279,
  "waiting_on_author_days": 0,
  "days_since_update": 278
 },
 "refs": {
  "mentioned": [
   34012
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 34012,
    "type": "issue",
    "state": "closed",
    "merged": false,
    "merged_at": null,
    "title": "ci: failure in Windows native job"
   }
  ],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "src/test/data/script_tests.json"
 ],
 "body": "Use the `DERSIG` flag instead of the `STRICTENC` flag for signature encoding tests. `STRICTENC` rules are a superset of `DERSIG` rules, and only `DERSIG` is a consensus flag. Also improve test descriptions and add two error cases to the `CHECKMULTISIG NOT` section to make it easier to understand how these tests work.\n\nTests pass on `6224b272ac291afd3af89f91e1deaccf233718bf`:\n```\ncmake -B build -DENABLE_WALLET=OFF\ncmake --build build --parallel 8\nctest --test-dir build --parallel 8\n```\n```\n  6/149 Test  #93: script_tests .........................   Passed    1.42 sec\n```",
 "commits": [
  {
   "sha": "188f67326df243d45dbdef58d0a3f9ee453ba297",
   "date": "2025-12-12T14:10:14Z",
   "message": "test: Improve STRICTENC/DERSIG unit tests in script_tests.json"
  }
 ],
 "timeline": [
  {
   "t": "2025-12-04T20:08:57Z",
   "kind": "review",
   "who": "darosior",
   "assoc": "MEMBER",
   "state": "COMMENTED",
   "commit": "a7e91d8e58441f751c28fed0512c380d9efa167b",
   "text": "Makes sense to test `DERSIG` separately from `STRICTENC` since it's the only one enabled by consensus. Concept/Approach ACK.\n\nMaintainers could we get the CI ran here?"
  },
  {
   "t": "2025-12-05T10:00:07Z",
   "kind": "comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "text": "Windows failure is unrelated: #34012."
  },
  {
   "t": "2025-12-05T14:26:07Z",
   "kind": "comment",
   "who": "darosior",
   "assoc": "MEMBER",
   "text": "Thanks!"
  },
  {
   "t": "2025-12-05T14:43:14Z",
   "kind": "review_comment",
   "who": "darosior",
   "assoc": "MEMBER",
   "path": "src/test/data/script_tests.json",
   "commit": "a7e91d8e58441f751c28fed0512c380d9efa167b",
   "in_reply_to": null,
   "text": "So here the correctly-DER-encoded signature is not a valid signature for the correctly-encoded public key, is that right?"
  },
  {
   "t": "2025-12-05T14:45:24Z",
   "kind": "review",
   "who": "darosior",
   "assoc": "MEMBER",
   "state": "COMMENTED",
   "commit": "a7e91d8e58441f751c28fed0512c380d9efa167b",
   "text": "Looks good to me, just want to confirm my understanding of one of the test cases."
  },
  {
   "t": "2025-12-05T22:38:12Z",
   "kind": "force_push",
   "who": "billymcbip",
   "commit": "95e35cab4a108fbb1d88ce9ab727d73cb3e89279"
  },
  {
   "t": "2025-12-05T22:47:00Z",
   "kind": "review_comment",
   "who": "billymcbip",
   "assoc": "CONTRIBUTOR",
   "path": "src/test/data/script_tests.json",
   "commit": "a7e91d8e58441f751c28fed0512c380d9efa167b",
   "in_reply_to": 2592933311,
   "text": "That's exactly right, but I think there was a mistake in the test. It should use `OP_1` for the second signature instead of `OP_0`, because `IsValidSignatureEncoding` is not run for empty signatures."
  },
  {
   "t": "2025-12-05T22:55:59Z",
   "kind": "comment",
   "who": "billymcbip",
   "assoc": "CONTRIBUTOR",
   "text": "Updated `CHECKMULTISIG NOT` tests:\n- Removed a comment referencing a test file that no longer exists.\n- Improved test descriptions.\n- Added negative cases to make the tests easier to understand.\n- Changed invalid signature push from `OP_0` to `OP_1` because `IsValidSignatureEncoding` isn't called for empty sigs."
  },
  {
   "t": "2025-12-05T23:04:03Z",
   "kind": "force_push",
   "who": "billymcbip",
   "commit": "6224b272ac291afd3af89f91e1deaccf233718bf"
  },
  {
   "t": "2025-12-05T23:06:58Z",
   "kind": "comment",
   "who": "billymcbip",
   "assoc": "CONTRIBUTOR",
   "text": "~On second thought, I think it's better to simply replace the `STRICTENC` flag with `DERSIG` when applicable instead of creating new tests. It makes the test file easier to parse.~\n\nEdit: NVM."
  },
  {
   "t": "2025-12-07T15:56:34Z",
   "kind": "comment",
   "who": "billymcbip",
   "assoc": "CONTRIBUTOR",
   "text": "Closed by accident. I still intend to ship this change."
  },
  {
   "t": "2025-12-09T16:35:00Z",
   "kind": "comment",
   "who": "darosior",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI'd recommend sticking to the previous approach of adding those as additional test cases. The marginal cost of an additional test case is negligible, while removing existing cases makes it harder to review because it might reduce coverage."
  },
  {
   "t": "2025-12-10T16:26:06Z",
   "kind": "force_push",
   "who": "billymcbip",
   "commit": "9bed0658bf55b190772cf222492792754e0deb25"
  },
  {
   "t": "2025-12-10T16:31:10Z",
   "kind": "comment",
   "who": "billymcbip",
   "assoc": "CONTRIBUTOR",
   "text": "@darosior I added the STRICTENC tests back. Maintainers can we run CI?"
  },
  {
   "t": "2025-12-12T14:12:36Z",
   "kind": "force_push",
   "who": "billymcbip",
   "commit": "188f67326df243d45dbdef58d0a3f9ee453ba297"
  }
 ],
 "labels_log": [
  {
   "t": "2025-11-30T14:51:31Z",
   "action": "labeled",
   "label": "Tests",
   "who": "DrahtBot"
  },
  {
   "t": "2025-12-04T21:40:06Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2025-12-05T11:25:35Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2025-12-05T10:08:51Z",
   "kind": "closed",
   "who": "maflcko"
  },
  {
   "t": "2025-12-05T10:09:03Z",
   "kind": "reopened",
   "who": "maflcko"
  },
  {
   "t": "2025-12-05T23:08:04Z",
   "kind": "renamed",
   "who": "billymcbip",
   "from": "test: Add DERSIG unit tests to script_tests.json",
   "to": "test: Improve STRICTENC/DERSIG unit tests in script_tests.json"
  },
  {
   "t": "2025-12-07T15:38:09Z",
   "kind": "closed",
   "who": "billymcbip"
  },
  {
   "t": "2025-12-07T15:53:24Z",
   "kind": "reopened",
   "who": "billymcbip"
  },
  {
   "t": "2025-12-12T16:21:17Z",
   "kind": "convert_to_draft",
   "who": "billymcbip"
  }
 ],
 "text_chars": 2220,
 "text_tokens_estimate": 555,
 "changed_paths": [],
 "files": [],
 "test_lines": null,
 "git": null,
 "input_hash": "63dd79783b4d8132",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}