snowbridge icon indicating copy to clipboard operation
snowbridge copied to clipboard

Clara/sno 329 better checking for header and message sync errors

Open claravanstaden opened this issue 2 years ago • 2 comments

  • [x] Keep execution header state in storage in beacon client
  • [x] Reverse execution header syncing so that headers are synced sequentially instead of backwards
  • [x] Resume syncing execution headers on relay startup
  • [x] Check sync committee updates succeed
  • [x] Check message verification succeeded after sending to the inbound pallets

claravanstaden avatar Oct 06 '22 18:10 claravanstaden

I'll resolve the conflict with main in a bit. It conflicts with the fix I did earlier today (https://github.com/Snowfork/snowbridge/pull/698).

I'm doing a last round of testing on Goerli, but I think this PR is good to go! It basically changes:

  • syncing execution headers forward instead of backward
  • keep track of last execution header synced on the parachain, and resume syncing on relay startup
  • check if messages verified successfully, and stop processing if it hasn't
  • adds mutex lock to the header and message processing to prevent race conditions (as discussed, the header and message processing will be changed to separate processes in a follow-up PR)
  • Adds message processing after each synced header epoch - should speed up message verification a bit

claravanstaden avatar Oct 12 '22 14:10 claravanstaden

This PR is good to review now - I think it's in a good place. 😄

claravanstaden avatar Oct 13 '22 09:10 claravanstaden