-
Notifications
You must be signed in to change notification settings - Fork 421
Chan_utils helpers visibility relaxation #1839
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
Chan_utils helpers visibility relaxation #1839
Conversation
Codecov ReportBase: 90.77% // Head: 91.99% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1839 +/- ##
==========================================
+ Coverage 90.77% 91.99% +1.21%
==========================================
Files 87 90 +3
Lines 47595 59062 +11467
Branches 47595 59062 +11467
==========================================
+ Hits 43204 54332 +11128
- Misses 4391 4730 +339
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. |
wpaulino
left a comment
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.
What about the other TODOs like ANCHOR_OUTPUT_VALUE_SATOSHI and get_delayed_redeemscript?
|
Updated at b57e19f The last push increase the visibility of few other const encapsulating protocol-level values.
I think our |
|
CI is failing now since the now public consts need docs. |
|
Hope CI should be happy at 264bf5f |
lightning/src/ln/msgs.rs
Outdated
|
|
||
| /// 21 million * 10^8 * 1000 | ||
| pub(crate) const MAX_VALUE_MSAT: u64 = 21_000_000_0000_0000_000; | ||
| pub const MAX_VALUE_MSAT: u64 = 21_000_000_0000_0000_000; |
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.
This also belongs in rust-bitcoin, not here.
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.
It is though currently it's requiring a useless Network argument, sounds a legacy from multi-chain support of the library. I think downstream should be changed first to drop the argument: https://github.com/rust-bitcoin/rust-bitcoin/blob/1d0b0e6ed8e80767fef9b00a38c9e5fefc34baa0/bitcoin/src/blockdata/constants.rs#L63
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.
Sure, but either way we shouldn't be exporting fundamental Bitcoin constants from rust-lightning.
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.
Dropping the export for now and seeing with downstream to remove the argument.
|
Letting it at 264bf5f, if we would like to change downstream first or take the method as it is. |
|
Updated at 9978e1c. PR is pending on this unsolved comment: #1839 (comment) |
64495cc Drop Network arg from max_money() (Antoine Riard) Pull request description: Amount of coins available stay in the same across Bitcoin network: signet, testnet, mainet. From my understanding this is a leftover from some potential multi-chain support. For more context: lightningdevkit/rust-lightning#1839 (comment) If there is already an existent PR, it can be closed, however didn't find one. ACKs for top commit: apoelstra: ACK 64495cc tcharding: ACK 64495cc Tree-SHA512: 929011ee73c5eda903fb0140438ed5e88c8f5b7378036a87a6a660a8b9138bf204bf59a0ba822c0cd98e37e97d2d0dbbf8c9893a834da9acdf817ba43a5ed5b6
|
Updated at 6d61555 |
|
Updated at 0c614b7 |
TheBlueMatt
left a comment
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.
Some docs are confusing but LGTM.
|
Updated at 605d30e. |
See: https://gitlab.com/lightning-signer/validating-lightning-signer/-/blob/main/lightning-signer-core/src/tx/script.rs#L76
Allowing upstream projects to reuse our BOLT-compliant helpers reduce for them the risk of incompatibility or non-propagating transactions bugs.