ElementsProject / peerswap-spec

6 stars 3 forks source link

use 32-byte channel ids instead of short channel ids #2

Open remyers opened 2 years ago

remyers commented 2 years ago

The swap_in_request and swap_out_request messages currently pass a scid (short channel id) parameter. It would be easier to process and more consistent with existing Lightning messages if instead these messages used a 32-byte channel_id to identify the channel being requested.

Any channels used for PeerSwap should have a corresponding confirmed on-chain opening tx and thus a permanent channel_id defined. Current Lightning messages use the 32-byte channel_id to identify channels. A short_channel_id is only needed for routing, which is not relevant for PeerSwap.

In particular, Eclair watches for payments based on their channel_id and using short_channel_id in PeerSwap messages requires an unnecessary lookup or additional parameter passing. This may be true for other implementations also.