← Back to Pull requests

[v0.20.x-branch] mod: bump lightning-onion to v1.3.0 #11165

Closed
unknown closed this pull request without merging on Sep 11, 2026 11:37 UTC
View on GitHub
unknown unknown commented on Sep 03, 2026 10:37 UTC
Author

Change Description

Bumps lightning-onion from a 2024-08 pseudo-version (v1.2.1-0.20240815225420-8b40adf04ab9) to v1.3.0, bringing the v0.20 branch up to the version v0.21 already carries.

v1.3.0 includes lightning-onion#74, which bounds hop payload parsing to the routing information length, and #75, the optional NoOpReplayLog. Master took this version in #10089 as part of onion messaging; the v0.20 line was never updated.

Two indirect requirements move because lightning-onion v1.3.0's own go.mod requires them: go-md2man v2.0.4 and blackfriday v2.1.0 (which drops the now-unused sanitized_anchor_name). A minimal go.mod-only edit is rejected by go build ("updates to go.mod needed"), so these are part of the change, not tidy churn.

Source adaptations

Two, both identical to what master did in #10089:

  • sphinx.MaxPayloadSize → sphinx.MaxRoutingPayloadSize. Same value (1300), so pathfinding behaviour is unchanged. One call in routing/pathfind.go, two in htlcswitch/hop/fuzz_test.go.

  • HopPayload.Decode was replaced by the DecodeHopPayload function; FuzzHopPayload updated to match.
  • Every other symbol lnd v0.20 uses (NewOnionPacket, NewRouter, DeterministicPacketFiller, ProcessOnionPacket, the ReplayLog interface) is signature-compatible.

    Verification

  • go build ./... passes.

  • go vet ./... passes, apart from two pre-existing musig2v040 warnings unrelated to this change.

  • go test passes in every package importing lightning-onion: htlcswitch/hop, payments/db, routing, routing/route, routing/blindedpath, zpay32, lnrpc/routerrpc, contractcourt, channeldb/migration_01_to_11.

  • ./htlcswitch has five failing tests (TestChannelLinkBandwidthConsistency, TestChannelLinkTrimCircuitsNoCommit, TestChannelLinkCleanupSpuriousResponses, TestPipelineSettle, TestSwitchDustForwarding). They fail identically on a clean v0.20.x-branch checkout with matching timings, and neither link_test.go nor switch_test.go exercises sphinx. Pre-existing on the branch, not caused here.
  • Steps to Test

    go test ./htlcswitch/hop/ ./routing/ on this branch.

    Diff: 270 lines (+202 / -68) across 3 files Reviewer: gijswijs Review duration: 11580m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 270 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.335
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #11165"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.4% (MEDIUM) · Higher = larger blast radius
    39.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.6% · Safe to merge
    15.6%