Skip to content

Conversation

@roninjin10
Copy link

Basically the idea is we close the channel just like consensus close. But instead of routing the payment to PartyA and PartyI we route some of it to an agreed upon address and route the rest into a brand new channel. This solution means we don't need to change any dispute cases.

@roninjin10 roninjin10 changed the title consensusWithdraw proposol [DO NOT MERGE NOT TESTED] consensusWithdraw proposol Sep 24, 2018
@nginnever
Copy link
Contributor

looks good, though I would imagine if you're working with cooperative state you could just keep the channel open and have consensusWithdrawal just remove some agreed upon balance.

@ArjunBhuptani
Copy link
Contributor

ArjunBhuptani commented Sep 24, 2018

Agreed. I think all you have to do is require(params.nonce > channels[channel_id].nonce) which stops people from doing a replay attack with an old consensus withdraw state

@roninjin10
Copy link
Author

Yea that makes a lot of sense. Then the withdrawal doesn't need to be submitted to chain until right before a consensus close or during a challenge period.

@roninjin10
Copy link
Author

That would allow both parties to continue on without waiting for a confirmation for the new channel to open.

@roninjin10
Copy link
Author

I updated it to keep the channel open as discussed. Currently getting a Stack too deep error though.

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

Successfully merging this pull request may close these issues.

3 participants