SyncHandler.compute_state_delta
This is a huge method, which melts my brain. This is a non-functional change which lays some groundwork for future work in this area.