Skip to content

fix: prevent prefix-only on-chain preimage settlement stranding - #1656

Merged
quake merged 1 commit into
developfrom
fix/commitment-lock-full-payment-hash
Sep 25, 2026
Merged

quake merged 1 commit into
developfrom
fix/commitment-lock-full-payment-hash

Conversation

@quake

@quake quake commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Summary: negotiate and persist the ONCHAIN_FULL_PAYMENT_HASH commitment feature per channel; support legacy and v1 settlement witness layouts in channel builders and watchtower parsing; treat exact prefix-valid/full-hash-invalid on-chain preimages as failed settlements and fail forward immediately; add settlement-size, watchtower, reconciliation, and compatibility regression coverage. Depends on the matching fiber-scripts draft PR for the upgraded commitment-lock contract. Verification: focused reconciliation tests 25/25 passed; watchtower tests 28 passed; make check passed; make check-migrate passed; clippy and formatting passed. Full nextest has 29 environment failures: Cannot assign requested address.

@quake
quake force-pushed the fix/commitment-lock-full-payment-hash branch from 14535da to 0674521 Compare September 11, 2026 03:55
@quake
quake marked this pull request as ready for review September 14, 2026 01:39
Comment thread crates/fiber-types/src/channel.rs Outdated
/// Which commitment-lock settlement witness layout this channel uses,
/// decided once at channel-open and never changed.
#[serde(default)]
pub commitment_contract_version: CommitmentContractVersion,

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.

I think this need a migration?

Comment thread crates/fiber-lib/src/fiber/channel.rs Outdated
Comment thread crates/fiber-lib/src/watchtower/actor.rs Outdated

@jjyr jjyr 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.

Please remove .superpowers

@quake
quake force-pushed the fix/commitment-lock-full-payment-hash branch 2 times, most recently from 7eba8ed to 348c064 Compare September 24, 2026 05:14
@quake
quake force-pushed the fix/commitment-lock-full-payment-hash branch from 348c064 to 5d30078 Compare September 25, 2026 03:10
@quake
quake merged commit 2bb0237 into develop Sep 25, 2026
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants