decentraland / catalyst

🐧 Content server for Decentraland
http://decentraland.github.io/catalyst-monitor
Apache License 2.0
52 stars 54 forks source link

Are decentraland data streams and map data also decentralized? #539

Closed laurencefass closed 3 years ago

laurencefass commented 3 years ago

I am trying to learn more about Decentraland and to understand where its data streams, content and maps originate. i.e. everything that is delivered to the client. Is this data coming from a blockchain or corporate cloud? I guess the simplest expression of this question is: can decentraland be switched off by a central entity? Or is it perpetual and "always on" backed by blockchain?

Are any parts of decentraland currently centralized? Are there plans to decentralize all aspects of decentraland in the future or is it already implemented?

Thanks

nchamo commented 3 years ago

Hey @laurencefass !

These are great questions and I'll do my best to answer them. Please let me know if I missed some aspect or if you have any follow up questions. Also, I'm not sure how much you know about decentraland, so I might explain some things you already know.

Decentraland is a virtual world divided by parcels. Each parcel is 16mx16m, and each parcel has an owner. Each parcel is an NFT in itself, and therefore ownership is determined by the Ethereum blockchain.

Each owner can determine what is displayed on their parcel by using the SDK. The SDK will allow owners to display 3d models and determine how users can interact with them. The SDK code is then transformed into a javascript file, and it is uploaded (together with 3d models, textures, music, etc) to what we call "catalysts servers". So why are we using these servers instead of the blockchain? Mainly because it would be prohibitively expensive to store files as big as some 3d models in the blockchain. The networks fees that users would have to pay to upload content to their parcels would be so high that nobody would do it.

So we came up with a different solution. Catalyst servers are servers that are developed on this same repository, and group a few different services together. But I'll focus on the one you are asking about, the content server. The content server is mainly a server where parcel owners can upload their scene (we call all the 3d models and interactions that are displayed on a specific parcel a "scene"). Each server will verify against the blockchain that the user making the upload is the current owner of the parcel, and it will fail it they aren't.

And the most important aspect, is that all content servers will then sync with each other. So if you update your scene in one server, the update itself will be broadcasted to the other ones. So if a content server goes down for some reason, your content will still be present in the other ones. Here is a list of 11 catalyst servers. The first 5 are maintained by the Decentraland Foundation, but the next 6 are community owned. So there is no "kill switch". Even if the foundation happened to turn off their servers, no data would be lost.

When you enter the world, the client will select one of these servers and download all content from it. So if one server is down, the client will simply choose another one to connect to. Now, another aspect to take into account is how these servers are chosen.

You can easily set up your own catalyst server (instructions here) and it will automatically start downloading all content from the others. But, in order for the client to consider your server as a possible source of content, it will need to be approved by the DAO (if you don't know what a DAO is, please let me know and I'll try to explain it).

So in general terms, this is where the content comes from, and there is no kill switch. Now, onto your other question, yes, there are some aspects of decentraland that are still centralized. One example would be the Builder app. But if the Builder is shut down for some reason, you will still be able to access the world and deploy new content, so it is't such a big deal. I believe there are some intentions to slowly make everything more decentralized, but I personally (emphasis on personally haha) don't think that it should be an urgent priority to decentralize apps that don't have a direct impact on the world itself.

I guess that's it!

I hope it helps 😄

laurencefass commented 3 years ago

Thanks! Does Decentraland offer a financial incentives to run a Catalyst server? i.e. Why would I run one besides wanting to support the network? Will Decentraland tokenomics reward me for running one? Is there a consensus mechanism on content delivery i.e. some form of "proof of content/proof of LAND" or similar, to verify the integrity of the LAND specific content between servers? Is there any way to currently stop a malicious server stepping in to spoof content or (worse) alter internal data and token addresses embedded in the content? Thanks

nchamo commented 3 years ago

Again great questions! Please keep them coming and this will became a great thread to share with people with similar doubts.

About the financial incentives, if you run a personal catalysts you currently won't be rewarded. But if your server ends up being approved by the DAO, there is a small incentive to cover operational costs. For the time being, the foundation has been awarding this incentive on a monthly basis, but the plan is to transfer this responsibility to the DAO in the near future.

On the security side, I'll try to explain how it works without getting too technical. When a user sends an update to their parcel, they hash all the files that they upload, and then sign those hashes with their wallet. That means that the server can verify that each file was meant to be uploaded by the user, and it can also verify that the user is actually the owner of the parcel.

Then, when catalysts sync with each other, they perform this validations again. So even if there is a malicious server, the others won't be affected. They will just ignore the update because they found it to be invalid.

nchamo commented 3 years ago

I'm closing this issue but feel free to re-open it if you have some other questions 😄