Re: [Ntp] Consensus call: NTPv5 and leap second smearing (vote to support clearly defined and UNAMBIGUOUSLY implemented smearing procedure)

Warner Losh <imp@bsdimp.com> Mon, 10 July 2023 18:12 UTC

Return-Path: <wlosh@bsdimp.com>
X-Original-To: ntp@ietfa.amsl.com
Delivered-To: ntp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F0608C13AE2D for <ntp@ietfa.amsl.com>; Mon, 10 Jul 2023 11:12:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.893
X-Spam-Level:
X-Spam-Status: No, score=-6.893 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=bsdimp-com.20221208.gappssmtp.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DxOb1v85zzp0 for <ntp@ietfa.amsl.com>; Mon, 10 Jul 2023 11:12:00 -0700 (PDT)
Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0A88BC15154E for <ntp@ietf.org>; Mon, 10 Jul 2023 11:11:59 -0700 (PDT)
Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-4fb7b2e3dacso7579470e87.0 for <ntp@ietf.org>; Mon, 10 Jul 2023 11:11:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1689012717; x=1691604717; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tC1yngRKecPqy9Psq9bo+Y1kRH5LSBAzLEWdIW8Id/A=; b=AqAQt9NJE2SleDfbjKOJWK/OG8TeZwrU1EAxzdWvtRgVIM+DX+CMk1HqI5IeStf8q6 AP/rkU25BPlr+RPwPi1eI1MjZRnXf5emEjNvLw3eWKXraJx8qRYzhhOJNAY+OjMNdSrL ReqYZUgjSFk0bBgJZs/9wQj83YogG1pF1yf/VvFmX5ycQzvkUb9h5cOKaiv3CZvq3PjT we6JkAlnzfwU+JV4YRjPmPgy3O5S8f2PI+iSD0lzOdyiSVjL5BoFMjCYPJrTOUsaOyzE vT9Z9y8/Vt3Ap21Em/Hr+bDKAZx5eZAcmLdG/HjZm+J4NBLNZpKHzVUNufB1U54aHEim 08sw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689012717; x=1691604717; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tC1yngRKecPqy9Psq9bo+Y1kRH5LSBAzLEWdIW8Id/A=; b=apTNpEURQfQXwBtzV9t3LZa973LMqT1qTEQAZRvtwHwG4qDy6/hsEgAt5weEyp0U2R 3EgpqZYgE1TxWWaV4t4EiqSPdCL0CMHQoP/5DvXzMaU0m5RZSc6jHpfcqhCsGdWNZs5y NpDkmmTcBDeo+/sdroLUmnF7VKna6/YJl9ZEJAF+ORDQMKuXP198PVNZtpqD9ghWnspc hfd8lstHPca6s+h/DvyZvWn/Jt6YLvQIGkqbtFVmLk7FJASc2i0+nYsOK8jzJhcllNwf hcQDuqYZm00x//sxJWJY+ZxYc5X2WFSj5FHB8V/WpfcPuVe9Hd54N7BI6piUr7TQYfdK /6Tg==
X-Gm-Message-State: ABy/qLZPMtA7LavNm43NfH/cOcKM1OzU4/KlTQKrBkkhguDz45B76bBL eQhWdlAdaUkb3TXBe/jeZ6ANz27D8vbmqqGzBW4/dg==
X-Google-Smtp-Source: APBJJlFuLz36kxESONZbeZ/i1aVrLrU/csaqXi09jXaKEVgcv46SEzSlhz0BhbDtt3Ei99AcaLYkBJh6psrB17Jaqso=
X-Received: by 2002:a05:6512:6d3:b0:4f8:5ade:44b5 with SMTP id u19-20020a05651206d300b004f85ade44b5mr12392533lff.53.1689012716829; Mon, 10 Jul 2023 11:11:56 -0700 (PDT)
MIME-Version: 1.0
References: <29343948-036E-4514-8B42-689C19A61813@gmail.com> <CAJm83bAFMVFycgvo_=dZtoXrEP8TsW0WbxmQcoi2eNzSdW1rPA@mail.gmail.com> <OF767C37D0.D2022A60-ONC12589E8.002EE322-C12589E8.00300A45@ptb.de>
In-Reply-To: <OF767C37D0.D2022A60-ONC12589E8.002EE322-C12589E8.00300A45@ptb.de>
From: Warner Losh <imp@bsdimp.com>
Date: Mon, 10 Jul 2023 12:11:45 -0600
Message-ID: <CANCZdfqi=rdJ3ePg=QgPeKmkqbJYxcQoSdCnvxAbLE4Kqk247A@mail.gmail.com>
To: kristof.teichel=40ptb.de@dmarc.ietf.org
Cc: NTP WG <ntp@ietf.org>, Dieter Sibold <dsibold.ietf@gmail.com>, Daniel Franke <dfoxfranke@gmail.com>
Content-Type: multipart/alternative; boundary="000000000000021992060025ebc2"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ntp/tPdHXNyIkQu6wJwfxCqZs-DBKmY>
Subject: Re: [Ntp] Consensus call: NTPv5 and leap second smearing (vote to support clearly defined and UNAMBIGUOUSLY implemented smearing procedure)
X-BeenThere: ntp@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Network Time Protocol <ntp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ntp>, <mailto:ntp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ntp/>
List-Post: <mailto:ntp@ietf.org>
List-Help: <mailto:ntp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ntp>, <mailto:ntp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Jul 2023 18:12:04 -0000

