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

Recover old balance proof to settle with partner who uses it #2414

Closed
4 tasks
LefterisJP opened this issue Sep 10, 2018 · 1 comment
Closed
4 tasks

Recover old balance proof to settle with partner who uses it #2414

LefterisJP opened this issue Sep 10, 2018 · 1 comment
Assignees

Comments

@LefterisJP
Copy link
Contributor

Problem Definition

Part of #2214 .

During settle, our partner may try to cheat and use an old BalanceProof and not the latest one. We have to handle this case and recover the old balance proof from the WAL.

Tasks

  • Add balance hash to all state changes that have balance proofs. Perhaps only SignedBalanceProofState is enough.
  • Query the WAL for the state change that has this balance proof hash
  • Find the closest snapshot to that state, and replay the state, (just like we do when we restart -- just reapply state changes, and discard event. So no I/O) to recreate the state at the point of the balance proof.
  • Use that state to obtain the balance proof and the recreated merkle tree to use in settle() and unlock()
@LefterisJP
Copy link
Contributor Author

pushing to next milestone

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