Skip to content
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

remove references to the "private" field of channel info returned from listpeers RPC #193

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

ksedgwic
Copy link
Collaborator

@ksedgwic ksedgwic commented Apr 6, 2024

Maybe fixes #192

The private field has been removed because the private channels are no longer supposed to show up in the list:
ElementsProject/lightning@37ccca5

Since we were always checking private to skip the channel it seems safe to simply not check for it anymore ...

ksedgwic added a commit to ksedgwic/clboss that referenced this pull request Apr 6, 2024
Fixes issue ([ZmnSCPxj#193])

Changelog-Fixed: Removed references to deprecated "private" field of channel info returned from API.
Fixes issue ([#193])

Changelog-Fixed: Removed references to deprecated "private" field of channel info returned from API.
@ksedgwic ksedgwic changed the base branch from master to release-v0.13.1 April 6, 2024 22:36
@ksedgwic
Copy link
Collaborator Author

ksedgwic commented Apr 6, 2024

@vincenzopalazzo if you get a chance could you look this change over?

Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

I think there are two issue: one is the one that you fixed, and the one is the one where the channels no longer lives inside the listpeers command

@@ -53,17 +53,15 @@ class DummyEarningsManager {
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this PR is a good way to remind us that listpeerchannels is now a way to iterate over all the channels?

@@ -182,11 +182,6 @@ class InitialRebalancer::Impl::Run::Impl

auto cs = p["channels"];
Copy link
Contributor

Choose a reason for hiding this comment

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

if a user run deprecated-api = false, this object is null

from cln docs of listpeers: channels (array of objects, optional) deprecated in v23.02, removed after v24.02

@@ -157,11 +157,6 @@ class EarningsRebalancer::Impl {
));

for (auto c : p["channels"]) {
Copy link
Contributor

Choose a reason for hiding this comment

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

same here I guess

@ksedgwic
Copy link
Collaborator Author

ksedgwic commented Apr 8, 2024

@vincenzopalazzo should we add the listpeerchannels fixes to this PR or make a follow-on PR to switch to listpeerchannels?

@vincenzopalazzo
Copy link
Contributor

Now sure @ksedgwic we can do this in multiple PR?

@ksedgwic
Copy link
Collaborator Author

ksedgwic commented Apr 8, 2024

Now sure @ksedgwic we can do this in multiple PR?

I'm not sure if you are asking or answering ... if this PR is safe (won't break anything in any circumstance) and effective (doesn't crash when there is no private field then we should merge it and do more PRs.

But I'm not confident I understand when the private field will be missing:

  1. it certainly is not missing much of the time, I think because the RPC interface still inserts it when the channel is not announced?
  2. I don't know if we will see actual private channels in some circumstances (ie, with allow deprecated flag) in which case it might be bad to remove the skip when we see a private channel check

It feel like with both https://github.com/ZmnSCPxj/clboss/issues and ElementsProject/lightning#7197 we are mostly not missing the private field and then occasionally in special circumstances it is missing.

@vincenzopalazzo
Copy link
Contributor

I'm not sure if you are asking or answering ...

Oh sorry :) for me ether way it is fine, we should just remember to migrate at some point!

and you are right I think your pr is fixing the crash and you be ok to merge imho

Copy link
Contributor

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

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

ACK 2f09bce

Sounds solid to me, thanks for doing it

@ksedgwic ksedgwic merged commit c0a231a into release-v0.13.1 Apr 16, 2024
3 checks passed
ksedgwic added a commit to ksedgwic/clboss that referenced this pull request Apr 16, 2024
Fixes issue ([ZmnSCPxj#193])

Changelog-Fixed: Removed references to deprecated "private" field of channel info returned from API.
ksedgwic added a commit that referenced this pull request Apr 16, 2024
Fixes issue ([#193])

Changelog-Fixed: Removed references to deprecated "private" field of channel info returned from API.
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.

plugin-clboss: Unexpected listpeers
2 participants