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

Offset settle calls from channel partners #2798

Closed
palango opened this issue Jun 10, 2021 · 2 comments · Fixed by #2901
Closed

Offset settle calls from channel partners #2798

palango opened this issue Jun 10, 2021 · 2 comments · Fixed by #2901
Assignees
Labels
2 enhancement New feature or request sdk 🖥

Comments

@palango
Copy link
Contributor

palango commented Jun 10, 2021

When closing a channel and reaching the end of the settlement window, both channel partners will send a settlement transaction to the blockchain.

As those coincide, only one will go through, while one will be rejected. This could be observed while running the BF1 scenario.

To limit failing transaction we could offset the transactions ending by the partner with the higher address by a number of blocks.

@palango palango added enhancement New feature or request sdk 🖥 labels Jun 10, 2021
@taleldayekh taleldayekh added the 2 label Jun 23, 2021
@palango
Copy link
Contributor Author

palango commented Jul 29, 2021

On what criterion should the decision of who settles first be based?

  • smaller/higher node address would penalize nodes with lower/higher addresses
  • some channel_id % 2 to calculate which node is first

Any other ideas?

@andrevmatos
Copy link
Contributor

I'd propose to delay auto-settle if:

  • partner is a PC (e.g. by checking it has Delivery capability); OR
  • partner is the closing side

The first point is because PC always try to auto-settle early; the 2nd will have LCs agreeing on giving priority to the closing side to settle, since usually they're the ones most/first interested in getting their funds back. The delaying side could still try to auto-settle in e.g. revealTimeout blocks after, if the channel wasn't settled by then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 enhancement New feature or request sdk 🖥
Projects
None yet
3 participants