-
Notifications
You must be signed in to change notification settings - Fork 404
Clarify docs on provide_channel_parameters
#1903
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
Clarify docs on provide_channel_parameters
#1903
Conversation
Codecov ReportBase: 90.77% // Head: 90.76% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1903 +/- ##
==========================================
- Coverage 90.77% 90.76% -0.02%
==========================================
Files 94 94
Lines 49603 49603
Branches 49603 49603
==========================================
- Hits 45025 45020 -5
- Misses 4578 4583 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I had something similar in a previous iteration and @devrandom thought otherwise #1867 (comment). |
94831d8
to
ec6fabd
Compare
Added a note that the "instance" here includes calling again if the object was created by |
lightning/src/chain/keysinterface.rs
Outdated
/// | ||
/// This data is static, and will never change for a channel once set. For a given [`BaseSign`] | ||
/// instance, LDK will call this method exactly once - either immediately after construction | ||
/// (including if done via [`KeysInterface::read_chan_signer`]) or when the funding information |
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.
We don't ever call it immediately after read_chan_signer
, it either must have been called in the past and was serialized, or it will be called once funding occurs.
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.
Oops, lol, right.
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 after squash.
I'm OK with the doc in this PR. however, I have some thoughts about the when a dev is looking at the so if that's the most likely use case that the docs should focus on, then the docs should probably be adjusted to address it, rather than implicitly focusing on how to use |
I don't think the wording here is wrong given that, either, though? I suppose, indeed, we should include a little more guidance on enforcement (or, honestly, just link to VLS, cause its a ton of work lol), but I also think someone may implement the sign trait with a goal of using different keys, learning when a transaction is being signed, or just doing naive policy checks (like closing transaction pays to the right place). |
0afc89a
to
78f6fb2
Compare
Will address #1892 (comment) here |
Its very confusing to say that LDK will call `provide_channel_parameters` more than once - its true for a channel, but not for a given instance. Instead, phrase the docs with reference to a specific instance, which is much clearer.
03de059 appeared to revert updated docs due to a rebase error. This reverts the docs on `generate_channel_keys` to the state they were in prior to that commit, with one additional doc.
78f6fb2
to
2059190
Compare
Rebased and did so. |
Its very confusing to say that LDK will call
provide_channel_parameters
more than once - its true for a channel, but not for a given instance. Instead, phrase the docs with reference to a specific instance, which is much clearer.