Mechanism to make NEM's namespace unique [SOLVED]


#1

I want to know the mechanism that namespaces are unique.

For example, you are about to make a new namespace by nanowallet.
At that time, if you try to make a namespace that already exists, you can’t issue it.

So then, did you device how nanowallet is the namespace that it is already exists?

Do nanowallets obtain a list of acquired(within the validity period) namespaces?
I don’t know the API to realize it.

If so, where is that information?

thx


#2

When nanowallet creates namespace it sending request to node and transaction is validated by network (if namespace already exists it’s rejected).
You can see list of root namespaces in nanowallet or in explorer (explorer.nemchina.com) or using api:
https://nemproject.github.io/#retrieving-root-namespaces

http://hugealice.nem.ninja:7890/namespace/root/page (it’s limited to 25, if you want see next 25 it’s needed to pass id param)


#3

Is there only you here?
Thank you for always answering.

Does the list of used namespaces exist as a list somewhere?
I think that it is extremely inefficient to generate a list from the transaction at issue (judging whether it is already used).


#4

Yeap. Created namespaces are stored in blockchain database (on each node).

Ok. Maybe @BloodyRookie could you answer from more technical point of view?


#5

Thank you pawelm.

Created namespaces are stored in blockchain database (on each node).

That is not include in the block, it is recorded in the DB of each node is it?

Is there data that is not include in the block as well?
I know the balance of the account.


#6

There are explorers that list all root namespaces, e.g.

http://explorer.nemchina.com/#/namespacelist

As explained by pawelm, when creating a new namespace (via nano wallet or any other client), the network validates the creation. From the namespace name and the parent namespace id, each node can calculate the namespace id for the new namespace and check in the namespace cache whether or not the id is already known (and reject the transaction if the id is known).


#7

@BloodyRookie Thank you.


#8