nervosnetwork / fiber

15 stars 8 forks source link

Automatically generate CommitmentSigned responses in channel establishment #27

Closed contrun closed 2 months ago

contrun commented 3 months ago

Currently to create a new channel, peer_a needs to send a message OpenChannel to peer_b, then peer_b sends a message AcceptChannel to peer_a. These are steps that definitely require user interaction. It seems that after these steps, we should try our best to automatically establish the channel without user interaction. We currently still require user to send a CommitmentSigned command to the node (see https://github.com/contrun/ckb-pcn-node/tree/e62bf994c2b0c7abfc368f3662172f97ee12f17e/tests/bruno/e2e/open-use-close-a-channel for current channel establishment processes). This seems to be tedious. We need to remove requirement of issuing this request by the user.

https://github.com/contrun/ckb-pcn-node/blob/e62bf994c2b0c7abfc368f3662172f97ee12f17e/src/ckb/channel.rs#L72-L74

contrun commented 2 months ago

Done in https://github.com/nervosnetwork/cfn-node/pull/67