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

Add duration information to payment events (#3241)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

81/100 · Strong
Add duration information to payment events (#3241)

We now record start and end time for payment events, and for remote
failures, which lets us easily identify slower paths and faulty nodes.
We properly track the settlement of each individual payment now.

We also clean-up field names and harmonize those events. Note that we
don't update the DB schema at that point: this will be done in another
PR that batches all DB schema changes.
✓ Specific, 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 is a refactoring and observability improvement for the Eclair Lightning node. It adds start/end timestamps to payment events and failures, renames some timestamp fields for consistency, and updates how payment hashes are derived from preimages. There is no direct security vulnerability visible in the diff; the changes are primarily for monitoring, metrics, and database/event-stream hygiene. A few places now use the current time instead of a previously stored request time when recording relay settlement, which is a behavioral change but not an obvious exploit.

Recommended action

No immediate security action is required. Reviewers should verify that the timestamp changes do not break accounting, audit, or downstream consumers that relied on the old `timestamp` field. The TODOs about pending DB schema changes should be tracked to completion so that `startedAt` is persisted correctly rather than duplicated from `settledAt`.

Security signals we found

01

Refactoring of payment event data model with new timestamp fields

02

Payment hash now derived from preimage instead of passed separately

03

Removal of WaitingToRelayPayment from JSON type hints

04

ChannelRelay settlement timestamp changed from request-received time to current time

05

No DB schema migration in this commit; TODOs note future schema update

Risk score

Why this scored 19/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 0/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.