Skip to content

[v0.20.x-branch] Backport #11032: contractcourt: retain deadline across contest resolution - #11033

Merged
ziggie1984 merged 2 commits into
v0.20.x-branchfrom
backport-11032-to-v0.20.x-branch
Aug 6, 2026
Merged

[v0.20.x-branch] Backport #11032: contractcourt: retain deadline across contest resolution#11033
ziggie1984 merged 2 commits into
v0.20.x-branchfrom
backport-11032-to-v0.20.x-branch

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Backport of #11032


Change Description

Outgoing contest resolvers embed the timeout resolver they transition to once
the outgoing HTLC reaches its expiry. Forward the corresponding incoming HTLC
expiry to that embedded resolver so the existing deadline remains available
after the transition.

The added test exercises the contest-to-timeout transition and checks that the
supplied deadline is retained.

Steps to Test

go test ./contractcourt \
  -run 'TestHtlcOutgoingResolver(SupplementDeadline|Timeout|RemoteClaim) \
  -count=1

Pull Request Checklist

Testing

  • Your PR passes all CI checks.
  • Tests covering the changed behavior are included.

Code Style and Documentation

  • The change follows the code documentation and line-length guidelines.
  • Commits follow the ideal Git commit structure.
  • A change description is included in the 0.21.2 release notes.

Forward the supplied incoming HTLC expiry from the outgoing contest resolver to its embedded timeout resolver. This keeps the deadline available when resolution transitions after the outgoing HTLC expires.

(cherry picked from commit f776068)
@github-actions github-actions Bot added this to the v0.21.2 milestone Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-11032-to-v0.20.x-branch
git worktree add --checkout .worktree/backport-11032-to-v0.20.x-branch backport-11032-to-v0.20.x-branch
cd .worktree/backport-11032-to-v0.20.x-branch
git reset --hard HEAD^
git cherry-pick -x 5b4c5067dbd3aa0714b8550511b1e05f25220b83
git push --force-with-lease

@ziggie1984
ziggie1984 force-pushed the backport-11032-to-v0.20.x-branch branch from 3f64ad0 to f93ca95 Compare August 6, 2026 11:52
@ziggie1984
ziggie1984 marked this pull request as ready for review August 6, 2026 11:52
@github-actions github-actions Bot added the severity-critical Requires expert review - security/consensus critical label Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Author

🔴 PR Severity: CRITICAL

gh pr view | 3 files | 48 lines changed

🔴 Critical (1 file)
  • contractcourt/htlc_outgoing_contest_resolver.go - contractcourt/* handles on-chain dispute resolution and breach/contest logic
🟢 Low (2 files)
  • contractcourt/htlc_outgoing_contest_resolver_test.go - test-only change
  • docs/release-notes/release-notes-0.20.2.md - release notes documentation

Analysis

The core change modifies contractcourt/htlc_outgoing_contest_resolver.go, which is part of the on-chain contract dispute resolution logic (forward contest deadline handling). This package directly affects breach/contest handling for outgoing HTLCs, so it falls under the CRITICAL tier regardless of the small diff size (8 non-test lines changed). The remaining files are a test addition and a release-notes update, which do not affect the severity determination.


To override, add a severity-override-{critical,high,medium,low} label.

@ziggie1984 ziggie1984 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (release notes were the only merge conflict)

@ziggie1984
ziggie1984 merged commit d8ed678 into v0.20.x-branch Aug 6, 2026
34 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog severity-critical Requires expert review - security/consensus critical

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant