I am learning about P2P in general (mainly blockchain). I know many P2P protocols uses a distributed hash table for node lookup (kademlia) that maps UUIDs of nodes to their addresses.
I am curious about the most common way of UUID assignment.
Do nodes generate their own UUIDs? This would be dangerous since a naive or malicious node could generate an already existing uuid, right?
Or do some kind of boot nodes generate UUIDs for the joining nodes by wrapping a UUID in a certificate that normal nodes later can verify (since they all trust the boot nodes). The boot nodes would act as certificate authorities. It feels like using centralized CAs goes against the purpose of a P2P network though...
Or are some kind of Web of Trust used, where nodes vouch for each others UUID?
How are UUIDs commonly assigned in a P2P protocol?