Skip to content

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

Open
quake wants to merge 16 commits into
developfrom
fix/commitment-lock-full-payment-hash
Open

quake wants to merge 16 commits 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
/// 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
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

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