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

rpc: make `uptime` monotonic across NTP jumps

Public commit record

What the developer wrote

Authored by Lőrinc

78/100 · Adequate
rpc: make `uptime` monotonic across NTP jumps

Compute `uptime` from `SteadyClock` so it is unaffected by system time changes after startup.

Derive GUI startup time by subtracting the monotonic uptime from the wall clock time.

Add a functional test covering a large `setmocktime` jump.

Co-authored-by: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification
The short version

What changed, and why it matters

This commit fixes the `uptime` RPC command in Bitcoin Core so it no longer jumps around when the system clock or mock time is changed. Previously, uptime was calculated by subtracting the startup wall-clock time from the current wall-clock time, so a large NTP adjustment or `setmocktime` call could make the node appear to have been running for thousands of seconds instantly, or even report a negative uptime. The change uses a monotonic clock that only counts real elapsed time. It is a correctness/reliability fix, not a direct theft-of-funds vulnerability.

Recommended action

No urgent action required. This is a low-severity reliability fix. Operators and integrators relying on the `uptime` RPC for monitoring should ensure they upgrade to a version containing this commit if they observed anomalous uptime readings after clock adjustments.

Security signals we found

01

RPC output correctness fix

02

monotonic clock used instead of wall-clock time

03

functional test added for time-jump behavior

04

no cryptographic, consensus, or network-layer changes

Risk score

Why this scored 21/100

Our methodology →
Potential impact 2/30
Exploitability 1/25
Stealth signal 1/15
Affected reach 3/15
Confidence 9/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.