integritee-network / worker

Integritee off-chain worker and sidechain validateer
Apache License 2.0
89 stars 46 forks source link

light_client_db and state can become inconsistent #169

Open brenzi opened 4 years ago

brenzi commented 4 years ago

Scenario:

  1. stop worker service
  2. light_client_db may get corrupted
  3. restore backup (from previous block....or even a few blocks back if only that backup is available)
  4. extrinsics may get replayed on top of state

Extreme scenario:

  1. sync worker to block X as should be
  2. stop worker service
  3. delete light_client_db.bin
  4. restart worker. worker will replay all extrinsics on top of state

Scenario with changing secrets

  1. change shielding key at block height X
  2. carry on. no problems so far.
  3. sync a new worker that worker will not have the old shielding key, so it won't apply extrinsics before height X. state is inconsistent
brenzi commented 4 years ago

partly fixed by #89

murerfel commented 3 years ago

There is an additional check we might have to do, as a result of #247, to make sure the state of the different modes are also kept consistent.