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

Fix `server.features` response format

Public commit record

What the developer wrote

Authored by Yuki Kishimoto

76/100 · Adequate
Fix `server.features` response format

The current `server.features` implementation returns an invalid `hosts`
structure:

```json
"hosts": {"tcp_port": 50001}
```

According to the Electrum protocol, `hosts` must be a dictionary keyed by
hostname, where each value is a dictionary containing optional keys such as
`tcp_port` and/or `ssl_port`.

This change updates the response to the correct format, i.e.:

```json
{
"genesis_hash": "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f",
"hosts": {
"127.0.0.1": {
"tcp_port": 50001
},
}
"protocol_max": "1.4",
"protocol_min": "1.4",
"pruning": null,
"server_version": "electrs/0.10.0",
"hash_function": "sha256"
}
```

See: https://electrumx.readthedocs.io/en/latest/protocol-methods.html#server-features

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes the JSON response format of a network information method called server.features. Previously, the software told connecting clients about its TCP port in a malformed way that did not follow the Electrum protocol. The patch now wraps the port under the server's IP address, which is the correct shape. This is a protocol-compliance bug, not an obvious security vulnerability, but non-compliant responses can confuse or break Electrum wallet clients that rely on this data.

Recommended action

Treat as a normal bugfix. Update clients/servers to the patched version to avoid interoperability failures with strict Electrum protocol parsers. No emergency security response is indicated by the commit content.

Security signals we found

01

Protocol format compliance fix

02

Client interoperability issue

03

No input validation or memory-safety change

04

No authentication, authorization, or cryptography change

Risk score

Why this scored 21/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 5/15
Confidence 8/10
Evidence quality 4/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.