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

We shouldn't use hardcoded values here #18

Closed
wants to merge 1 commit into from

Conversation

aarani
Copy link

@aarani aarani commented Dec 10, 2020

This code assumes that the person who broadcasted the commitment
transaction is always the funder and the person who tried to spend
the broadcasted remote commitment is always funder.
This passed our test because that's the only case we test in our
end-to-end tests.

This code assumes that the person who broadcasted the commitment
transaction is always the funder and the person who tried to spend
the broadcasted remote commitment is always funder.
This passed our test because that's the only case we test in our
end-to-end tests.
@knocte
Copy link
Member

knocte commented Dec 10, 2020

should this be applied to m4 first?

@aarani
Copy link
Author

aarani commented Dec 10, 2020

There is two revocation implementation currently in DNL.Kiss one which uses private key and tries to spend whatever commitment tx it can (whether it's broadcasted by us or by the remote party)
There is another one (which we recently merged) which only returns the punishment Tx to store and broadcast later in case of an revoked commitment broadcasted by the other party
This bug only affects the first one (previous m4 implementation ) and not the second one.
So for example if we add a force close option to geewallet in future this bug will prevent both funder and fundee (using geewallet) from spending the commitment tx if fundee tries to force-close the channel on the other hand if the remote party try to cheat by broadcasting a revoked tx our recently merged code will be able to spend the tx anyway

@aarani aarani closed this Dec 10, 2020
@aarani aarani reopened this Dec 10, 2020
@knocte
Copy link
Member

knocte commented Dec 10, 2020

So for example if we add a force close option to geewallet in future this bug will prevent both funder and fundee (using geewallet) from spending the commitment tx if fundee tries to force-close the channel.

Given that Andrew is going to implement force-closing in m4, then we need this bugfix in m4 first?

@aarani
Copy link
Author

aarani commented Dec 10, 2020

So for example if we add a force close option to geewallet in future this bug will prevent both funder and fundee (using geewallet) from spending the commitment tx if fundee tries to force-close the channel.

Given that Andrew is going to implement force-closing in m4, then we need this bugfix in m4 first?

Yes this bug should get fixed for that to work

@knocte
Copy link
Member

knocte commented Dec 10, 2020

Yes this bug should get fixed before m4 finishes

Ok then re-target this PR to geewalletLightningMilestone4 instead of master.

@aarani
Copy link
Author

aarani commented Dec 10, 2020

The master branch is broken too but yeah will create a new pull request for that branch

@aarani
Copy link
Author

aarani commented Dec 10, 2020

#19 retargeted.

@knocte
Copy link
Member

knocte commented Dec 10, 2020

The master branch is broken too

I know.

will create a new pull request for that branch

No need, I will rebase master branch on top of geewalletLightningMilestone4 after merging this.

Take in account, given that DNL.Kiss is a fork of DNL, it will be constantly a moving target (having force-pushes all the time for the master branch).

@knocte
Copy link
Member

knocte commented Dec 10, 2020

@canndrew please review

@knocte
Copy link
Member

knocte commented Dec 10, 2020

#19 retargeted.

Closing this one then, actually.

@knocte knocte closed this Dec 10, 2020
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.

2 participants