uuid6 / uuid6-ietf-draft

Next Generation UUID Formats
https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/
187 stars 11 forks source link

UUIDv7: Is "the node MUST NOT be set to all 0s" necessary? #45

Closed oittaa closed 2 years ago

oittaa commented 2 years ago

https://datatracker.ietf.org/doc/html/draft-peabody-dispatch-new-uuid-format-02#section-4.4.3

The UUIDv7 Node MAY contain any set of data an implementation desires however the node MUST NOT be set to all 0s which does not ensure global uniqueness. In most scenarios the node SHOULD be filled with pseudo-random data.

Is that necessary? It creates a special case in pretty much every programming language.

For example in Python you have to create a node with something like the following.

node = 0
while node == 0:
    node = secrets.randbits(56)

Instead of just writing.

node = secrets.randbits(56)
fabiolimace commented 2 years ago

I agree. I think removing that phrase improves the text.

kyzer-davis commented 2 years ago

Yeah, that makes sense. I can add it to the list of items to change in my Draft 03 pass of UUIDv7.