Pretty much everything would stay the same. If you look at the relevant messages channel_announcement and channel_update we have the following formats:
channel_announcement
- type: 256 (
channel_announcement)
- data:
- [
64:node_signature_1]
- [
64:node_signature_2]
- [
64:bitcoin_signature_1]
- [
64:bitcoin_signature_2]
- [
2:len]
- [
len:features]
- [
32:chain_hash]
- [
8:short_channel_id]
- [
33:node_id_1]
- [
33:node_id_2]
- [
33:bitcoin_key_1]
- [
33:bitcoin_key_2]
channel_update
- type: 258 (
channel_update)
- data:
- [
64:signature]
- [
32:chain_hash]
- [
8:short_channel_id]
- [
4:timestamp]
- [
1:message_flags]
- [
1:channel_flags]
- [
2:cltv_expiry_delta]
- [
8:htlc_minimum_msat]
- [
4:fee_base_msat]
- [
4:fee_proportional_millionths]
- [
8:htlc_maximum_msat] (option_channel_htlc_max)
If you look at this you'll see that the channel_announcement includes a lexicographically sorted list of node and bitcoin signatures and their corresponding pubkeys. This is trivial to extend to arbitrary number of participants by making this list variable in length.
In particular the short_channel_id still refers to the single output that the off-chain contract was opened with, that'd also stay the same.
channel_update may seem a bit more complicated since now there are n*(n-1) possible directions (sender-receiver pairs) this contract can be traversed, whereas in the simple 2 participant channel we just have 2 directions. The direction concept can however be easily extended to just lexicographically rank all sender-receiver pairs and use the index to identify the pair.
It is likely that some of the message formats need to be amended (variable length pubkey and signature lists) and some fields be made explicit (rank index for sender-receiver pair), but the general concept stays the same.
I don't know enough about this to give a proper answer. It seems like the semantics of
– Mark H – 2019-03-16T20:09:52.953short_channel_idwould need changing, or that the channels would need to be private and theshort_channel_idcould be a made up value passed in a BOLT#11 invoice. Related question which you previously gave me an answer.Another possibility which might be possible without changes to gossip, is that the
short_channel_idof the hook transaction could be used in the BOLT#11 invoice, and the payee could pass thepayment_hashto their channel peer privately, so that when the peer receives an incomingupdate_add_htlcwith the hook'sshort_channel_idand thatpayment_hash, they know which member of the channel factory it is intended for. For outgoing payments, the participants would have achannel_idfor the transaction which does not depend on it being in a specific location on the blockchain. – Mark H – 2019-03-16T20:14:03.933Another (perhaps bad) idea is to use the
short_channel_idof the hook transaction, and when the factory participant receives anupdate_add_htlc, they broadcast it to all of the members of the factory. All but one member should return aupdate_fail_malformed_htlc, and one member should return either anupdate_fulfull_htlcorupdate_fail_htlc. The node could collect these replies and figure out who it was intended for. – Mark H – 2019-03-16T20:24:58.200