Was having issues with inefficient MSVC code-generation and also for a time was trying to make it constexpr instead of consteval and missing static constexpr from C++23. It’s doable under consteval but the diff ain’t too pretty:
 0diff --git a/src/uint256.h b/src/uint256.h
 1index a52b0a1f71..be27be93de 100644
 2--- a/src/uint256.h
 3+++ b/src/uint256.h
 4@@ -98,18 +98,35 @@ consteval base_blob<BITS>::base_blob(std::string_view hex_str)
 5 {
 6     // Non-lookup table version of HexDigit().
 7     auto from_hex = [](const char c) -> int8_t {
 8-        if (c >= '0' && c <= '9') return c - '0';
 9-        if (c >= 'a' && c <= 'f') return c - 'a' + 0xA;
10-        if (c >= 'A' && c <= 'F') return c - 'A' + 0xA;
11-
12-        assert(false); // Reached if ctor is called with an invalid hex digit.
13+        constexpr signed char hexdigit[256] =
14+        { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
15+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
16+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
17+          0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,
18+          -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1,
19+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
20+          -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1,
21+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
22+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
23+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
24+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
25+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
26+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
27+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
28+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
29+          -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, };
30+
31+        return hexdigit[(uint8_t)c];
32     };
33 
34     assert(hex_str.length() == m_data.size() * 2); // 2 hex digits per byte.
35     auto str_it = hex_str.rbegin();
36     for (auto& elem : m_data) {
37         auto lo = from_hex(*(str_it++));
38-        elem = (from_hex(*(str_it++)) << 4) | lo;
39+        assert(lo != -1);
40+        auto hi = from_hex(*(str_it++));
41+        assert(hi != -1);
42+        elem = (hi << 4) | lo;
43     }
44 }
Depending on compile time measurement results, I’ll reconsider this.