The 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.
A step by step guide to setup a full node and validator on the Joystream testnet, can be found here.
The latest pre-built binaries can be downloaded from the releases page.
Generally these will be built from master branch and will pertain to the currently active testnet.
Clone the repository and install build tools:
git clone https://github.com/Joystream/joystream.git
cd joystream/
./setup.shCompile the node and runtime:
cargo build --releaseThis produces the binary in ./target/release/joystream-node
cargo run --release -- --devIf 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.shUse the --chain argument, and specify the path to the genesis chain.json file for that public network. The JSON "chain spec" files for Joystream public networks can be found in ../testnets/.
cargo run --release -- --chain testnets/rome.jsonRunning unit tests:
cargo test --allRunning full suite of checks, tests, formatting and linting:
yarn cargo-checksAlways format your rust code with cargo fmt before committing:
cargo fmt --all./scripts/run-test-chain.sh
yarn workspace joystream-testing testTo run the integration tests with a different chain, you can omit the step of running the local development chain and simply set the node URL using NODE_URL environment variable.
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 testnets/rome.json