Use int64_t for the sequence number everywhere.