README.md 2.7 KB

Joystream-Node - full node/validator

 Nodes for Joystream

joystream-node is the main server application that connects to the network, synchronizes the blockchain with other nodes and produces blocks if configured as a validator node.

To setup a full node and validator review the advanced guide from the helpdesk.

Pre-built Binaries

The latest pre-built binaries can be downloaded from the releases page. Generally these will be built from master branch and relevant to the current active testnet.

Building from source

Clone the repository and install build tools:

git clone https://github.com/Joystream/joystream.git

cd joystream/

./setup.sh

compile the node and runtime

cargo build --release

This produces the binary in ./target/release/joystream-node

Running Local development chain

cargo run --release -- --dev

If you repeatedly need to restart a new chain, This script will build and run a fresh new local development chain purging existing chain data:

./scripts/run-dev-chain.sh

Joystream public testnet

Use the --chain argument, and specify the path to the genesis chain.json file for that public network. The joystream public networks are found in ../testnets/

cargo run --release -- --chain testnets/rome.json

Tests and code quality

Running unit tests

cargo test --all

Running full suite of checks.. tests, formatting and linting:

yarn cargo-checks

Always format your rust code with cargo fmt before commiting:

cargo fmt --all

Integration tests

./scripts/run-test-chain.sh
yarn workspace joystream-testing test

To run the integration tests with a different chain, you can omit step running the local development chain and set the node URL using NODE_URL environment variable. Proposal grace periods should be set to 0, otherwise proposal network tests will fail.

Rome-Constantinople migration network test

Ensure Rome node is up and running, and node URL is set using NODE_URL environment variable (default value is localhost:9944).

yarn test-migration

Installing a release build

If you are building a tagged release from master branch and want to install the executable to your path follow the step below.

This will install the executable joystream-node to your ~/.cargo/bin folder, which you would normally have in your $PATH environment.

cargo install joystream-node --path node/

Now you can run and connect to the rome testnet:

joystream-node --chain rome.json