I'm a bit worried about the verification task. Now that all the `yields` are in place it's clear that update messages can arrive in between all these steps.  I think we need to copy and clear all the state at the start and then do all the storing and checking on the copy of the state.