{
 "number": 24773,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/24773",
 "title": "Enable HW-accelerated implementations of SHA256 for MSVC builds",
 "author": "hebasto",
 "author_association": "MEMBER",
 "created_at": "2022-04-05T15:43:38Z",
 "updated_at": "2026-08-19T13:09:57Z",
 "age_days": 1626,
 "draft": false,
 "labels": [
  "Build system",
  "Utils/log/libs"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "21da1452af3557e82c0c45395c6aeb98bd89717e",
 "head_ref": "220405-avx2",
 "head_repo": "hebasto/bitcoin",
 "head_history": [
  {
   "t": "2022-04-19T16:20:07Z",
   "sha": "7c11a91fd94fbd065ceafce1ee58956e7a02cbbc"
  },
  {
   "t": "2022-11-28T14:32:30Z",
   "sha": "605af499c1342004103db4fa907c6009a547a937"
  },
  {
   "t": "2022-11-28T14:41:19Z",
   "sha": "f3c4857e8aa01670f5331f7e2d717bb004ab8ca3"
  },
  {
   "t": "2022-11-28T14:58:12Z",
   "sha": "daddd587e3389d5e926f70aba133d0d803cc66f2"
  },
  {
   "t": "2022-11-28T16:20:16Z",
   "sha": "b27defef4218b249a2ec5ec0dd033f62add8daf1"
  },
  {
   "t": "2022-11-28T17:16:11Z",
   "sha": "674d3e9a405bebd6388632dbc23b733c65c7887c"
  },
  {
   "t": "2023-05-04T17:55:59Z",
   "sha": "915bdbdf8c87e20426161bbf393d1036659813a2"
  },
  {
   "t": "2023-05-09T17:28:49Z",
   "sha": "73a16b2769e5cb08ff6027d80e0dec48f9acc36f"
  },
  {
   "t": "2023-05-18T12:31:11Z",
   "sha": "e8fea3f24b9318f51c3ef4791c28c69ff24ffce1"
  },
  {
   "t": "2023-09-20T20:18:16Z",
   "sha": "bcee6e975840d2f0232fcf805e969f176d66c167"
  },
  {
   "t": "2023-09-21T16:51:06Z",
   "sha": "61654a02ee49db038fbd5c7d7d27757b3bbee109"
  },
  {
   "t": "2023-09-21T17:58:37Z",
   "sha": "1e61455b512796cfa4674ab2aa22397cfe9103a1"
  },
  {
   "t": "2023-09-21T19:06:59Z",
   "sha": "592d759e20cbd0ac209611668264347adde36d2e"
  },
  {
   "t": "2023-09-21T20:14:31Z",
   "sha": "0bc217093b307e90aa1360eb20e157f70f3971e8"
  },
  {
   "t": "2023-09-21T21:15:06Z",
   "sha": "af4d0f500c114dfe1ea9b92157be564405f16017"
  },
  {
   "t": "2023-09-21T22:01:08Z",
   "sha": "8a9e37fb95cbb0bf7f6e06fa05d8381db04d61e2"
  },
  {
   "t": "2023-10-04T15:15:05Z",
   "sha": "e94ae810a55da16fce6040714677b9d50781bebd"
  },
  {
   "t": "2024-02-12T14:21:54Z",
   "sha": "6e2513f03e6751b23c364355aa3e8392386b1cb5"
  },
  {
   "t": "2026-06-06T10:44:13Z",
   "sha": "765198ae9b45eb30f15aa883f77870927305472c"
  },
  {
   "t": "2026-06-06T12:13:04Z",
   "sha": "7f48343c6e83e72cb1c614b3048e7df2165c4852"
  },
  {
   "t": "2026-06-06T12:53:33Z",
   "sha": "21da1452af3557e82c0c45395c6aeb98bd89717e"
  }
 ],
 "additions": 102,
 "deletions": 61,
 "changed_files": 4,
 "commit_count": 5,
 "size_bucket": "M",
 "mergeable_state": "unknown",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {
    "concept_ack": [
     {
      "login": "laanwj",
      "url": "https://github.com/bitcoin/bitcoin/pull/24773#issuecomment-1090039706"
     },
     {
      "login": "theuni",
      "url": "https://github.com/bitcoin/bitcoin/pull/24773#pullrequestreview-1413320461"
     }
    ],
    "stale_ack": [
     {
      "login": "sipsorcery",
      "url": "https://github.com/bitcoin/bitcoin/pull/24773#issuecomment-1747603024"
     }
    ]
   },
   "conflicts": []
  }
 },
 "acks_parsed": {
  "laanwj": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2022-04-06T09:12:09Z",
   "stale": false
  },
  "theuni": {
   "kind": "concept_ack",
   "hash": null,
   "t": "2023-05-04T14:54:54Z",
   "stale": false
  }
 },
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 2,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 1,
  "changes_requested": 1,
  "distinct_reviewers": [
   "achow101",
   "fanquake",
   "laanwj",
   "m3dwards",
   "maflcko",
   "sedited",
   "sipa",
   "sipsorcery",
   "theuni"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "unknown",
  "last_author_activity": "2026-08-13T11:34:50Z",
  "last_reviewer_activity": "2026-08-19T13:09:57Z",
  "last_reviewer": "fanquake",
  "author_silent_days": 35,
  "waiting_on_author_days": 29,
  "days_since_update": 29
 },
 "refs": {
  "mentioned": [
   24772,
   24774,
   27575,
   27598,
   31507
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 24772,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2022-04-19",
    "title": "refactor: Use [[maybe_unused]] attribute"
   },
   {
    "number": 24774,
    "type": "pull",
    "state": "closed",
    "merged": false,
    "merged_at": null,
    "title": "build, refactor: Rely on `AC_DEFINE` macro"
   },
   {
    "number": 27575,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2023-05-09",
    "title": "Introduce platform-agnostic `ALWAYS_INLINE` macro"
   },
   {
    "number": 27598,
    "type": "pull",
    "state": "closed",
    "merged": true,
    "merged_at": "2023-10-04",
    "title": "bench: Add SHA256 implementation specific benchmarks"
   },
   {
    "number": 31507,
    "type": "pull",
    "state": "open",
    "merged": false,
    "merged_at": null,
    "title": "build: Use clang-cl to build on Windows natively"
   }
  ],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [
  "build_msvc/bitcoin_config.h.in",
  "src/compat/attribute.h",
  "src/compat/cpuid.h",
  "src/crypto/sha256.cpp",
  "src/random.cpp"
 ],
 "body": "This PR enables AVX2, SSE4.1 and x86 SHA-NI hardware-accelerated implementations of SHA256 to replace the \"standard\" default implementation when building on Windows.\n\n**Testing Note:** At runtime, the SHA-NI implementation is dynamically selected and available only if the CPU has the `sha_ni` flag set.\n\nHere are the benchmark results on my machine using \"Release\" binaries:\n\n- the master branch @ 47da4f9b716d11294d4fb0f30b04a7bcf128cc14:\n```\n[quoted text omitted]\n\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|               11.35 |       88,074,183.58 |    0.3% |      0.01 | `SHA256D64_1024_SHANI using the 'standard' SHA256 implementation`\n|               13.07 |       76,522,397.95 |    0.4% |      0.01 | `SHA256_32b_SHANI using the 'standard' SHA256 implementation`\n|                4.26 |      234,554,580.85 |    0.9% |      0.05 | `SHA256_SHANI using the 'standard' SHA256 implementation`\n\n[quoted text omitted]\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|               11.29 |       88,586,104.35 |    0.3% |      0.01 | `SHA256D64_1024_AVX2 using the 'standard' SHA256 implementation`\n|               11.36 |       88,062,348.83 |    0.9% |      0.01 | `SHA256D64_1024_SHANI using the 'standard' SHA256 implementation`\n|               11.33 |       88,275,862.07 |    0.9% |      0.01 | `SHA256D64_1024_SSE4 using the 'standard' SHA256 implementation`\n|               11.33 |       88,263,973.06 |    0.8% |      0.01 | `SHA256D64_1024_STANDARD using the 'standard' SHA256 implementation`\n```\n\n- this PR:\n\n```\n[quoted text omitted]\n\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|                1.27 |      790,145,684.72 |    0.5% |      0.01 | `SHA256D64_1024_SHANI using the 'x86_shani(1way;2way)' SHA256 implementation`\n|                1.97 |      508,638,668.32 |    0.8% |      0.01 | `SHA256_32b_SHANI using the 'x86_shani(1way;2way)' SHA256 implementation`\n|                0.63 |    1,587,301,587.30 |    0.5% |      0.01 | `SHA256_SHANI using the 'x86_shani(1way;2way)' SHA256 implementation`\n\n[quoted text omitted]\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|                4.02 |      248,878,761.99 |    0.3% |      0.01 | `SHA256D64_1024_AVX2 using the 'standard;sse41(4way);avx2(8way)' SHA256 implementation`\n|                1.27 |      787,950,595.69 |    0.8% |      0.01 | `SHA256D64_1024_SHANI using the 'x86_shani(1way;2way)' SHA256 implementation`\n|                7.00 |      142,826,631.80 |    0.8% |      0.01 | `SHA256D64_1024_SSE4 using the 'standard;sse41(4way)' SHA256 implementation`\n|               11.23 |       89,055,578.20 |    1.0% |      0.01 | `SHA256D64_1024_STANDARD using the 'standard' SHA256 implementation`\n```",
 "commits": [
  {
   "sha": "97e5b31c35e65bc63a3e7094769aadd4a967453f",
   "date": "2026-06-06T10:19:42Z",
   "message": "compat: Add MSVC implementation of `GetCPUID()`"
  },
  {
   "sha": "57601413f36f46e30d9d5629b1fc47826316946b",
   "date": "2026-06-06T10:20:03Z",
   "message": "crypto: Add MSVC implementation of `AVXEnabled()`"
  },
  {
   "sha": "f3ae2acb083f530351f5d266c628f4c2e2d9e131",
   "date": "2026-06-06T10:37:26Z",
   "message": "cmake: Enable SSE4.1 support for MSVC"
  },
  {
   "sha": "46a48b9a1113330e56d30441d6111ccde11dea4b",
   "date": "2026-06-06T10:37:54Z",
   "message": "cmake: Enable AVX2 support for MSVC"
  },
  {
   "sha": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "date": "2026-06-06T12:53:11Z",
   "message": "cmake: Enable SHA-NI support for MSVC"
  }
 ],
 "timeline": [
  {
   "t": "2022-04-06T09:12:09Z",
   "kind": "comment",
   "who": "laanwj",
   "assoc": "MEMBER",
   "text": "Concept ACK\u2014but it does makes me wonder why AVX2 specifically? Would, say, enabling SHANI (which is better on hw that supports it) give a lot of extra work?"
  },
  {
   "t": "2022-04-06T09:16:43Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nI have no hardware that supports SHANI ("
  },
  {
   "t": "2022-04-06T09:34:22Z",
   "kind": "comment",
   "who": "laanwj",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nThat's a valid reason. I guess the base work in this PR will make it easier for people who care, to add support the other instruction sets too?"
  },
  {
   "t": "2022-04-06T09:46:37Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nExactly."
  },
  {
   "t": "2022-04-17T11:22:23Z",
   "kind": "review",
   "who": "sipsorcery",
   "assoc": "CONTRIBUTOR",
   "state": "APPROVED",
   "commit": "70f36d816e823d300361f872923f2c3a5f90d476",
   "text": ""
  },
  {
   "t": "2022-04-17T11:28:27Z",
   "kind": "comment",
   "who": "sipsorcery",
   "assoc": "CONTRIBUTOR",
   "text": "tACK 70f36d816e823d300361f872923f2c3a5f90d476.\n\n*I'm not qualified to verify the safety of changing crypto logic.\n\nI performed an msvc build and then ran the benchmark with and without this PR and there doesn't seem to be much of a difference for `SHA256` on my Intel i7 CPU based PC. I'm not sure if that as expected or not?\n\nOn `master`:\n````\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|               12.70 |       78,766,206.15 |    2.6% |      0.14 | `SHA1`\n|               16.99 |       58,841,181.77 |    1.2% |      0.19 | `SHA256`\n|               46.23 |       21,630,470.66 |   11.5% |      0.04 | :wavy_dash: `SHA256D64_1024` (Unstable with ~1.0 iters. Increase `minEpochIterations` to e.g. 10)\n|               36.54 |       27,365,792.76 |    1.8% |      0.01 | `SHA256_32b`\n|               24.93 |       40,108,453.26 |    3.8% |      0.29 | `SHA3_256_1M`\n|               11.64 |       85,924,678.43 |    1.7% |      0.13 | `SHA512`\n````\n\nWith #24773:\n````\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|               13.79 |       72,504,223.37 |    4.9% |      0.16 | `SHA1`\n|               18.06 |       55,382,638.65 |    4.6% |      0.21 | `SHA256`\n|               88.30 |       11,324,888.97 |   13.0% |      0.06 | :wavy_dash: `SHA256D64_1024` (Unstable with ~1.0 iters. Increase `minEpochIterations` to e.g. 10)\n|               56.46 |       17,710,386.66 |   18.7% |      0.01 | :wavy_dash: `SHA256_32b` (Unstable with ~618.0 iters. Increase `minEpochIterations` to e.g. 6180)\n|               28.18 |       35,489,686.70 |    2.3% |      0.33 | `SHA3_256_1M`\n|               12.35 |       80,963,792.99 |    6.3% |      0.14 | :wavy_dash: `SHA512` (Unstable with ~1.0 iters. Increase `minEpochIterations` to e.g.10)\n````"
  },
  {
   "t": "2022-04-19T16:20:07Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "7c11a91fd94fbd065ceafce1ee58956e7a02cbbc"
  },
  {
   "t": "2022-04-19T16:20:43Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "Rebased on top of the merged #24772."
  },
  {
   "t": "2022-05-28T13:14:08Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "Converted to a \"draft\" until resolving discussion in #24774."
  },
  {
   "t": "2022-10-13T02:15:07Z",
   "kind": "comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "text": "Closing for now, given you've closed the remaining base PR (#24774). Let me know if this is incorrect / should be reopened."
  },
  {
   "t": "2022-11-28T14:32:30Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "605af499c1342004103db4fa907c6009a547a937"
  },
  {
   "t": "2022-11-28T14:41:19Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "f3c4857e8aa01670f5331f7e2d717bb004ab8ca3"
  },
  {
   "t": "2022-11-28T14:58:12Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "daddd587e3389d5e926f70aba133d0d803cc66f2"
  },
  {
   "t": "2022-11-28T16:20:16Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "b27defef4218b249a2ec5ec0dd033f62add8daf1"
  },
  {
   "t": "2022-11-28T16:49:52Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nImplemented.\n\n[quoted text omitted]\nNo longer based on #24774."
  },
  {
   "t": "2022-11-28T16:54:04Z",
   "kind": "review_comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "path": "src/random.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": null,
   "text": "If `GetCPUID` is now implemented for MSVC, why is this skipped?"
  },
  {
   "t": "2022-11-28T16:54:13Z",
   "kind": "review_comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "path": "src/compat/attribute.h",
   "commit": "6e2513f03e6751b23c364355aa3e8392386b1cb5",
   "in_reply_to": null,
   "text": "We already have src/attributes.h. Any reason this is another file?"
  },
  {
   "t": "2022-11-28T16:54:39Z",
   "kind": "review_comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "path": "src/compat/attribute.h",
   "commit": "6e2513f03e6751b23c364355aa3e8392386b1cb5",
   "in_reply_to": null,
   "text": "If we are going to add this, `ALWAYS_INLINE` seems like a better name."
  },
  {
   "t": "2022-11-28T17:07:35Z",
   "kind": "review_comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "path": "src/random.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": 1033799745,
   "text": "[quoted text omitted]\n\nIt is implemented in the first commit.\n\n[quoted text omitted]\nMSVC does not support inline assembly on x64: https://github.com/bitcoin/bitcoin/blob/593979494042e77b5271d42b8f6e7b514e0007d8/src/random.cpp#L129-L136"
  },
  {
   "t": "2022-11-28T17:10:41Z",
   "kind": "review_comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "path": "src/random.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": 1033799745,
   "text": "[quoted text omitted]\n\nI'm aware. That's why I said \"is now implemented\"."
  },
  {
   "t": "2022-11-28T17:16:11Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "674d3e9a405bebd6388632dbc23b733c65c7887c"
  },
  {
   "t": "2022-11-28T17:19:52Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "Updated b27defef4218b249a2ec5ec0dd033f62add8daf1 -> 674d3e9a405bebd6388632dbc23b733c65c7887c ([pr24773.03](https://github.com/hebasto/bitcoin/commits/pr24773.03) -> [pr24773.04](https://github.com/hebasto/bitcoin/commits/pr24773.04), [diff](https://github.com/hebasto/bitcoin/compare/pr24773.03..pr24773.04)):\n\n- addressed @fanquake's comments"
  },
  {
   "t": "2022-11-28T17:20:15Z",
   "kind": "review_comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "path": "src/compat/attribute.h",
   "commit": "6e2513f03e6751b23c364355aa3e8392386b1cb5",
   "in_reply_to": 1033799961,
   "text": "Thanks!. [Updated](https://github.com/bitcoin/bitcoin/pull/24773#issuecomment-1329464328)."
  },
  {
   "t": "2022-11-28T17:20:22Z",
   "kind": "review_comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "path": "src/compat/attribute.h",
   "commit": "6e2513f03e6751b23c364355aa3e8392386b1cb5",
   "in_reply_to": 1033800431,
   "text": "Thanks!. [Updated](https://github.com/bitcoin/bitcoin/pull/24773#issuecomment-1329464328)."
  },
  {
   "t": "2022-11-29T09:37:37Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "Friendly ping @sipsorcery :)"
  },
  {
   "t": "2023-05-04T14:54:54Z",
   "kind": "review",
   "who": "theuni",
   "assoc": "MEMBER",
   "state": "CHANGES_REQUESTED",
   "commit": "674d3e9a405bebd6388632dbc23b733c65c7887c",
   "text": "Concept ACK. Coming to this after kill/shill/merge, sorry for the late re-review.\n\nWould you mind splitting up the inline changes from the rest? Looks good to me, but as it introduces a general abstraction in the crypto code I think it'd be nice not to restrict review to win32 devs for that part.\n\nAfter that the changes here look pretty uncontroversial to me (modulo actually verifying the cpuid bitwise stuff)."
  },
  {
   "t": "2023-05-04T15:06:42Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nJust to clarify your point, you mean to put all s/`inline __attribute__((always_inline))`/`ALWAYS_INLINE`/ into the \"Introduce platform-agnostic `ALWAYS_INLINE` macro\" commit?"
  },
  {
   "t": "2023-05-04T15:11:09Z",
   "kind": "comment",
   "who": "theuni",
   "assoc": "MEMBER",
   "text": "Sorry, yes, I meant to factor out those changes into a separate PR."
  },
  {
   "t": "2023-05-04T17:50:15Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nThanks! Done in https://github.com/bitcoin/bitcoin/pull/27575."
  },
  {
   "t": "2023-05-04T17:55:59Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "915bdbdf8c87e20426161bbf393d1036659813a2"
  },
  {
   "t": "2023-05-04T17:57:00Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nRebased on top of the #27575 and drafted. Please review #27575 first."
  },
  {
   "t": "2023-05-04T23:27:26Z",
   "kind": "review_comment",
   "who": "theuni",
   "assoc": "MEMBER",
   "path": "src/random.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": 1033799745,
   "text": "I'm so confused.\n\nWas `GetCPUID` not compiling already? If not, what was guarding it?\n\nAnd I don't understand the comment about MSVC and assembly. It seems to deal with the randomness example ok?"
  },
  {
   "t": "2023-05-05T08:49:12Z",
   "kind": "review_comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "path": "src/random.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": 1033799745,
   "text": "1. This `#if ... #else ... #endif` [block](https://github.com/hebasto/bitcoin/blob/915bdbdf8c87e20426161bbf393d1036659813a2/src/random.cpp#L69-L185) guards two static functions--`GetRdRand` and `GetRdSeed`--which are not implemented for Windows. Not adding `&& !defined(_MSC_VER)` ends with an error:\n```\nC:\\Users\\hebasto\\bitcoin\\src\\random.cpp(137,1): fatal  error C1189: #error:  \"RdRand is only supported on x86 and x86_64\" [C:\\Users\\hebasto\\bitcoin\\build_msvc\\li\nbbitcoin_util\\libbitcoin_util.vcxproj]\n```\n\n2. > And I don't understand the comment about MSVC and assembly.\n\nWindows implementation for the `GetRdRand` and `GetRdSeed` was not added because \"MSVC does not support inline assembly on x64\".\n\n3. > Was `GetCPUID` not compiling already?\n\nIt was. On Windows, it is used in the `SHA256AutoDetect` and `AddCPUID` functions."
  },
  {
   "t": "2023-05-05T15:19:30Z",
   "kind": "review_comment",
   "who": "theuni",
   "assoc": "MEMBER",
   "path": "src/random.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": 1033799745,
   "text": "Hmm, ok, we are talking around each-other. I'll ask some detailed questions in code and see if we can clear it up."
  },
  {
   "t": "2023-05-05T15:19:53Z",
   "kind": "review_comment",
   "who": "theuni",
   "assoc": "MEMBER",
   "path": "src/compat/cpuid.h",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": null,
   "text": "How does this not get defined twice? Does MSVC not define `__x86_64__` or `__amd64__` or `__i386__` ?"
  },
  {
   "t": "2023-05-05T15:20:58Z",
   "kind": "review_comment",
   "who": "theuni",
   "assoc": "MEMBER",
   "path": "src/crypto/sha256.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": null,
   "text": "Why does the existing asm function not work? What is the specific error? Does it not like the inline asm? Or does it just have a problem with the opcode?"
  },
  {
   "t": "2023-05-06T18:30:56Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "I had a chance to make some benchmarks on a Windows laptop equipped with [Intel Core i9-12950HX](https://ark.intel.com/content/www/us/en/ark/products/228439/intel-core-i912950hx-processor-30m-cache-up-to-5-00-ghz.html) with the `sha_ni` flag set.\n\nNo significant difference has been observed. ~Going to close this PR.~ But that is curios.\n\nUPD. Well, the reason is that https://github.com/bitcoin/bitcoin/blob/322ec63b01499c1ec52d3912ee382ebd59f2366b/src/bench/bench_bitcoin.cpp#L64\n\nreturns \"standard\" instead of expected \" x86_shani(1way,2way)\"."
  },
  {
   "t": "2023-05-06T18:36:21Z",
   "kind": "review_comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "path": "src/compat/cpuid.h",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": 1186222219,
   "text": "[quoted text omitted]\n\nNo, it does not. Easy to verify with the following diff:\n```diff\n--- a/src/compat/cpuid.h\n+++ b/src/compat/cpuid.h\n@@ -6,6 +6,7 @@\n #define BITCOIN_COMPAT_CPUID_H\n\n #if defined(__x86_64__) || defined(__amd64__) || defined(__i386__)\n+#error\n #define HAVE_GETCPUID\n\n #include <cpuid.h>\n\n```"
  },
  {
   "t": "2023-05-06T18:48:15Z",
   "kind": "review_comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "path": "src/crypto/sha256.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": 1186223293,
   "text": "[quoted text omitted]\n\nFrom https://learn.microsoft.com/en-us/cpp/assembler/inline/inline-assembler:\n[quoted text omitted]\n\n---\n\n[quoted text omitted]\nWith the diff as follows:\n```diff\n--- a/src/crypto/sha256.cpp\n+++ b/src/crypto/sha256.cpp\n@@ -567,7 +567,6 @@ bool SelfTest() {\n     return true;\n }\n\n-#if defined(USE_ASM) && (defined(__x86_64__) || defined(__amd64__) || defined(__i386__))\n /** Check whether the OS has enabled AVX registers. */\n bool AVXEnabled()\n {\n@@ -575,7 +574,6 @@ bool AVXEnabled()\n     __asm__(\"xgetbv\" : \"=a\"(a), \"=d\"(d) : \"c\"(0));\n     return (a & 6) == 6;\n }\n-#endif\n } // namespace\n\n```\n\nI have the following error:\n```\nC:\\bitcoin\\src\\crypto\\sha256.cpp(574,5): error C3861: '__asm__': identifier not found [C:\\bitcoin\\build_msvc\\libbitcoin_crypto\\libbitcoin_crypto.vcxproj]\n```"
  },
  {
   "t": "2023-05-09T17:28:49Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "73a16b2769e5cb08ff6027d80e0dec48f9acc36f"
  },
  {
   "t": "2023-05-09T17:29:43Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "Rebased on top of the merged https://github.com/bitcoin/bitcoin/pull/27575 and undrafted."
  },
  {
   "t": "2023-05-10T10:28:28Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "Drafted again as it seems worth going https://github.com/bitcoin/bitcoin/pull/27598 and https://github.com/bitcoin/bitcoin/pull/27615 first.\n\n[quoted text omitted]\nFixed in https://github.com/bitcoin/bitcoin/pull/27615."
  },
  {
   "t": "2023-05-16T11:26:02Z",
   "kind": "review_comment",
   "who": "sipa",
   "assoc": "MEMBER",
   "path": "src/crypto/sha256.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": 1186223293,
   "text": "Yeah, MSVC does not support inline asm at all. You have to use intrinsics."
  },
  {
   "t": "2023-05-18T12:31:11Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "e8fea3f24b9318f51c3ef4791c28c69ff24ffce1"
  },
  {
   "t": "2023-09-20T20:18:16Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "bcee6e975840d2f0232fcf805e969f176d66c167"
  },
  {
   "t": "2023-09-20T20:19:34Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nThanks! Done."
  },
  {
   "t": "2023-09-21T16:51:06Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "61654a02ee49db038fbd5c7d7d27757b3bbee109"
  },
  {
   "t": "2023-09-21T17:58:37Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "1e61455b512796cfa4674ab2aa22397cfe9103a1"
  },
  {
   "t": "2023-09-21T19:06:59Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "592d759e20cbd0ac209611668264347adde36d2e"
  },
  {
   "t": "2023-09-21T20:14:31Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "0bc217093b307e90aa1360eb20e157f70f3971e8"
  },
  {
   "t": "2023-09-21T21:15:06Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "af4d0f500c114dfe1ea9b92157be564405f16017"
  },
  {
   "t": "2023-09-21T22:01:08Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "8a9e37fb95cbb0bf7f6e06fa05d8381db04d61e2"
  },
  {
   "t": "2023-10-04T15:10:43Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "Rebased on top of the merged #27598 and undrafted."
  },
  {
   "t": "2023-10-04T15:15:05Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "e94ae810a55da16fce6040714677b9d50781bebd"
  },
  {
   "t": "2023-10-04T15:23:33Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "@sipsorcery\n\nMind having another look at this PR?"
  },
  {
   "t": "2023-10-04T20:36:58Z",
   "kind": "comment",
   "who": "sipsorcery",
   "assoc": "CONTRIBUTOR",
   "text": "tACK e94ae810a55da16fce6040714677b9d50781bebd.\n\nRelevant `bench_bitcoin.exe` results from my Intel i9 CPU machine. Looks up 5 to 10x faster than my i7 results above.\n\n```\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|                1.37 |      729,927,007.30 |    0.3% |      0.02 | `SHA1`\n|                2.20 |      453,902,805.03 |    3.0% |      0.01 | `SHA256D64_1024_AVX2 using the 'standard,sse41(4way),avx2(8way)' SHA256 implementation`\n|                3.32 |      301,453,541.86 |    0.3% |      0.01 | `SHA256D64_1024_SHANI using the 'standard,sse41(4way)' SHA256 implementation`\n|                3.32 |      300,830,846.91 |    0.3% |      0.01 | `SHA256D64_1024_SSE4 using the 'standard,sse41(4way)' SHA256 implementation`\n|                9.18 |      108,890,919.66 |    3.2% |      0.01 | `SHA256D64_1024_STANDARD using the 'standard' SHA256 implementation`\n|                7.42 |      134,746,633.08 |    0.4% |      0.01 | `SHA256_32b_AVX2 using the 'standard,sse41(4way),avx2(8way)' SHA256 implementation`\n|                7.41 |      134,917,592.95 |    0.3% |      0.01 | `SHA256_32b_SHANI using the 'standard,sse41(4way)' SHA256 implementation`\n|                8.03 |      124,525,069.29 |    6.0% |      0.01 | :wavy_dash: `SHA256_32b_SSE4 using the 'standard,sse41(4way)' SHA256 implementation` (Unstable with ~3,798.2 iters. Increase `minEpochIterations` to e.g. 37982)\n|                7.46 |      133,974,122.00 |    0.7% |      0.01 | `SHA256_32b_STANDARD using the 'standard' SHA256 implementation`\n|                3.55 |      281,825,099.34 |    3.2% |      0.04 | `SHA256_AVX2 using the 'standard,sse41(4way),avx2(8way)' SHA256 implementation`\n|                3.45 |      289,939,112.79 |    2.4% |      0.04 | `SHA256_SHANI using the 'standard,sse41(4way)' SHA256 implementation`\n|                3.47 |      287,952,084.77 |    1.1% |      0.04 | `SHA256_SSE4 using the 'standard,sse41(4way)' SHA256 implementation`\n|                3.44 |      290,875,243.61 |    0.6% |      0.04 | `SHA256_STANDARD using the 'standard' SHA256 implementation`\n|                3.39 |      294,828,704.52 |    1.9% |      0.04 | `SHA3_256_1M`\n|                2.21 |      453,185,896.85 |    2.0% |      0.02 | `SHA512`\n```"
  },
  {
   "t": "2023-10-05T20:40:21Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "I had an opportunity to benchmark this branch on a machine with [Intel Core i9-12950HX](https://openbenchmarking.org/s/Intel+Core+i9-12950HX), which has the `sha_ni` flag set. Results are posted in the PR description.\n\nThe performance gain is huge...\n\ncc @sipa @theuni"
  },
  {
   "t": "2023-12-20T13:42:18Z",
   "kind": "review_comment",
   "who": "m3dwards",
   "assoc": "CONTRIBUTOR",
   "path": "build_msvc/bitcoin_config.h.in",
   "commit": "6e2513f03e6751b23c364355aa3e8392386b1cb5",
   "in_reply_to": null,
   "text": "NIT: From what I understand we are enabling the special CPU instructions using intrinsics and not inline assembly. This makes the comment a little misleading and makes the symbol unfortunately named.\n\nPerhaps the symbol could be?\n\n```suggestion\n/* Define this symbol to enable CPU SHA Extensions */\n#define USE_SHA_EXTENTIONS\n```\n\nor?\n\n```suggestion\n/* Define this symbol to enable CPU Extensions */\n#define USE_INTRINSICS\n```"
  },
  {
   "t": "2023-12-20T13:52:51Z",
   "kind": "review",
   "who": "m3dwards",
   "assoc": "CONTRIBUTOR",
   "state": "COMMENTED",
   "commit": "e94ae810a55da16fce6040714677b9d50781bebd",
   "text": "Tested e94ae81 on Windows 11 with VS2022. CPU: i7-4870HQ and saw big speed improvement.\n\nOn master:\n\n```\n$ ./src/bench_bitcoin.exe -filter=SHA256D64.*\n\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|               11.57 |       86,459,102.90 |    0.0% |      0.01 | `SHA256D64_1024_AVX2 using the 'standard' SHA256 implementation`\n|               11.89 |       84,074,406.67 |    0.0% |      0.01 | `SHA256D64_1024_SHANI using the 'standard' SHA256 implementation`\n|               11.97 |       83,559,862.30 |    0.6% |      0.01 | `SHA256D64_1024_SSE4 using the 'standard' SHA256 implementation`\n|               11.90 |       84,031,286.06 |    0.0% |      0.01 | `SHA256D64_1024_STANDARD using the 'standard' SHA256 implementation`\n```\n\nUsing #24773\n\n```\n$ ./src/bench_bitcoin.exe -filter=SHA256D64.*\n\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|                2.77 |      361,557,983.01 |    0.1% |      0.01 | `SHA256D64_1024_AVX2 using the 'standard,sse41(4way),avx2(8way)' SHA256 implementation`\n|                4.33 |      230,699,639.18 |    0.1% |      0.01 | `SHA256D64_1024_SHANI using the 'standard,sse41(4way)' SHA256 implementation`\n|                4.57 |      219,037,433.16 |    2.1% |      0.01 | `SHA256D64_1024_SSE4 using the 'standard,sse41(4way)' SHA256 implementation`\n|               11.88 |       84,171,590.03 |    0.2% |      0.01 | `SHA256D64_1024_STANDARD using the 'standard' SHA256 implementation`\n```\n\nOne tiny nit on naming, not important to hold it up."
  },
  {
   "t": "2024-02-12T14:21:54Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "6e2513f03e6751b23c364355aa3e8392386b1cb5"
  },
  {
   "t": "2024-02-12T14:22:45Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "Rebased."
  },
  {
   "t": "2024-04-08T12:00:49Z",
   "kind": "review_comment",
   "who": "sipa",
   "assoc": "MEMBER",
   "path": "src/random.cpp",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e",
   "in_reply_to": 1033799745,
   "text": "@theuni I think what is going on is that before this PR, `HAVE_GETCPUID` wasn't defined for MSVC builds, but with this PR, there now is such a feature. However, this PR still doesn't enable `rdrand`/`rdseed` support for Windows (it would also need intrinsics versions), so this define conditional is needed to exclude support for that despite having getcpuid."
  },
  {
   "t": "2024-04-09T15:54:20Z",
   "kind": "comment",
   "who": "achow101",
   "assoc": "MEMBER",
   "text": "Deferring to after cmake"
  },
  {
   "t": "2026-06-04T10:40:03Z",
   "kind": "comment",
   "who": "sedited",
   "assoc": "CONTRIBUTOR",
   "text": "@hebasto This change has lingered for a long time. We should either move forward with it now, or close it again."
  },
  {
   "t": "2026-06-06T10:44:13Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "765198ae9b45eb30f15aa883f77870927305472c"
  },
  {
   "t": "2026-06-06T12:13:04Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "7f48343c6e83e72cb1c614b3048e7df2165c4852"
  },
  {
   "t": "2026-06-06T12:53:33Z",
   "kind": "force_push",
   "who": "hebasto",
   "commit": "21da1452af3557e82c0c45395c6aeb98bd89717e"
  },
  {
   "t": "2026-06-06T14:27:08Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nRebased. The PR description has been updated."
  },
  {
   "t": "2026-06-08T05:20:35Z",
   "kind": "comment",
   "who": "achow101",
   "assoc": "MEMBER",
   "text": "Benchmarks on a AMD 5950x:\n\nMaster (5f33da9aa30f):\n\n```\n[quoted text omitted]\n```\n\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|                7.44 |      134,363,915.94 |    0.0% |      0.01 | `SHA256D64_1024_AVX2 using the 'standard' SHA256 implementation`\n|                7.56 |      132,249,016.24 |    1.3% |      0.01 | `SHA256D64_1024_SHANI using the 'standard' SHA256 implementation`\n|                7.70 |      129,954,392.23 |    3.9% |      0.01 | `SHA256D64_1024_SSE4 using the 'standard' SHA256 implementation`\n|                7.70 |      129,954,392.23 |    3.9% |      0.01 | `SHA256D64_1024_STANDARD using the 'standard' SHA256 implementation`\n|                9.23 |      108,395,773.29 |    3.6% |      0.01 | `SHA256_32b_AVX2 using the 'standard' SHA256 implementation`\n|                9.29 |      107,597,034.45 |    4.7% |      0.01 | `SHA256_32b_SHANI using the 'standard' SHA256 implementation`\n|                9.13 |      109,481,765.83 |    2.6% |      0.01 | `SHA256_32b_SSE4 using the 'standard' SHA256 implementation`\n|                9.24 |      108,205,791.62 |    3.8% |      0.01 | `SHA256_32b_STANDARD using the 'standard' SHA256 implementation`\n|                3.91 |      255,591,054.31 |    0.1% |      0.04 | `SHA256_AVX2 using the 'standard' SHA256 implementation`\n|                3.92 |      255,264,837.27 |    0.2% |      0.04 | `SHA256_SHANI using the 'standard' SHA256 implementation`\n|                3.92 |      255,303,939.34 |    0.1% |      0.04 | `SHA256_SSE4 using the 'standard' SHA256 implementation`\n|                3.93 |      254,381,725.22 |    0.4% |      0.04 | `SHA256_STANDARD using the 'standard' SHA256 implementation`\n\nPR (21da1452af35):\n\n|             ns/byte |              byte/s |    err% |     total | benchmark\n|--------------------:|--------------------:|--------:|----------:|:----------\n|                9.41 |      106,311,947.44 |    0.4% |      0.01 | `SHA256D64_1024_AVX2 using the 'standard;sse41(4way);avx2(8way)' SHA256 implementation`\n|                0.72 |    1,396,138,278.30 |    2.5% |      0.01 | `SHA256D64_1024_SHANI using the 'x86_shani(1way;2way)' SHA256 implementation`\n|                4.82 |      207,348,660.62 |    1.4% |      0.01 | `SHA256D64_1024_SSE4 using the 'standard;sse41(4way)' SHA256 implementation`\n|                7.68 |      130,147,949.56 |    3.7% |      0.01 | `SHA256D64_1024_STANDARD using the 'standard' SHA256 implementation`\n|                9.20 |      108,657,750.41 |    3.4% |      0.01 | `SHA256_32b_AVX2 using the 'standard;sse41(4way);avx2(8way)' SHA256 implementation`\n|                1.27 |      785,448,659.59 |    2.8% |      0.01 | `SHA256_32b_SHANI using the 'x86_shani(1way;2way)' SHA256 implementation`\n|                9.16 |      109,196,025.29 |    2.8% |      0.01 | `SHA256_32b_SSE4 using the 'standard;sse41(4way)' SHA256 implementation`\n|                9.19 |      108,780,236.75 |    4.0% |      0.01 | `SHA256_32b_STANDARD using the 'standard' SHA256 implementation`\n|                3.92 |      255,316,976.03 |    0.2% |      0.04 | `SHA256_AVX2 using the 'standard;sse41(4way);avx2(8way)' SHA256 implementation`\n|                0.44 |    2,285,975,540.06 |    0.4% |      0.01 | `SHA256_SHANI using the 'x86_shani(1way;2way)' SHA256 implementation`\n|                3.92 |      255,199,693.76 |    0.1% |      0.04 | `SHA256_SSE4 using the 'standard;sse41(4way)' SHA256 implementation`\n|                3.93 |      254,653,798.16 |    0.3% |      0.04 | `SHA256_STANDARD using the 'standard' SHA256 implementation`"
  },
  {
   "t": "2026-08-12T11:04:37Z",
   "kind": "comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "text": "What is the status here? This was recently re-opened, but seems to go in the opposite direction of your other PRs (by adding more MSVC specific code), such as #31507 (where you are dropping support for MSVC, and related workarounds)."
  },
  {
   "t": "2026-08-13T11:34:50Z",
   "kind": "comment",
   "who": "hebasto",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nYes. It was re-opened in response to @theuni's offline note regarding a potential loss of compiler diversity after 96d2380dc40e703e342dc0fad5d294cc49b25ff9.\n\n[quoted text omitted]\nIt contradicts only a single [commit](https://github.com/bitcoin/bitcoin/commit/96d2380dc40e703e342dc0fad5d294cc49b25ff9) in #31507, which drops support for MSVC.\n\nHopefully, we can clarify the direction going forward during today's weekly IRC meeting."
  },
  {
   "t": "2026-08-18T07:11:20Z",
   "kind": "comment",
   "who": "maflcko",
   "assoc": "MEMBER",
   "text": "[quoted text omitted]\n\nThe outcome was to close this?"
  },
  {
   "t": "2026-08-19T13:09:57Z",
   "kind": "comment",
   "who": "fanquake",
   "assoc": "MEMBER",
   "text": "I think so, and it seems like the plan is to go ahead with #31507?"
  }
 ],
 "labels_log": [
  {
   "t": "2022-04-05T17:07:13Z",
   "action": "labeled",
   "label": "Build system",
   "who": "DrahtBot"
  },
  {
   "t": "2022-04-05T17:07:13Z",
   "action": "labeled",
   "label": "Utils/log/libs",
   "who": "DrahtBot"
  },
  {
   "t": "2022-04-28T15:06:50Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2022-11-28T15:37:13Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2023-05-09T14:19:02Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2023-05-09T18:41:08Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2023-05-18T12:10:04Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2023-05-18T14:18:41Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2023-05-31T01:39:54Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2023-05-31T16:26:42Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2023-06-08T22:40:10Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2023-06-09T10:08:32Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2023-09-20T23:48:44Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2023-09-21T01:22:35Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2024-01-14T05:38:01Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2024-01-27T01:53:57Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2024-02-12T14:56:08Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2024-02-12T15:36:42Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-05-06T09:17:48Z",
   "action": "labeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-06T12:33:59Z",
   "action": "unlabeled",
   "label": "Needs rebase",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-06T12:54:02Z",
   "action": "labeled",
   "label": "CI failed",
   "who": "DrahtBot"
  },
  {
   "t": "2026-06-06T14:18:04Z",
   "action": "unlabeled",
   "label": "CI failed",
   "who": "DrahtBot"
  }
 ],
 "state_log": [
  {
   "t": "2022-05-28T13:13:54Z",
   "kind": "convert_to_draft",
   "who": "hebasto"
  },
  {
   "t": "2022-10-13T02:15:08Z",
   "kind": "closed",
   "who": "fanquake"
  },
  {
   "t": "2022-11-28T14:31:26Z",
   "kind": "reopened",
   "who": "hebasto"
  },
  {
   "t": "2022-11-28T14:33:18Z",
   "kind": "renamed",
   "who": "hebasto",
   "from": "[POC] Enable AVX2 implementation of SHA256 for MSVC builds",
   "to": "Enable HW-accelerated implementations of SHA256 for MSVC builds"
  },
  {
   "t": "2022-11-28T16:49:43Z",
   "kind": "ready_for_review",
   "who": "hebasto"
  },
  {
   "t": "2023-05-04T17:57:10Z",
   "kind": "convert_to_draft",
   "who": "hebasto"
  },
  {
   "t": "2023-05-09T17:29:19Z",
   "kind": "ready_for_review",
   "who": "hebasto"
  },
  {
   "t": "2023-05-10T09:02:00Z",
   "kind": "convert_to_draft",
   "who": "hebasto"
  },
  {
   "t": "2023-10-04T15:10:08Z",
   "kind": "ready_for_review",
   "who": "hebasto"
  },
  {
   "t": "2024-04-09T15:54:20Z",
   "kind": "closed",
   "who": "achow101"
  },
  {
   "t": "2026-05-06T08:52:09Z",
   "kind": "reopened",
   "who": "hebasto"
  }
 ],
 "text_chars": 21479,
 "text_tokens_estimate": 5369,
 "changed_paths": [
  "cmake/introspection.cmake",
  "src/compat/cpuid.h",
  "src/crypto/sha256.cpp",
  "src/random.cpp"
 ],
 "files": [
  {
   "path": "cmake/introspection.cmake",
   "add": 74,
   "del": 60
  },
  {
   "path": "src/compat/cpuid.h",
   "add": 18,
   "del": 0
  },
  {
   "path": "src/crypto/sha256.cpp",
   "add": 9,
   "del": 0
  },
  {
   "path": "src/random.cpp",
   "add": 1,
   "del": 1
  }
 ],
 "test_lines": 0,
 "git": {
  "head": "21da1452af3557e82c0c45395c6aeb98bd89717e",
  "head_matches_backup": true,
  "base": "47da4f9b716d11294d4fb0f30b04a7bcf128cc14",
  "commits": [
   {
    "sha": "97e5b31c35",
    "subject": "compat: Add MSVC implementation of `GetCPUID()`",
    "files": 2,
    "add": 19,
    "del": 1
   },
   {
    "sha": "57601413f3",
    "subject": "crypto: Add MSVC implementation of `AVXEnabled()`",
    "files": 1,
    "add": 9,
    "del": 0
   },
   {
    "sha": "f3ae2acb08",
    "subject": "cmake: Enable SSE4.1 support for MSVC",
    "files": 1,
    "add": 19,
    "del": 15
   },
   {
    "sha": "46a48b9a11",
    "subject": "cmake: Enable AVX2 support for MSVC",
    "files": 1,
    "add": 16,
    "del": 12
   },
   {
    "sha": "21da1452af",
    "subject": "cmake: Enable SHA-NI support for MSVC",
    "files": 1,
    "add": 39,
    "del": 33
   }
  ],
  "patch_truncated": false
 },
 "input_hash": "9c331d730bce2ee1",
 "extracted_at": "2026-09-17T16:15:31+00:00"
}