🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #89888

Re: Proposal specifications for MAXARTNUM

#89888
From: Julien ÉLIE
Date: Thu, 22 Dec 2022 21:43
87 lines
4638 bytes
Hi Richard,

>> I believe something needs being said about the maximum allowed, so as
>> not to be vague.
> 
> Agreed...
> 
>> And better put a limit corresponding to the "next
>> step" (2^128) instead of the one we consider in 2022 (2^64).
> 
> ...but I’m not so sure that a limit around 2^128 is right.

There won't be any "right" value :-(



>> This way, the problem is closed for version 2 of the protocol.  As you
>> say, it should normally be enough for several years or maybe forever
>> for the needs of NNTP.  (As a side note, future 128-bit processors
>> will probably treat "long long" as 128-bit integers, and existing
>> implementations built on such architectures may advertise that
>> length...   I don't know how current 256-bit GPU treat "long long".)
> 
> I’d note that there is a practical advantage to a 63-bit (or 64-bit)
> limit: parsing integers up to 64 bits is straightforward in current C
> implementations

Even with, say, a limit of 2^128, you can also use strtoull() to easily 
parse numbers.
In fact, an implementation needs checking the syntax.

If a news client sends:

MAXARTNUM 000001514649446464645978796145345048644068460496262

You're not required to parse it as an integer.
First you split "words" (separated by whitespace), check the number of 
arguments, and see whether they are correct.  Is every character of the 
second argument a digit?  Does it have less than XX digits?
Is it in the range of numbers I can cope with?
...

All of these questions cannot be answered in a straightforward way by 
strtoull(), can it?
Won't it return ULLONG_MAX and you'll still have to compare the string 
to ULLONG_MAX (removing leading zeroes) to check it was not exactly 
ULLONG_MAX?

If strtoull() can do all of that without any manual parsing, then 
there's no problem in having a 2^128 limit (or any other limit).
If it can't, then anyway it would be the same with a 2^64 limit.  You'll 
still have to validate somehow the input.


Unless I am missing something?



And it is the same thing if a news server adversises a very large number 
in MAXARTNUM capability.



> If article numbers above 64 bits were realistic then this consideration
> would be irrelevant. But they aren’t; as such I don’t think we should
> make life harder for implementors to handle an implausible contingency.

Clive explicitly warned us in 2005:
https://lists.eyrie.org/pipermail/ietf-nntp/2005-July/005802.html

     Firstly, let us learn from the past and *not* call this - or make
     it - a "64 bit" facility.


We don't know what the future will be...

(And, yes, I am also annoyed by 2^128 or any other value... the problem 
is that a limit is required in version 2 of NNTP, so better take the 
maximum we can have. 2^256 with 78 digits may be possible; but 2^512 
with 155 digits, definitively not, because a GROUP command with 3 
numbers and a newsgroup name may not fit with such extremely large numbers.)

-- 
Julien ÉLIE

« Le temps change toute chose ; il n'y a aucune raison pour que la
   langue échappe à cette loi universelle. » (Saussure)
Technical Details
Message-ID: <to2j2u$3av7c$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <tnqm14$35bas$1@news.trigofacile.com> <wwvwn6lggvf.fsf@LkoBDZeT.terraraq.uk> <tnvor4$38u1h$1@news.trigofacile.com> <wwvr0wr38b7.fsf@LkoBDZeT.terraraq.uk> <to28sj$3alfe$2@news.trigofacile.com> <wwvmt7fuons.fsf@LkoBDZeT.terraraq.uk>

Show Full Headers
Complete Article Headers
Message-ID: <to2j2u$3av7c$1@news.trigofacile.com>
Subject: Re: Proposal specifications for MAXARTNUM
Date: Thu, 22 Dec 2022 22:43:58 +0100
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <tnqm14$35bas$1@news.trigofacile.com> <wwvwn6lggvf.fsf@LkoBDZeT.terraraq.uk> <tnvor4$38u1h$1@news.trigofacile.com> <wwvr0wr38b7.fsf@LkoBDZeT.terraraq.uk> <to28sj$3alfe$2@news.trigofacile.com> <wwvmt7fuons.fsf@LkoBDZeT.terraraq.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: Groupes francophones par TrigoFACILE
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 22 Dec 2022 21:43:58 -0000 (UTC)
Injection-Info: news.trigofacile.com; posting-account="julien"; posting-host="san13-h02-176-143-2-105.dsl.sta.abo.bbox.fr:176.143.2.105"; logging-data="3505388"; mail-complaints-to="abuse@trigofacile.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1
Cancel-Lock: sha1:fEsDGh+3Ng7BtjvyhwJP3zDGxHg= sha256:joeYUDu55Ocxo3BivvlhpC073qMYTl80QkuoqXS8B7c= sha1:q9cs9+vXbRkl+YEVil+ANMX74ac= sha256:ZnLLo/aqA8hKuYI1DAop0CuBGJ1yowQmNQhlFMBceLQ=
In-Reply-To: <wwvmt7fuons.fsf@LkoBDZeT.terraraq.uk>