Skip to content

Make lightning-transaction-sync compat notice a bit more explicit #2270

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

Conversation

tnull
Copy link
Contributor

@tnull tnull commented May 5, 2023

Resolves #2254.

As lightning-transaction-sync was introduced with 0.0.114 and depended on prior changes in the same release cycle we deemed it reasonable to omit the implicitly limited backwards compatibility.

It however turns out this might be confusing to users copy/pasting the codebase. Here we therefore spell out the implicit dependency on 0.0.114 and above.

@tnull tnull changed the title Make version compat a bit more explicit Make lightning-transaction-sync compat notice a bit more explicit May 5, 2023
@tnull tnull force-pushed the 2023-05-improve-tx-sync-compat-notice branch from f4c0b50 to 110956f Compare May 5, 2023 09:39
@@ -13,7 +13,8 @@
//!
//! ## Version Compatibility
//!
//! Currently this crate is compatible with nodes that were created with LDK version 0.0.113 and above.
//! Currently this crate is compatible with nodes that were created with LDK version 0.0.114 and
//! above and channels that were created with LDK version 0.0.113 and above.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way I read this if you create a channel on 113 and then upgrade to 114 this crate won't work, but I didn't think that was the requirement, rather you can as long as it was created >= 113 and you're using this crate against LDK 114+ objects themselves.

Copy link
Contributor Author

@tnull tnull May 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mh, yeah, maybe. Tbh, I'm not sure if this 'clarification' is actually needed or may lead to even more confusion.
Maybe our initial assumption that nobody would use the crate against objects lower than 114 is still sufficient afterall, even though there was one recent outlier?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, I mean AFAIU you explicitly cannot without forking it, since it requires the traits in 114 as its dependency. Another way to phrase it is just "this crate only works with LDK version 114 and above using channels which were created on LDK version 113 and above"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, now amended the commit:

diff --git a/lightning-transaction-sync/src/lib.rs b/lightning-transaction-sync/src/lib.rs
index 3955bc68..ca3ce3f8 100644
--- a/lightning-transaction-sync/src/lib.rs
+++ b/lightning-transaction-sync/src/lib.rs
@@ -14,6 +14,6 @@
 //! ## Version Compatibility
 //!
-//! Currently this crate is compatible with nodes that were created with LDK version 0.0.114 and
-//! above and channels that were created with LDK version 0.0.113 and above.
+//! Currently this crate is compatible with LDK version 0.0.114 and above using channels which were
+//! created on LDK version 0.0.113 and above.
 //!
 //! ## Usage Example:

As `lightning-transaction-sync` was introduced with 0.0.114 and depended
on prior changes in the same release cycle we deemed it reasonable to
omit the implicitly limited backwards compatibility.

It however turns out this might be confusing to users copy/pasting the
codebase. Here we therefore spell out the implicit dependency on 0.0.114
and above.
@tnull tnull force-pushed the 2023-05-improve-tx-sync-compat-notice branch from 110956f to ff865eb Compare May 9, 2023 08:45
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.02 ⚠️

Comparison is base (e94647c) 91.50% compared to head (110956f) 91.48%.

❗ Current head 110956f differs from pull request most recent head ff865eb. Consider uploading reports for the commit ff865eb to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2270      +/-   ##
==========================================
- Coverage   91.50%   91.48%   -0.02%     
==========================================
  Files         104      104              
  Lines       52087    52087              
  Branches    52087    52087              
==========================================
- Hits        47660    47652       -8     
- Misses       4427     4435       +8     

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TheBlueMatt TheBlueMatt merged commit 7884bc4 into lightningdevkit:main May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keep running into unexpected panic with esplora sync
4 participants