-
Notifications
You must be signed in to change notification settings - Fork 379
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
Coop-Settle channel-state logic #7233
Coop-Settle channel-state logic #7233
Conversation
f3fa686
to
904b9f7
Compare
904b9f7
to
ec30b5f
Compare
Did we agree on having a specific endpoint for it? Or couldn't we optimisticly try to coop settle and if not possible do the old settlement process? |
That's the plan - reuse the channel-close endpoint: there try a coop-settle first and if that expires go with the traditional close/settle cycle. |
5b76a2f
to
8f6e7f8
Compare
8f6e7f8
to
739348f
Compare
The single file testing the state-machine for the NettingChannelState and NettingChannelEndstate was very large and was testing a lot of different state-changes. In this commit, the file is split up in a separate module, roughly grouped by the type of state-changes that are tested
Before, the logic to handle the `ActionChannelCoopSettle` was there, but the channels state machine would not process the event. Now, the dynamic type-checking of incoming events will forward the action to the appropriate handler-function.
And drop the unneded type annotation.
It's still useful.
739348f
to
0919ec7
Compare
0919ec7
to
e31db23
Compare
Implement the Coop-Settle logic built on-top of the Withdraw protocol.
This PR implements the logic as specified in this proposal.
It leverages the internal locking of channels with the
NettingChannelEndState.withdraws_pending
checks, that arealready in place for the withdraws.
The most important additional verification for coop-settle is:
This PR lacks:
ActionInitCoopSettle
ContractSendCoopSettle
event