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

Introduce upper limit for settle_timeout #1038

Closed
3 tasks
LefterisJP opened this issue Sep 18, 2017 · 3 comments
Closed
3 tasks

Introduce upper limit for settle_timeout #1038

LefterisJP opened this issue Sep 18, 2017 · 3 comments
Assignees

Comments

@LefterisJP
Copy link
Contributor

Problem Definition

This is not a really serious problem, but we should also think of introducing an upper limit for the contract's settle_timeout property.

The only reason why we would need to do that is to protect users from themselves, by not letting them enter a settle_timeout close to 2**256 - 1 and then have either this or this modifier check overflow and have their channel botched with the tokens trapped in there forever.

Solution

Provide an upper limit for settle_timeout and enforce it in the contract.

Tasklist

  • Provide upper limit for settle timeout
  • Make test for that value
  • Add a changelog entry.
@LefterisJP LefterisJP added this to the Next minor release milestone Sep 18, 2017
@LefterisJP LefterisJP self-assigned this Sep 18, 2017
@ulope
Copy link
Collaborator

ulope commented Sep 18, 2017

Anything above a couple million to tens of millions of blocks (~ 1 - 10 year(s) with 20s blocks) could probably be considered "forever" for most practical use cases.

@hackaugusto
Copy link
Contributor

Is #863 enough or do you want to add a check in the smart contract code?

@LefterisJP
Copy link
Contributor Author

I want it in the smart contracts. It's an easy thing to add.

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

No branches or pull requests

3 participants