Skip to content

[bug]: Mailbox Collisions in Hashmail Proof Courier When Closing Tap Asset Lightning Channels #1113

Open
@ffranr

Description

@ffranr

A bug has been encountered when closing a Tap Asset Lightning Channel using the Hashmail proof courier. The issue arises in the process of delivering the channel close proof to the channel counterparty peer.

Observed Behavior

When closing a Tap Asset Lightning Channel, the same script pub key is used for all receiving peers. As a result, mailbox collisions occur when the Hashmail proof courier service is used to facilitate proof transfers. This happens because mailbox addresses are derived from the receiver's script pub key, and the Hashmail service only allows a single client connection to wait on a receiver's ACK stream for a given mailbox. Consequently, all channel-closing peers must process sequentially, leading to potential connection timeouts if a receiver delays returning an ACK. In practice, this blocks all proof transfers for channel closures using the Hashmail service.

This behavior has been observed when using the Polar testing framework, the frontend-regtest framework, and was also reproduced in a lightning-terminal integration test.

The earliest version of tapd where this has been observed is v0.4.0-alpha. It may occur in earlier versions.

Steps to Reproduce

  1. Set up a Tap Asset Lightning Channel.
  2. Close the channel while using the Hashmail proof courier.
  3. Observe that the same script pub key is used independent of the receiving peer. In other words, every receiving peer will use the same script pub key and therefore the same Hashmail service mailbox (for receiver ACK).

Suggested Fix

Investigate alternative methods for designating mailboxes in the Hashmail proof courier service that ensure each peer has a unique mailbox for proof transfer. This might involve using an identifier other than the script pub key to avoid mailbox conflicts and allow for concurrent processing of channel close proof transfers.

Priority

Low - The Hashmail proof courier is not the default proof courier for Tap Nodes.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

🔖 Ready

Relationships

None yet

Development

No branches or pull requests

Issue actions