FIX: take a snapshot of the state before updating a block