On Mon, Jul 10, 2023 at 2:44 AM <kristof.teichel=40ptb.de@dmarc.ietf.org>
wrote:

> I concur mostly with Daniel's view here.
>
> I do believe that we need to include "official" support for leap smearing,
> since prohibiting it is probably futile anyway.
> But it is not enough to set a flag to notify a client that a server is
> using smearing - not if we don't know how exactly it implements that
> smearing.
> What we need (if smearing is used) is a way to unambiguously convert and
> compare smeared time to non-smeared time.
>
> I like option 3 of Daniel's suggestions: encode UTC as TAI plus smearing
> event information and offset information - but I think a duration for the
> event might be necessary, I'm afraid not everyone might see noon-to-noon as
> the only acceptable interval.


So far, I like the notion of having the timescale, and additional data.
this additional data can include the introduced frequency error, the
current know error, the offset from other well known timescales, etc.

So for all the 'leap seconds frozen in time' time scales, like GPS, LORAN
(though I guess this is gone), etc, they would all encode to timescale=UTC,
TAI-OFFSET=<X in seconds>. A smear would encode to whatever is being
smeared along with the current frequency error and offset to UTC. These
optional tags would be ignored by dumb ntp clients, so they would get the
smear for free, but sophisticated clients could look at the ancillary data
to know what's up. This scheme would also work well for UT1 ntp server
(which would encode a UTC-OFFSET, but that will jump, so maybe that's not a
great idea). Smeared time scales would say they are UTC, and have a
UTC-OFFSET that moves around, but doesn't jump except at the leap second
insertion).  It would have a UT1 timescale, and a current offset to UTC as
additional data. Dumb clients that track it can just get UT1, if that's
their thing, and sophisticated ones could recover UTC form that, though
likely at a lower fidelity than one would from a pure source (same is true
for smears: there's a lot of moving parts to the smear, and you can only
make your best guess at what UTC really is, should you need that and it
will necessarily be lossy compared to getting UTC directly). This would
also allow monitoring of facilities that want to smear, but may need to
find out sequence data that needs UTC after the fact, or to monitor how the
org did, etc. It's fairly open ended what they do with the data, and again
the dumb clients just discard the extra data.

I'd still keep the number of time scales down. TAI will catch GPS, etc
that's just a fixed offset. UTC is TAI with the observationally driven
leaps added promulgated by IERS. No other timescales would be needed for
almost everybody since all time scales are either fixed-offsets from one of
these, or some variable offset. (but keep the standards open, so a martian
time scale that has unknown features today could be defined in the future
via an RFC, get an encoding and be available to those implementations that
understand it). This could also define other time scales should there be a
resumption of leap seconds in 2050 with radically different rules (UTC 2.0,
to steal a web jargon). Not likely, and the details need not be nailed
down, but a framework to communicate data about the timescale, and also how
it differs from some canonical time scale would be helpful.

