-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Don't allow unlocking of locks whose expiration crosses settlement timeout #81
Comments
We do not currently enforce this. @hackaugusto , I remember this was an edge case that you explained some time ago. |
I don't recall, this is what I can say about the expiration:
To actually enforce a small expiration on-chain, we would need to add the start block in the lock structure, otherwise we don't know how large the expiration window was. With the current lock structure it is possible to reject lock's which still have an expiration larger than the settlement window while the channel was closed, that would mean the mediators and target nodes must reject transfers with a large expiration. |
because the mediator can still unlock this transfer after the payer channel is settled, it's safe to send a transfer to the payee with large expiration. |
Not necessarily, we do have indeed changed the order, and now unlocks are allowed after the settlement, but the unlock may be called by anyone, and it's possible for this to happen:
|
We should enforce this in the smart contracts.
So inside the
unlock()
function of the smart contracts we should not allow unlocking of locks whose expiration is crossing the settlement timeout.The text was updated successfully, but these errors were encountered: