-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[anchors] lnrpc: add commitment_type to listchannels #4068
[anchors] lnrpc: add commitment_type to listchannels #4068
Conversation
5cfd2b6
to
08d668a
Compare
A channel using the legacy commitment format having tweaked to_remote | ||
keys. | ||
*/ | ||
LEGACY = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Legacy as a type isn't very scalable. Static remote key will be legacy at some point too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OG? :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GENESIS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sticking with legacy 😛
rpcserver.go
Outdated
@@ -3080,6 +3090,7 @@ func createRPCOpenChannel(r *rpcServer, graph *channeldb.ChannelGraph, | |||
LocalChanReserveSat: int64(dbChannel.LocalChanCfg.ChanReserve), | |||
RemoteChanReserveSat: int64(dbChannel.RemoteChanCfg.ChanReserve), | |||
StaticRemoteKey: dbChannel.ChanType.IsTweakless(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is StaticRemoteKey
also true for anchors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that confusing? We could also define the bool as indicating that particular format, not a format feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, it could be either or. Not sure how much it matters, as we are deprecating it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it doesn't matter much. My preference would be to consider the boolean a channel type and not a channel feature, because it is simpler to explain. ListChannels
only communicates channel types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went with your suggestion :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🥇
|
||
/** | ||
A channel that uses the modern commitment format where the key in the | ||
output of the remote party does not change each state. This makes back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe (but i'm also a bit unsure) "does not change upon state changes"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sticking with this, as that was the original doc on static_remote_key
08d668a
to
7d305fd
Compare
Now that we have a third commitment type active (#3829), we deprecate the
static_remote_key
field onlistchannels
, and instead add anothercommitment_type
.