ADR-186: Place Identifiers

More details about this document
Latest published version:
https://adr.decentraland.org/adr/ADR-186
Authors:
2fd
Feedback:
GitHub decentraland/adr (pull requests, new issue, open issues)
Edit this documentation:
GitHub View commits View commits on githistory.xyz

Abstract

This document describes how the ID (which is an UUID) of a Place is defined and the semantics to keep or replace it if the deployments of its parcels change. In many conditions deployments of new parcels won't modify the ID of the Place, other conditions are enumerated.

Context

As the platform and the protocol are growing, a few initiatives like the possibility to save, rank and recommend scenes are becoming essential tools to strengthen the social interaction and discoverability in Decentraland. But, each new scene deployed has a new entity id in the Catalyst Network, which would reset every time that the scene could collect on each deployment.

The next approach was to track only x,y positions, but since a scene can grow, shrink, and change shape, this could result in misleading behavior for our users when, suddenly, a position they were already keeping track is not the scene they were following.

Instead of the previously mentioned approach, we will assign a virtual UUID to each new deployment and use a set of rules detailed in the following section to determine if this new deployment corresponds to the same place or to a new one, in which case a new virtual ID will be assigned.

Specification

A Place is defined as a scene occupying a set of positions, each new deploy on an empty set of lands will receive a new virtual UUID.

When a new deployment replaced an already existing scene it will keep the same virtual UUID if the scene metadata meets one of the following criteria:

Case 1: new scene occupying the exact same number parcels

deploy ✅ The new scene gets the same UUID if it occupies the same parcel
deploy+base ✅ The new scene gets the same UUID if occupy the same parcel, even if it has a different base parcel
move ❌ The new scene gets a new UUID if it doesn't occupy the same parcels and same base parcel
move+same-base ✅ The new scene gets the same UUID if it doesn't occupy the same parcel but preserves the same base parcel
re-shape ✅ The new scene gets the same UUID if it doesn't occupy the same parcel but preserves the same base parcel
re-shape+base ❌ The new scene gets a new UUID if it doesn't occupy the same parcels and same base parcel

Case 2: Scene growing on the number of parcels

grow ✅ The new scene gets the same UUID if it occupies all previous parcels + any additional one
grow+base ✅ The new scene gets the same UUID if it occupies all previous parcels + any additional one, even if it has a different base parcel
grow+move+base ✅ The new scene gets the same UUID if it has same base parcel
grow+move ❌ The new scene gets a new UUID if it doesn't occupy all previous parcels and has different base parcel

Case 3: Scene shrinking on the number of parcels

shrink ✅ The new scene gets the same UUID if it has the same base parcel
shrink+base ❌ The new scene gets a new UUID if it has a different base parcel
shrink+move ❌ The new scene gets a new UUID if it has a different base parcel
shrink+move+base ✅ The new scene gets the same UUID if it has the same base parcel

RFC 2119 and RFC 8174

The key words "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.

License

Copyright and related rights waived via CC0-1.0. DRAFT Final