This ADR proposes a content-addressable URN format for the Decentraland ecosystem, adhering to RFC 8141 standards. By adopting this format, Decentraland ensures a uniform, extensible, and decentralized method for addressing content, paving the way for enhanced interoperability and integration with other systems.
Decentraland requires a standard way to address content hosted on distributed systems, such as the Catalyst network or IPFS. This ADR proposes the use of URNs (Uniform Resource Names) in the following format:
urn:decentraland:entity:<IPFS_CIDv1>?=&baseUrl=https://content.server/content
This format complies with RFC 8141 and allows the Decentraland ecosystem to reference content in a uniform, flexible, and extensible manner.
According to the proposed format, a content-addressable URN for Decentraland would have the following structure:
urn
: The URN scheme identifier, as defined by RFC 8141.decentraland
: The Namespace Identifier (NID) representing the Decentraland
ecosystem.
entity
: The Namespace Specific String (NSS) denoting the type of content being
addressed. In this case, it represents an entity within Decentraland.
<IPFS_CIDv1>
: The unique content identifier, using the CIDv1 format from
the InterPlanetary File System (IPFS).
?=
: q-component
of the RFC 8141, used to enable query parameters
in strict URN parsing mode. It MUST be present if any other query parameter is present. If
none are, it can be omitted.
&baseUrl=https://content.server/content
: An optional query component
specifying the base URL of the content server hosting the asset. If none is provided, the
implementation will fall-back to a content server of the Catalyst network.
The adoption of this URN format offers the following advantages:
baseUrl
part of the query parameters, the entity ID becomes
decoupled from the server. Enabling resolution or retries in multiple servers.
The dynamic part of the URN is the <IPFS_CIDv1>
, that is the CID of the
entity uploaded to the content server. The process is thoroughly described at
ADR-208
The scenesUrn
of the realm definition (ADR-110) use
this urn schema to instruct the explorers how to resolve the deployment.
This schema is also used by worlds, to describe the URN of the deployed scenes, and by the
sdk-commands export-static
command to create static realms like for
sdk7-goerli-plaza pull
requests.
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", " SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.