Description
When receiving events from the blockchain, those events are transformed into state changes which are processed by the state machine.
In the past we batched the transformation and the processing in order to speed up execution. As we found out in #6444, this doesn't work in general, as the transformation from blockchain event to state changes might require prior state to be available in the state machine.
A simple fix was done in #6470. However, in order to make debugging easier in the future we should handle all state changes created based on blockchain events in a single database transaction (including the final Block
state change), and process the Raiden events generated after that transaction has gone through.
This leaves the proxies with an up-to-date block number which results in better and more informative error messages.