• Stars
    star
    104
  • Rank 330,516 (Top 7 %)
  • Language
    JavaScript
  • License
    Other
  • Created almost 8 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

DEPRECATED: This codebase will not be mantained anymore, and formats are going to change when we move to the Decentraland Iron Age

DEPRECATED: This code is unmantained and the new version of Decentraland will be built using a different architecture.

About

Decentraland is an open-source initiative to build a shared virtual reality world. In Decentraland, the content of each piece of land is determined by its owner. You can become a land owner either by having someone transfer you some of their tiles, or by mining new land. A new tile of land is mined every 10 minutes.

Explore Decentraland

Components

  • Node: An open and trustless land ownership record and scene content distribution network.
  • Editor: An easy to use 3D scene editor, that lets you publish scenes directly to any of your tiles.
  • Browser: A browser for navigating the virtual world of Decentraland.

Node

A Bitcoin-like blockchain is used to maintain a universal record of land ownership, and a consensus of the virtual world description.

In the Decentraland blockchain, transactions can transfer the ownership of a given tile, as well as announce the hash of the scene content of the tile. At any given time, the UTXO set has the description of the entire virtual world. The actual content of tile is distributed in a P2P manner, via the torrent network.

New blocks are mined with the same proof of work as Bitcoin, but instead of having a coinbase transaction creating fungible coins, there's a landbase transaction creating a single non-fungible asset: a tile at a unique, non-modifiable position.

To run your own node and mine new land see these instructions.

Design

The Decentraland node is a fork of bcoin, a Bitcoin full-node implementation in JavaScript. In what follows we describe all the places where we depart from Bitcoin.

Consensus rules

Instead of having the coin value, Decentraland transaction outputs have the tile's x and y coordinates, and the info hash of the torrent with the 3D scene content for the tile.

All transactions (except for landbase transactions) have exactly one output for each input. Each output MUST have the same x and y coordinates as the spent output of its corresponding input. Outputs MAY change the info hash field.

The single output of a landbase transaction MUST claim a non-allocated tile, adjacent (with 4-connectivity) to a previously mined tile.

RPC API

There are some new JSON RPC endpoints that facilitate creation and querying of land content. We also list some useful RPC endpoints, inherited from Bitcoin.

  • gettile(x, y): fetches the torrent info hash of a tile's content.

  • settile(x, y, base64-content): publishes the content to the torrent network using WebTorrent and creates a transaction updating the torrent info hash of one of your tiles.

  • dumpblockchain(onlyControlled=false): lists all tiles in the blockchain and returns information about them. Be careful! It may take a long time to process.

  • transfertile(x, y, dest): Transfers tile at (x,y) to address dest. You must of course own the tile to be able to transfer it. Returns the raw hex of the transfer transaction. Note that the transaction will be automatically broadcasted to the network, no need to send it manually. Example:

./bin/cli --apikey=$RPC_API_KEY rpc transfertile 0 -1 TeaZxyQATonFFFLCXZMydUfGGUWwBsg9Je
  • getaccountaddress(account): Gets address for account. To get your main decentraland address:
$ ./bin/cli --apikey=$RPC_API_KEY rpc getaccountaddress 0
TeaZxyQATonFFFLCXZMydUfGGUWwBsg9Je

For more info on how to use the command line interface, check this bcoin wiki page (decentraland-node is a fork of bcoin, so most functionality is the same).

Listing and drawing a map of your controlled tiles:

Use the following command in bash to list all your tiles.

./bin/cli --apikey=$RPC_API_KEY rpc dumpblockchain true | node scripts/list.js

Use this to render a HTML visualization of all tiles in Decentraland:

./bin/cli --apikey=$RPC_API_KEY rpc dumpblockchain | node scripts/plot.js

Land content server

After each valid new block in the main chain, the node downloads from the torrent network the updated land content for each transaction in the block, effectively maintaining a tile to scene index.

By default, the node serves a static web server at port 9301 with the latest scene content files for each mined tile of land. The land content file for the tile at (x, y) is served at GET /tile/x.y.lnd

Run a node

There's two options for installing running a node: with docker and without docker.

Run a node using Docker

Make sure you have Docker installed, and run (note: you might need to prepend sudo to these commands on Linux systems):

pip install docker-compose
docker-compose up

Run a node manually

  1. Clone the repo:
git clone https://github.com/decentraland/bronzeage-node.git && cd bronzeage-node
  1. Download and install NodeJS v7.4.0. See nvm for version management.
  2. Install dependencies (Linux only):
apt-get update && apt-get install -y --no-install-recommends build-essential python xvfb libgtk2.0-0 libxtst-dev libxss-dev libgconf2-dev libnss3 libasound2-dev
  1. Install npm modules: npm install
  2. Change $RPC_API_KEY to a custom key via export or by changing it in bin/start. You can generate a random key like this:
