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
LefterisJP opened this Issue Sep 10, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@LefterisJP
Collaborator

LefterisJP commented Sep 10, 2018

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

This comment has been minimized.

Collaborator

LefterisJP commented Sep 14, 2018

pushing to next milestone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment