Please keep the state updates in reset_context and sync_context in order of address.