View Issue Details

IDProjectCategoryView StatusLast Update
0002483unrealircdpublic2013-05-20 09:51
Reporterw00t Assigned Tonenolod 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionduplicate 
Summary0002483: "Numerics" instead of nicknames over links
DescriptionNow, before you flame me, I understand this will be a *long* time happening, if at all.
I just wanted to enquire as to whether it will happen at ALL, ie the shortening of nicks to (say,) b64 numerics like in ircu, etc.
TagsNo tags attached.
3rd party modules

Relationships

duplicate of 0004196 resolvednenolod TS6-style SID/UIDs 

Activities

syzop

2005-04-15 08:21

administrator   ~0009756

it's on todo for 3.3* yes.

syzop

2007-05-07 12:29

administrator   ~0014016

ack'ed, because this has always been on todo for 3.3*.
reason was not because it could save bandwidth, but because it would get rid of some desynch issues that otherwise cannot be solved.

WolfSage

2007-05-07 19:35

reporter   ~0014024

How might this be implemented? What's the concept/theory behind it?

w00t

2007-05-08 03:36

reporter   ~0014038

Read up on the TS6, and P10 protocols

tabrisnet

2007-05-13 19:16

reporter   ~0014123

Last edited: 2007-05-13 19:16

This presumably would replace servicestamps, right? We'd have a real 'userid' to use to track users, or so I assume. hell, even better if this could be exported to client-protocol somehow.
Presumably there would be no way for a user to get the same user-id as another, or have it be the fusion of a 32bit userid and 32bit timestamp, and you should never get two users (at different times) who have the same timestamp + userid.

tabrisnet

2007-05-13 19:30

reporter   ~0014124

And to make the userid be able to be simply incremented instead of random, you could do this:

userid = serverID << 24 || ++baseID;

aquanight

2007-05-13 19:47

reporter   ~0014125

Last edited: 2007-05-13 19:49

Actually. UserIDs are *EASY* to keep unique.

Two words: file descriptors.

Put server numeric in upper 8 bits, file descriptor in the remaining (24 | 56) bits. Guaranteed unique, because no two servers can have the same server numeric, and no two users on any given server can *EVER* have the same file descriptor (else they'd have the same socket connection).

Put simply: userid = (server->numeric << ((sizeof(int)*8)-8)) | cptr->fd;

Assuming MAXCONNECTIONS isn't something insanely big.

(edit: This might not work precisely on windows, because IIRC file descriptors aren't flat integers 0 ~ MAXCONNECTIONS, but rather full-blown pointers (32/64-bit address and everything). However, it is my recollection that there's an static global (preallocated) array with all the local clients, so we could use the index for that.)

tabrisnet

2007-05-13 19:52

reporter   ~0014126

a) I assume we have to choose either uint32 or uint64
b) I want/need a number that is unique over a reasonable timeframe (hours?) w/o worrying about how an ircd leaf restarted multiple times might cause a collision.

This is why I want and expect to need a userid _and_ timestamp.

tabrisnet

2007-05-13 19:55

reporter   ~0014127

and yes, hours is about the limit. maybe even 15 minutes. if a user connects 15 minutes after another user disconnects, i need it to still be unique.

at present I get to [ab]use the servicestamp. if the servicestamp is zero, then I assume I have never seen this user before. If the servicestamp is non-zero, and I can find it in my usertable, I assume it's the old user. If I cannot find the servicestamp, I assume I don't know the user and give them a new userid/servicestamp.

tabrisnet

2007-05-13 20:00

reporter   ~0014128

as a sidenote, we currently expire old user entries after 5-10 minutes, so yeah, 15 minutes is the most _I_ need.

aquanight

2007-05-13 20:40

reporter   ~0014129

Even if a timestamp is involved, collisions cannot be avoided (clocks, for example).

If you want securely unique identification, even userid alone won't cut it. You'd need a combination of userid, services stamp, maybe something else like SWHOIS or like ircu has ACCOUNT or something. Or note that the user's being introduced with usermode +r. What you are doing now with the services stamp is exactly what the services stamp is there for (so no you aren't abusing it). It is not what the user numeric is for.

User IDs are for basically identification only for as long as the user is visible. It's like a second nick the user has no control over. Once the user's off the userid should generally be regarded as invalid, regardless of why the user is gone (netsplit, whatever). IIRC this is how user numerics work on every ircd that has them (ircu, ratbox I think, also IRCnet IRCD, possibly others). IIRC They don't gauruntee a new user won't have the same ID as the user who quit less than 15 minutes ago.

This is, as syzop has said, meant for getting rid of desynchs that otherwise can't be solved. Server numeric and user file descriptor should be good enough for this purpose.

As w00t said, read up on those protocols, I recall at least P10 does not say anywhere that user numerics won't be reused within 15 minutes. I don't know about TS6. Depending on such a thing would be depending on nonstandard behavior.

(On a slightly related note, this feature could lead to a better way to resolve nick collisions. IRCnet's IRCD just renames the user to 0<numeric> which is impossible to be already used since no one can manually request such a nick except by doing /nick 0 which just makes them 0<their own numeric>. Granted that breaks RFC which says nicks have to start with nondigit, but I doubt IRCnet would've done it if clients broke.)

tabrisnet

2007-05-13 21:56

reporter   ~0014131

so servicestamp won't go away, and i'll need a separate lookup table for userid->nick lookups. joy.

Issue History

Date Modified Username Field Change
2005-04-15 02:06 w00t New Issue
2005-04-15 08:21 syzop Note Added: 0009756
2007-04-27 06:06 stskeeps Status new => feedback
2007-05-07 12:29 syzop Note Added: 0014016
2007-05-07 12:29 syzop Status feedback => acknowledged
2007-05-07 19:35 WolfSage Note Added: 0014024
2007-05-08 03:36 w00t Note Added: 0014038
2007-05-13 19:16 tabrisnet Note Added: 0014123
2007-05-13 19:16 tabrisnet Note Edited: 0014123
2007-05-13 19:30 tabrisnet Note Added: 0014124
2007-05-13 19:47 aquanight Note Added: 0014125
2007-05-13 19:49 aquanight Note Edited: 0014125
2007-05-13 19:52 tabrisnet Note Added: 0014126
2007-05-13 19:55 tabrisnet Note Added: 0014127
2007-05-13 20:00 tabrisnet Note Added: 0014128
2007-05-13 20:40 aquanight Note Added: 0014129
2007-05-13 21:56 tabrisnet Note Added: 0014131
2013-05-20 09:51 nenolod Relationship added duplicate of 0004196
2013-05-20 09:51 nenolod Status acknowledged => resolved
2013-05-20 09:51 nenolod Resolution open => duplicate
2013-05-20 09:51 nenolod Assigned To => nenolod