AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 17 Bitcoin

Merge bitcoin/bitcoin#36471: bitcoin-util: print genesis hash in display order

Public commit record

What the developer wrote

Authored by merge-script

93/100 · Strong
Merge bitcoin/bitcoin#36471: bitcoin-util: print genesis hash in display order

cc8285e8c98ac91a380eec899bab2aed5863a458 bitcoin-util: print genesis hash in display order (ViniciusCestarii)

Pull request description:

`bitcoin-util getchainparams` prints the genesis hash byte-reversed compared to `getblockhash 0`:
```
bitcoin-util getchainparams | grep genesis
```
"genesis": "6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000",
```
bitcoin-cli getblockhash 0
```
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

Use `GetHex()` instead of `HexStr()`, consistent with `pow.limit` in the same output and with the RPCs.

The command is new in v32.0 (#35736), so I believe this should be backported before final release to avoid changing the output format afterwards.

ACKs for top commit:
maflcko:
lgtm ACK cc8285e8c98ac91a380eec899bab2aed5863a458
sedited:
ACK cc8285e8c98ac91a380eec899bab2aed5863a458
brunoerg:
code review ACK cc8285e8c98ac91a380eec899bab2aed5863a458

Tree-SHA512: dc45152dfbcb92f32e19088c303953468cce3e9f4dbdb942cc730903ae6824e2edad7c10a65ea363531a7e8b8b7d90277d297f6f1ee37db58455992ddb2da4a2
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a display bug in the new bitcoin-util getchainparams command. The genesis block hash was being printed backwards (byte-reversed) compared to how it is normally shown elsewhere in Bitcoin. The change makes the output consistent with bitcoin-cli getblockhash 0 and other RPC commands. This is a cosmetic/output-format fix, not a security issue.

Recommended action

No security action required. This is a user-facing output-format correction for a new command in v32.0. Consider backporting to v32.0 as the PR author suggests to avoid a breaking format change after release.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 17/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 2/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.