Channel Acceptor
The channel acceptor API allows you to enforce custom logic on whether an incoming channel should be accepted or not.
LND’s channel acceptor is a mechanism which you can use to define custom logic with regard to whether an incoming channel should be accepted or not.
This may be useful when restricting channel opens from nodes that meet certain criteria. For example, some nodes may want to restrict channel opens to a desired list of nodes or a specifically defined size. It can also be used to accept channels with a remote channel reserve of zero or to accept zero-confirmation channels.
The channel acceptor is used in Pool to ensure that channels opened through the marketplace have the desired attributes.
API documentation: Channel acceptor
In principle, the channel acceptor is relatively simple and does not need to be specifically enabled. When the API endpoints are called (either RPC or REST), a bi-directional channel between LND and the client is established, through which all incoming channel requests are sent.
The client can then respond with either TRUE or FALSE regarding whether the channel should be accepted or not. They can also send a 500 character custom error message to the initiator to inform them about why the channel was denied.
When no channel acceptor is set, all incoming zero-confirmation channels are denied by default.
When using the channel acceptor to accept zero-confirmation channels, please note that both the initiator and the respondent must have the following set in their lnd.conf:
protocol.option-scid-alias=true
protocol.zero-conf=true
It is possible to have multiple channel acceptors. If any channel acceptor denies a channel request, LND will deny the channel request as well.
Code examples:
Pool:
lndclient:
Last updated
Was this helpful?