head -c 32 /dev/random | base64
  1. Run the node!
    • Windows: bin\start.bat
    • Linux & Mac: ./bin/start

You may use the CLI by running it with node: node bin\cli [args]

Mining will start by default. To disable this, set $START_MINER to 'false' or to 0 or edit the file bin/start and remove the --startminer argument. 7. Head over to http://localhost:5000 (you can change the port using $SERVER_PORT) to see the web dashboard.

How can I edit the land I own?

Once you mine some land, you can use Unity to edit its content. Check out the editor for more information.

Community

Join us on Slack!

We're on Twitter too.

More Repositories

1

marketplace

🏛️ Decentraland's NFT Marketplace
TypeScript
1,025
star
2

dappeteer

🏌🏼‍E2E testing for dApps using Puppeteer + MetaMask
CSS
240
star
3

ui

🦄 Decentraland UI
TypeScript
204
star
4

marketplace-contracts

🔖 Decentraland Marketplace Contracts
JavaScript
158
star
5

mana

⏣ Solidity Contracts for the Decentraland MANA Token
Solidity
148
star
6

builder

🍉 Build scenes for Decentraland
TypeScript
144
star
7

unity-renderer

Unity implementation of Decentraland Client
C#
137
star
8

marketplace-legacy

🏛️ Decentraland's LAND Marketplace
JavaScript
126
star
9

land

⛰ Contract for LAND
Solidity
117
star
10

districts

Proposals for Community Districts for the Terraform event
115
star
11

decentraland-dapps

🛠 Common modules for dApps
TypeScript
108
star
12

erc721

📜 Distinguishable Assets Registry (ERC 721)
JavaScript
94
star
13

avatar-assets

👔 Collection of 3D models for Decentraland avatars
TypeScript
85
star
14

explorer

🌎 Explore Decentraland from a web browser
TypeScript
79
star
15

cli

💻 Decentraland command-line interface
TypeScript
67
star
16

wearables-contracts

📜 🎭 Set of Wearables NFT contracts
JavaScript
62
star
17

ethalarm

⏰ Get notifications whenever an Ethereum smart contract triggers an event.
JavaScript
57
star
18

bronzeage-editor

DEPRECATED: Unity editor and browser for Decentraland Bronze Age
C#
57
star
19

editor-legacy

📝 Collaborative real-time edition of parcel scenes, with IPFS uploading. Based on aframe-inspector
JavaScript
54
star
20

catalyst

🐧 Content server for Decentraland
TypeScript
52
star
21

governance

🏢 Governance platform of the Decentraland DAO
TypeScript
45
star
22

proposals

Review of community proposals for Decentraland's art and applications
45
star
23

eth-connect

🔌 Ethereum connector for Decentraland scenes and applications
TypeScript
43
star
24

old-documentation

📖 What is Decentraland?
HTML
41
star
25

js-sdk-toolchain

Toolchain to build JS & TS scenes for Decentraland
TypeScript
37
star
26

explorer-desktop

Desktop client for Decentraland, coming soon
C#
35
star
27

sample-scenes

🏗 Examples of different experiences built for Decentraland
32
star
28

decentraland-ecs-utils

TypeScript
32
star
29

stoneage-browser

🥉 Browser for Decentraland Stone Age
JavaScript
32
star
30

auction

🌅 Source code for Decentraland's Terraform Auction
JavaScript
31
star
31

webrtc-broker

🔌WebRTC message broker
Go
25
star
32

ipfs-node

💽 A proxy to connect to the IPFS network
JavaScript
24
star
33

contracts

📝 Decentraland contract addresses
HTML
24
star
34

architecture

This repository aims to have the main Decentraland Architecture
Makefile
22
star
35

stoneage-node

Node for Decentraland Stone Age
JavaScript
22
star
36

builder-server

Builder app backend
TypeScript
21
star
37

adr

Architecture Decisions Records
SCSS
21
star
38

kernel-legacy

🌎 Explore Decentraland from a web browser
TypeScript
20
star
39

smart-items

💡Smart item examples
TypeScript
19
star
40

atlas-server

🗺 A server for the atlas map
TypeScript
19
star
41

kernel

Kernel is the glue code between the OS, comms and the Renderer of Decentraland
TypeScript
19
star
42

builder-assets

🎲 Builder asset packs
TypeScript
18
star
43

nft-server

NFT Server
TypeScript
18
star
44

issues

Main entry point for user's feedback
17
star
45

decentraland-commons

🛠 Set of common functionality across Decentraland projects.
TypeScript
17
star
46

