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

Add off-chain settlement period negotiation #864

Closed
2 tasks
hackaugusto opened this issue Aug 7, 2017 · 4 comments
Closed
2 tasks

Add off-chain settlement period negotiation #864

hackaugusto opened this issue Aug 7, 2017 · 4 comments

Comments

@hackaugusto
Copy link
Contributor

hackaugusto commented Aug 7, 2017

Problem Definition

The choice for the settlement period is unilateral, it's chosen by the node opening the channel. Ideally the value chosen is good enough for both nodes, and the channel is used normally.

A problem arises when the creator uses a settlement period too small. The channel creator rationale is to reduce the waiting time required to withdraw, if the period is lower than the required reveal timeout by the partner, it will inadvertently create an unusable channel, since the counterparty will just ignore the channel considering the settlement period unsafe.

Solution

This may be fixed on-chain, allowing the nodes to increase settlement period while the channel is opened, the drawback is the additional transaction required (note that it may still be useful to support this operation to extend the maximum number of possible hops in a mediation path).

Additionally this may be done off-chain, exchanging setup configuration among the nodes prior to the channel instantiation.

Tasklist

  • Add a protocol message to inform a counterparty that a new channel will be opened and its properties
  • Add a second message for the counterparty to inform the minimum and maximum valid configuration values, for the time only the settlement period seems to be required.
@hackaugusto
Copy link
Contributor Author

#43 proposal for the off-chain settlement period:

An alternative implementation removes the settlement period of the NettingChannelContract and add it to the message envelope, where the current highest expiration of all locks is used and signed along side with the merkleroot, and the smart contract will only allow settlement after this latest settlement period has elapsed plus a reveal timeout.

@pirapira
Copy link
Contributor

I see the current max as:

DEPLOY_SETTLE_TIMEOUT_MAX = 555428  # ~ 3 months

@pirapira
Copy link
Contributor

I think the idea makes sense. We have to balance the cost of extra steps against the possible channel-opening attacks. Maybe we can wait till we see those attacks.

@karlb
Copy link
Contributor

karlb commented Nov 18, 2021

We don't have variable settle timeouts since raiden-network/raiden-contracts#1550.

@karlb karlb closed this as completed Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants