Joystream

Joystream is an innovative open-source project designed to run a comprehensive blockchain network using the substrate framework. The repository includes the full suite of software necessary for operating the Joystream network, including the full node, runtime, and various reusable substrate runtime modules. Additionally, it comprises all the front-end applications and infrastructure servers required for a fully functional network.

Overview

The Joystream network enhances the substrate blockchain framework by adding functionalities to support various roles available on the platform. This enhancement enables a versatile and efficient blockchain ecosystem that can cater to different user needs and roles within the network.

Software Components

Substrate Blockchain

  • joystream-node: The core node software necessary for running a Joystream blockchain node.
  • Runtime: Contains the logic that defines how the blockchain operates.
  • Runtime Modules: Various reusable modules that constitute the Joystream runtime.

Server Applications - Infrastructure

  • Storage Node: Manages the media storage infrastructure for the network.
  • Query Node: Handles data querying functionalities.
  • Distributor Node: Manages the distribution of media and data within the network.

Front-end Applications

  • Pioneer v2: The main UI for accessing Joystream community and governance features. It provides an interface for users to engage with the network's activities.
  • Atlas: A media player designed to facilitate the consumption of media content stored within the Joystream network.

Tools and CLI

  • joystream-cli: A command-line interface for performing community and governance activities on the Joystream network.

Testing Infrastructure

  • Network Integration: A comprehensive framework for testing the integration of various components within the Joystream network.

Development Environment

For an optimal development experience, it is recommended to use a GNU/Linux system with a minimum glibc version of 2.28 to ensure compatibility with Node.js v18. Essential tools for development include the Rust toolchain, Node.js (v14.18.x or higher), Yarn Classic (v1.22.x), Docker with Docker Compose (v2.20.x or higher), and optionally Ansible.

Initial Setup

After cloning the repository, use the following script to set up the development environment:

./setup.sh

For those who prefer their own Node.js version manager, the setup script can be run without Volta:

./setup.sh --no-volta

For older operating systems that do not support Node.js v18, modify the package.json file to use Node.js v16.20.1.

Running a Local Development Network

Build the necessary npm packages and Docker images, then start a local development network with:

yarn build
RUNTIME_PROFILE=TESTING yarn build:node:docker
yarn start

Running a Full Node

To run a full Joystream node locally, check out the master branch, build the node with the specified toolchain, and start the node:

git checkout master
WASM_BUILD_TOOLCHAIN=nightly-2022-11-15 cargo build --release
./target/release/joystream-node -- --pruning archive --chain joy-mainnet.json

Pre-built binaries and the mainnet chainspec file can be found in the releases section of the repository.

Integration Tests

To perform integration tests, ensure that the Yarn packages are built, build the test node Docker image, and run the tests:

yarn build
RUNTIME_PROFILE=TESTING yarn build:node:docker
yarn test

Joystream offers numerous opportunities for contributing, whether through code contributions, testing, or providing feedback. The repository follows strict code quality and formatting standards, enforced through tools like eslint, prettier, rustfmt, and clippy. Git hooks managed by Husky ensure that these standards are maintained.

Explore more about Joystream and how to contribute on their GitHub page.

Similar Projects