dapp-boilerplate

Decentraland's ÐApps Boilerplate
JavaScript
17
star
47

decentraland-l2-utils

TypeScript
17
star
48

decentraland-npc-utils

NPC tools for conversational NPCs
TypeScript
16
star
49

agora

📝Agora is an off-chain governance tool for decentralized communities.
TypeScript
16
star
50

decentraland-ui-utils

TypeScript
16
star
51

decentraland-eth

DEPRECATED - Ethereum common helpers for Decentraland
TypeScript
15
star
52

ecs-reference

ECS API Reference
JavaScript
15
star
53

nft-schema

Open API Specification for the NFT APIs
TypeScript
13
star
54

explorer-desktop-launcher

TypeScript
13
star
55

decentraland-gatsby

Opinionated All-in-one Web Framework
TypeScript
11
star
56

decentraland-crypto-utils

TypeScript
11
star
57

MANA-community-fund-learning-content

Offer bounties in MANA to developers that create educational content: tutorials & scene samples
TypeScript
11
star
58

catalyst-owner

Everything necessary for catalyst owners to deploy their own node
Shell
11
star
59

avatars-contract

Avatars smart contract
Solidity
11
star
60

l2-airdrop

Collection of command line tools to do massive Airdrops of Decentraland Wearables on Matic
TypeScript
10
star
61

documentation

Mathematica
9
star
62

gate

🚪 Manage invitations to access the client
JavaScript
9
star
63

sdk7-goerli-plaza

TypeScript
9
star
64

sdk7-scene-template

ECS 7 Template
TypeScript
9
star
65

godot-explorer

Rust
9
star
66

bid-contract

JavaScript
8
star
67

unity-explorer

JavaScript
8
star
68

rentals-contract

TypeScript
8
star
69

tile-map

🗺 Tile Map
TypeScript
8
star
70

land-auction

Contracts for the LAND auction
Solidity
8
star
71

catalyst-client

A client to query and perform changes on Decentraland's catalyst servers
TypeScript
7
star
72

matrix-client

📡 Interact with Decentraland's users, send private messages and add friends.
TypeScript
7
star
73

explorer-website

This is the repository for the website served in play.decentraland.org
TypeScript
7
star
74

rendezvous

📞 WebRTC Signalling Server that uses Server-Sent Events
JavaScript
7
star
75

decentraland-connect

Connect your Ethereum wallet from different providers
TypeScript
7
star
76

collections-graph

🎽 Decentraland Collections Graph
TypeScript
7
star
77

decentraland-server

Set of common functionality accross Decentraland projects servers
TypeScript
6
star
78

canilla

🚰 Faucet for all things related to Decentraland
JavaScript
6
star
79

catalyst-api-specs

API definition for the Catalyst Server implementation
TypeScript
6
star
80

web

Decentraland websites
CSS
6
star
81

transactions-server

Proxy server that relays transactions to Biconomy, using some restrictions
TypeScript
6
star
82

wearable-preview

Render an interactive preview of a wearable
TypeScript
6
star
83

protocol

Shell
6
star
84

rpc-rust

Decentraland RPC - Rust implementation
Rust
6
star
85

events

This website hosts a dApp used to upload and see what others are organizing inside the Decentraland virtual world.
TypeScript
6
star
86

decentraland-rpc

📡 Sandboxed code execution + Plugins + JSON-RPC engine
TypeScript
6
star
87

standards

📜 At Decentraland, we put a lot of effort into improving both the Software itself and the Software Process. The pillars of the Software Process are the standards we define to organize our work.
6
star
88

bevy-explorer

Rust
5
star
89

hammurabi

Repository to host the reference implementation made in Babylon.js by the Protocol Squad
TypeScript
5
star
90

schemas

Common schemas for Decentraland
TypeScript
5
star
91

decentraland-crypto-fetch

TypeScript
5
star
92

smart-contract-audits

Smart Contract Audit Reports
5
star
93

avatar-asset-test-tool

👚 Tools to help testing wearables for Decentraland
TypeScript
5
star
94

dcl-sprites

Helper functions to create sprites using Decentraland's SDK
TypeScript
5
star
95

decentraland-crypto-middleware

A multi framework middleware to authenticate request signed with @decentraland/SignedFetch
TypeScript
5
star
96

decentraland-transactions

Create transactions to be relayed
TypeScript
5
star
97

vr-client

5
star
98

tap-decentraland-thegraph

Exports data from Decentraland's subgraphs at https://thegraph.com/
Python
5
star
99

whitelist-sale

Contract for the Whitelist sale for Decentraland
JavaScript
4
star
100

voting

🗳ERC-20 Based Off-chain Voting
JavaScript
4
star