Skip to content

channel_reserve_satoshis variable names confusing #181

Closed

Description

@yuntai

In the spec,

channel_reserve_satoshis is the minimum amount that the other node is to keep as a direct payment.

And, as my understanding, this means it's the value that the node receiving Open/AcceptChannel should keep.

We do channel.thier_channel_reserve_satoshis = msg.channel_reserve_satoshis
So channel.their_channel_reserve_satoshis is used when checking conditions for our channel reserve and I found it pretty confusing.

Perhaps,
channel.our_channel_reserve_satoshis = msg.channel_reserve_satoshis
and
Channel::get_their_channel_reserve_satoshis is better?

Activity

  1. TheBlueMatt commented on Sep 14, 2018

    @TheBlueMatt
    Collaborator

    Hmm, I don't think flipping it on its head is any more clear, it was the value provided by them ie its not our own setting, but, indeed, we have to have it towards us. We could rename it something like min_channel_reserve_to_self to make that more clear?

  2. yuntai commented on Sep 25, 2018

    @yuntai
    ContributorAuthor

    Now I am not confused as you clearly stated, and agree that flipping wouldn't make any clear. I added some comments in #189 and think that would suffice to prevent confusion.

  3. valentinewallace commented on May 1, 2020

    @valentinewallace
    Contributor

    Reopening because I'd agree these names are confusing, as pointed out as well by @ariard here.

    I think it's effectively "our setting," so would be fine to just flip it, but since people seem to disagree I'm open to something along the lines of remote_channel_reserve_by_us as suggested by Antoine in the linked comment, or min_channel_reserve_to_self

  4. jkczyz commented on May 1, 2020

    @jkczyz
    Contributor

    Reopening because I'd agree these names are confusing, as pointed out as well by @ariard here.

    I think it's effectively "our setting," so would be fine to just flip it, but since people seem to disagree I'll go with something along the lines of remote_channel_reserve_by_us as suggested by Antoine in the linked comment, or min_channel_reserve_to_self

    My two sats:

    Who is doing the setting is irrelevant once the setting is in place and is thus extraneous information. In the context of a channel, all that matters is what side the reserve applies to. IMHO, "local" and "remote" seem descriptive enough in this case. However, I haven't put much thought into whether there are more suitable names for this concept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions