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

Topics: add three new topic pages #1509

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

harding
Copy link
Collaborator

@harding harding commented Feb 13, 2024

  • CLTV expiry delta
  • Proof of reserves
  • X-only public keys

Topics were suggested on #721

The CLTV expiry delta tries to prevent Bob from losing value this way.
When Alice gives Bob an HTLC that allows her to claim a refund after
`x` blocks, Bob gives Carol an HTLC that allows him to claim a refund
after `x - y` blocks. They _y_ parameter is Bob's HTLC expiry delta:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
after `x - y` blocks. They _y_ parameter is Bob's HTLC expiry delta:
after `x - y` blocks. The _y_ parameter is Bob's HTLC expiry delta:

For example, imagine a payment that will be sent across 20 hops each
with an HTLC expiry delta of 100 blocks. If that payment stalls, it
could be up to 2,000 blocks (about two weeks) until the spender gets
a refund and is able to resend the payment again.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
a refund and is able to resend the payment again.
a refund and can resend the payment again.

could be up to 2,000 blocks (about two weeks) until the spender gets
a refund and is able to resend the payment again.

There's no universally agreed upon tradeoff between security and
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
There's no universally agreed upon tradeoff between security and
There's no universally agreed-upon tradeoff between security and

does.

The simplest form of proof of reserves lists each depositor's name in a
form that can't be confused with any other depositor's name. Explicit
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
form that can't be confused with any other depositor's name. Explicit
form that can't be confused with any other depositor's name. The use of explicit


For privacy, each depositor's name may be replaced with a pseudonym.
However, depositors still need to ensure they are each given a unique
name. For more privacy, the association between name and exact deposit
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
name. For more privacy, the association between name and exact deposit
name. For more privacy, the association between the name and the exact deposit

checking operations to reduce the size of public keys.

The advantage for x-only public keys is that they save space. The
downside is that generated public keys most only used the allowed _y_
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
downside is that generated public keys most only used the allowed _y_
downside is that generated public keys only used the allowed _y_

(I think? I may not be parsing this sentence correctly.)

Copy link
Contributor

Choose a reason for hiding this comment

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

I have similar confusion on the sentence

received from Alice, so her funds are stuck as well. To avoid funds
becoming permanently stuck, HTLCs have an expiry after which Bob will
be able to claim a refund. After Bob receives his refund from Carol, he
can reject the payment from Alice (giving her a refund). Alternatively,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
can reject the payment from Alice (giving her a refund). Alternatively,
can reject the payment from Alice, giving her a refund. Alternatively,

(a weak suggestion, just personal preference, feel free to ignore)

There's no universally agreed upon tradeoff between security and
worst-case payment delivery time, so LN implementations tend to each use
different default HTLC expiry deltas, often change those defaults, and
usually allow users to chose their own setting.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
usually allow users to chose their own setting.
usually allow users to choose their own setting.

depositors have some assurance that Bank Corp could return their
deposited amounts if it was willing.

Proof of reserves can not guarantee that the funds are available. For
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Proof of reserves can not guarantee that the funds are available. For
Proof of reserves cannot guarantee that the funds are available. For

Comment on lines 91 to 95
6 BTC
/ \
3 BTC 3 BTC
/ \
(1 BTC: Alice)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure, but does the node (hash) immediately to the right of Alice's node also need to be revealed? That is, both of the contributors to the "3 BTC" on the left side?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated to separate the sum operations from the name operations, so it's (maybe) a little clearer that all Alice needs is the clear-text amount of the side branch and the hash commitment to the name of the person with that balance.

it's how many blocks he has to claim a refund onchain before he could
potentially lose money if Alice claims her refund.

Higher HTLC deltas provide more safety as they give an LN node more time
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Higher HTLC deltas provide more safety as they give an LN node more time
Higher HTLC expiry deltas provide more safety as they give an LN node more time


Higher HTLC deltas provide more safety as they give an LN node more time
to get an HTLC refund transaction confirmed onchain before that node is
at risk of losing funds. However, higher HTLC deltas magnify the
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
at risk of losing funds. However, higher HTLC deltas magnify the
at risk of losing funds. However, higher HTLC expiry deltas magnify the

- title: "LND #2759 lowers the default CLTV delta for all channels from 144 blocks to 40 blocks"
url: /en/newsletters/2019/04/02/#lnd-2759

- title: "LN-Symmetry requires longer HTLC expiry deltas than expected"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- title: "LN-Symmetry requires longer HTLC expiry deltas than expected"
- title: "LN-Symmetry requires longer CLTV expiry deltas than expected"

I think all topic references and body text should replace HTLC expiry delta with CLTV expiry delta. If we want to use the terms interchangeably, we should note that alias

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point! Making that edit and also adding a test to forbid "HTLC expiry delta" in the future.

checking operations to reduce the size of public keys.

The advantage for x-only public keys is that they save space. The
downside is that generated public keys most only used the allowed _y_
Copy link
Contributor

Choose a reason for hiding this comment

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

I have similar confusion on the sentence

bytes.

The extra bit can be eliminated if only one of the two alternative _y_
coordinates are allowed. X-only public keys do this, using a total of
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
coordinates are allowed. X-only public keys do this, using a total of
coordinates is allowed. X-only public keys do this, using a total of

@bitschmidty
Copy link
Contributor

Doesnt seem like anything too intense coming out of these reviews (thanks @vostrnad and @LarryRuane !). You think we should work to get these fixups in and merge this PR, @harding ?

@harding harding force-pushed the 2024-02-topics-por-xo-ced branch from a63b5e9 to 73327b5 Compare April 4, 2024 20:22
@harding
Copy link
Collaborator Author

harding commented Apr 4, 2024

Edits made. Thanks @LarryRuane @vostrnad @bitschmidty !

Copy link
Contributor

@bitschmidty bitschmidty left a comment

Choose a reason for hiding this comment

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

Checked the diff, lgtm,

Thanks for putting these together @harding !

@bitschmidty bitschmidty merged commit 4f21502 into bitcoinops:master Apr 4, 2024
2 checks passed
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.

4 participants