optics-monorepo icon indicating copy to clipboard operation
optics-monorepo copied to clipboard

refactor: simplify `proversync` and remove incremental merkle usage

Open luketchang opened this issue 3 years ago • 2 comments

  • the reason why deleting persistence and restarting fixes the stuck processor is that from_disk checks for missing proofs and fills them all
  • tried to find bug in proversync::spawn code that leads to missing db proofs and it's likely a range error or something nuanced
  • may be missing something but usage of the incremental merkle seems to way overcomplicate the proversync and it doesn't seem to provide any benefit right now
  • it serves as a check before committing to the in-memory prover tree but no matter what happens, if the prover root becomes mismatched with what we expect from signed updates, we will bail (no way to handle gracefully anyways so may as well just commit to the in-memory prover first)

luketchang avatar Oct 08 '21 17:10 luketchang

was coming in hot to protest but

if the prover root becomes mismatched with what we expect from signed updates, we will bail (no way to handle gracefully anyways so may as well just commit to the in-memory prover first)

yep mhmm true. you've convinced me.

prestwich avatar Oct 08 '21 17:10 prestwich

Will merge #879 first then move base to main and merge this one

luketchang avatar Oct 08 '21 18:10 luketchang