I've not seen this all in one place, but I'm mostly repeating the best
ideas I've seen elsewhere, with my own (maybe a bit dated now) notions. I
do think that mandating UTC always in the NTP timestamps with only the leap
indicators to guide you and doing the smearing by requiring extra
sophistication by clients is a mandate that will be ignored and we'll have
an even bigger mess here.

Warner


>
> Besten Gruß / Kind regards,
> Kristof Teichel
>
> __________________________________________
>
> Dr.-Ing. Kurt Kristof Teichel
> Physikalisch-Technische Bundesanstalt (PTB)
> Arbeitsgruppe 4.42 "Zeitübertragung"
> Bundesallee 100
> 38116 Braunschweig (Germany)
> Tel.:        +49 (531) 592-4471
> E-Mail:   kristof.teichel@ptb.de
> __________________________________________
>
>
>
> Von:        "Daniel Franke" <dfoxfranke@gmail.com>
> An:        "Dieter Sibold" <dsibold.ietf@gmail.com>
> Kopie:        "NTP WG" <ntp@ietf.org>
> Datum:        02.07.2023 21:22
> Betreff:        Re: [Ntp] Consensus call: NTPv5 and leap second smearing
> Gesendet von:        "ntp" <ntp-bounces@ietf.org>
> ------------------------------
>
>
>
> There are two things I care about:
>
> 1. The timestamp on the wire must be something that can be
> unambiguously converted to UTC.
> 2. The packet must contain sufficient information for the client to be
> able to apply a noon-to-noon smear if desired.
>
> The NTPv4 behavior of repeating during a leap second insertion is
> unacceptable, because this creates ambiguity. Any of the following
> would be equally acceptable to me:
>
> 1. Timestamps are UTC, represented using two fields: a day number, and
> time since midnight. Leap indicator bits MUST be set during precisely
> noon to noon .
> 2. Timestamps MUST be smeared linearly noon-to-noon in proximity to a
> leap event. The leap indicator MUST be set when and only when smearing
> is in progress.
> 3. Timestamps are TAI, and information elsewhere in the packet provides:
>    a. The TAI time at which the last-announced leap event begins (may
> be past, present, or future)
>    b. The direction of the event (insertion or deletion)
>    c. The TAI-UTC offset at the completion of this event
>
> 1 and 2 are perfectly equivalent in what information they provide. 3
> is more informative, and therefore nicer for the client but harder for
> the server, because it has to have the extra information available.
>
> On Wed, Jun 28, 2023 at 3:56 PM Dieter Sibold <dsibold.ietf@gmail.com>
> wrote:
> >
> > Dear all,
> >
> > at IETF 116 we decided to have two consensus calls regarding the content
> of the NTPv5 requirement draft. These are consensus calls that we would
> like to conduct to help progress the NTPv5 requirements document (
> https://datatracker.ietf.org/doc/draft-ietf-ntp-ntpv5-requirements/).
> Both consensus calls will run until July 21st 2023 and will be discussed at
> the next NTP wg meeting at IETF 117 in San Francisco.
> >
> > The second consensus call:
> >
> > Regarding leap second smearing:
> >
> > Currently, the NTPv5 requirement draft states that NTP servers should
> not apply leap second smearing to transmitted timestamps. Shall NTPv5
> support leap second smearing? If yes, shall the NTP server apply leap
> smearing to the transmitted timestamps or otherwise shall the client
> perform leap second smearing?
> >
> >
> >
> > Greetings
> > Karen and Dieter_______________________________________________
> > ntp mailing list
> > ntp@ietf.org
> > https://www.ietf.org/mailman/listinfo/ntp
>
> _______________________________________________
> ntp mailing list
> ntp@ietf.org
> https://www.ietf.org/mailman/listinfo/ntp
>
>
> _______________________________________________
> ntp mailing list
> ntp@ietf.org
> https://www.ietf.org/mailman/listinfo/ntp
>