The name registry is essential in allowing protected public access to unforgeable names. For testnet, we are planning on supporting UUID registration and pubkey registration.
For UUID registration, an example registration might look like the following:
A user would be able to predict the contents of the print name, and would therefore know what UUID was registered by monitoring that name for events. It will be sent a uri that looks like
To use pubkey based registration, the code would look like the following:
, However, we still return it for 2 reasons: 1. The user might want to rely on it being registered. 2. For api consistency.
UUID based lookup example
Pubkey based lookup example
I expect that registry lookups will be very common, and so it would be great for block commutativity if we special cased writes to the registry lookup, as two lookups commute with each other as long as the registry hasn't been modified.
It should be clear that we can't store the registry as a single giant rholang map. Instead we will store it as a trie using tagged maps as fanout nodes, With UUID's and pubkey hashes, we should get rather speedy divergence. I think map entries per byte is a good initial guess.
We could implement the registry in either scala or rholang. As long as the data is in the tuplespace, it should be fine either way.