Browse Source

update README

Mokhtar Naamani 5 years ago
parent
commit
2a532261d6

+ 141 - 0
README.md

@@ -0,0 +1,141 @@
+# Joystream
+
+This is the main code reposity for all joystream software. It will  house the substrate chain project, the full node and runtime and all reusable substrate runtime modules that make up the joystream runtime. In addition to all front-end apps and infrastructure servers necessary for operating the network.
+
+The repository is currently just a cargo workspace, but eventually will also contain yarn workspaces, and possibly other project type workspaces.
+
+## Overview
+
+The joystream network builds on a pre-release version of [substrate v2.0](https://substrate.dev/) and adds additional
+functionality to support the [various roles](https://www.joystream.org/roles) that can be entered into on the platform.
+
+
+## Validator
+![ Nodes for Joystream](./node/validator-node-banner.svg)
+
+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](https://github.com/Joystream/helpdesk/tree/master/roles/validators).
+
+
+###  Pre-built Binaries
+
+The latest pre-built binaries can be downloads from the [releases](https://github.com/Joystream/substrate-runtime-joystream/releases) page.
+
+
+### Building from source
+
+Clone the repository and install build tools:
+
+```bash
+git clone https://github.com/Joystream/substrate-runtime-joystream.git
+
+cd substrate-runtime-joystream/
+
+./setup.sh
+```
+
+### Building
+
+```bash
+cargo build --release
+```
+
+### Running a public node on the Rome testnet
+
+Run the node and connect to the public testnet.
+
+```bash
+cargo run --release -- --chain ./rome-tesnet.json
+```
+
+The `rome-testnet.json` chain file can be ontained from the [release page](https://github.com/Joystream/substrate-runtime-joystream/releases/tag/v6.8.0)
+
+
+### Installing a release build
+This will install the executable `joystream-node` to your `~/.cargo/bin` folder, which you would normally have in your `$PATH` environment.
+
+```bash
+cargo install joystream-node --path node/
+```
+
+Now you can run
+
+```bash
+joystream-node --chain rome-testnet.json
+```
+
+### Local development
+
+This will build and run a fresh new local development chain purging existing one:
+
+```bash
+./scripts/run-dev-chain.sh
+```
+
+### Unit tests
+
+```bash
+cargo test
+```
+
+
+## Joystream Runtime
+
+![Joystream Runtime](./runtime/runtime-banner.svg)
+
+
+The runtime is the code that defines the consensus rules of the Joystream protocol.
+It is compiled to WASM and lives on chain.
+Joystream node execute the code's logic to validate transactions and blocks on the blockchain.
+
+When building joystream-node as described abot with `cargo build --release`, in addition to the joystream-node binary being built the WASM blob artifact is produced in:
+
+`target/release/wbuild/joystream-node-runtime/joystream_node_runtime.compact.wasm`
+
+
+### Deployment
+
+Deploying the compiled runtime on a live system can be done in one of two ways:
+
+1. Joystream runtime upgrade proposals which will be voted on by the council. When the Joystream platform is live, this will be the only way to upgrade the chain's runtime code.
+
+2. During development and testnet phases, we can send an extrinsic (transaction signed with the sudo key) invoking `system::setCode()`. This can be done either from the UI/extrinsics app, or directly with an admin script.
+
+### Versioning the runtime
+
+Versioning of the runtime is set in `runtime/src/lib.rs`
+For detailed information about how to set correct version numbers when developing a new runtime, [see this](https://github.com/Joystream/substrate-runtime-joystream/issues/1)
+
+
+## Coding style
+
+We use `cargo-fmt` to format the source code for consistency.
+
+It should be available on your machine if you ran the `setup.sh` script, otherwise install it with rustup:
+
+```bash
+rustup component add rustfmt
+```
+
+Applying code formatting on all source files recursing subfolders:
+
+```
+cargo-fmt
+```
+
+## Contributing
+
+Please see our [contributing guidlines](https://github.com/Joystream/joystream#contribute) for details on our code of conduct, and the process for submitting pull requests to us.
+
+## Authors
+
+See also the list of [CONTRIBUTORS](./CONTRIBUTORS) who participated in this project.
+
+## License
+
+This project is licensed under the GPLv3 License - see the [LICENSE](LICENSE) file for details
+
+## Acknowledgments
+
+Thanks to the whole [Parity Tech](https://www.parity.io/) team for making substrate and helping on riot chat with tips, suggestions, tutorials and answering all our questions during development.

+ 40 - 0
docs/using-docker/building-node-and-runtime.md

@@ -0,0 +1,40 @@
+### Docker
+
+#### Building localy
+
+A joystream-node can be compiled with given [Dockerfile](./Dockerfile) file:
+
+```bash
+# Build and tag a new image, which will compile joystream-node from source
+docker build . -t joystream-node
+
+# run a development chain with the image just created publishing the websocket port
+docker run -p 9944:9944 joystream-node --dev --ws-external
+```
+
+#### Downloading joystream pre-built images from Docker Hub
+
+```bash
+docker pull joystream/node
+```
+
+#### Running a public node as a service
+
+Create a working directory to store the node's data and where you will need to place the chain file.
+
+```bash
+mkdir ${HOME}/joystream-node-data/
+
+cp rome-testnet.json ${HOME}/joystream-node-data/
+
+docker run -d -p 30333:30333 \
+    -v ${HOME}/joystream-node-data/:/data \
+    --name my-node \
+    joystream/node --base-path /data --chain /data/rome-testnet.json
+
+# check status
+docker ps
+
+# monitor logs
+docker logs --tail 100 -f my-node
+```

+ 0 - 115
node/README.md

@@ -1,115 +0,0 @@
-![ Nodes for Joystream](./validator-node_new.svg)
-
-# Joystream Full Node
-
-Joystream node built with [Substrate](https://github.com/paritytech/substrate).
-
-Follow the instructions below to download the software or build it from source.
-
-For setting up a full node and valiador review the [advanced guide from the helpdesk](https://github.com/Joystream/helpdesk/tree/master/roles/validators).
-
-
-##  Binary releases
-
-The latest pre build binaries can be downloads from the [releases](https://github.com/Joystream/substrate-runtime-joystream/releases) page.
-
-
-## Building from source
-
-### Initial setup
-If you want to build from source you will need the [Rust toolchain](https://rustup.rs/), openssl and llvm/libclang. You can install the required dependencies with:
-
-```bash
-git clone https://github.com/Joystream/substrate-node-joystream.git
-cd substrate-node-joystream/
-git checkout v2.1.2
-./setup.sh
-```
-
-If you are familiar with docker see the [building with docker section](#Docker).
-
-### Building
-
-```bash
-cargo build --release
-```
-
-### Running a public node on the Rome testnet
-
-Run the node and connect to the public testnet.
-
-```bash
-cargo run --release -- --chain ./rome-tesnet.json
-```
-
-The `rome-testnet.json` chain file can be ontained from the [release page](https://github.com/Joystream/substrate-node-joystream/releases/tag/v2.1.2)
-
-
-### Installing a release build
-This will install the executable `joystream-node` to your `~/.cargo/bin` folder, which you would normally have in your `$PATH` environment.
-
-```bash
-cargo install --path ./
-```
-
-Now you can run
-
-```bash
-joystream-node --chain rome-testnet.json
-```
-
-## Development
-
-### Running a local development node
-
-```bash
-cargo run --release -- --dev
-```
-
-### Cleaning development chain data
-When making changes to the runtime library remember to purge the chain after rebuilding the node to test the new runtime.
-
-```bash
-cargo run --release -- purge-chain --dev
-```
-
-### Docker
-
-#### Building localy
-
-A joystream-node can be compiled with given [Dockerfile](./Dockerfile) file:
-
-```bash
-# Build and tag a new image, which will compile joystream-node from source
-docker build . -t joystream-node
-
-# run a development chain with the image just created publishing the websocket port
-docker run -p 9944:9944 joystream-node --dev --ws-external
-```
-
-#### Downloading joystream pre-built images from Docker Hub
-
-```bash
-docker pull joystream/node
-```
-
-#### Running a public node as a service
-
-Create a working directory to store the node's data and where you will need to place the chain file.
-
-```bash
-mkdir ${HOME}/joystream-node-data/
-
-cp rome-testnet.json ${HOME}/joystream-node-data/
-
-docker run -d -p 30333:30333 \
-    -v ${HOME}/joystream-node-data/:/data \
-    --name my-node \
-    joystream/node --base-path /data --chain /data/rome-testnet.json
-
-# check status
-docker ps
-
-# monitor logs
-docker logs --tail 100 -f my-node
-```

+ 0 - 0
node/validator-node_new.svg → node/validator-node-banner.svg


+ 0 - 92
runtime/README.md

@@ -1,92 +0,0 @@
-![Joystream Runtime](./banner_new.svg)
-
-# Joystream Runtime
-
-The runtime is the code that defines the consensus rules of the Joystream protocol.
-It is compiled to WASM and lives on chain.
-[Full nodes](https://github.com/Joystream/substrate-node-joystream) execute the code's logic to validate transactions and blocks on the blockchain.
-
-The joystream runtime builds on a pre-release version of [substrate v2.0](https://substrate.dev/) and adds additional
-functionality to support the [various roles](https://www.joystream.org/roles) that can be entered into on the platform.
-
-
-### Prerequisites
-
-## Getting Started - Building the WASM runtime
-
-```bash
-# Clone repository
-git clone https://github.com/Joystream/substrate-runtime-joystream
-cd substrate-runtime-joystream/
-
-# Install Pre-requisits
-./setup.sh
-cargo build --release
-```
-
-This produces the WASM "blob" output in:
-
-`target/release/wbuild/joystream-node-runtime/joystream_node_runtime.compact.wasm`
-
-See deployment for notes on how to deploy this runtime on a live system.
-
-## Deployment
-
-Deploying the compiled runtime on a live system can be done in one of two ways:
-
-1. Joystream runtime upgrade proposals which will be voted on by the council. When the Joystream platform is live, this will be the only way to upgrade the chain's runtime code.
-
-2. During development and testnet phases, we can send an extrinsic (transaction signed with the sudo key) invoking `conesnsus::setCode()`. This can be done either from the UI/extrinsics app, or directly with an admin script.
-
-## Running the tests
-
-```bash
-cargo test
-```
-
-## Coding style
-
-We use `rustfmt` to format the source code for consistency.
-
-[rustfmt](https://github.com/rust-lang/rustfmt) can be installed with rustup:
-
-```
-rustup component add rustfmt
-```
-
-Running rustfmt can be applied to all source files recursing subfolders:
-
-```
-rustfmt src/*.*
-```
-
-## Reproducible Builds
-
-In an attempt to have a reproducuble version of the runtime that can be verified independantly (by council members for example when deciding wether to vote in a runtime upgrade proposal) there is a `build-with-docker.sh` script which can be run to generate a `joystream_runtime.wasm` file to the current directory.
-
-## Built With
-
-* [Substrate](https://github.com/paritytech/substrate)
-
-## Contributing
-
-Please see our [contributing guidlines](https://github.com/Joystream/joystream#contribute) for details on our code of conduct, and the process for submitting pull requests to us.
-
-## Versioning
-
-Versioning of the runtime is set in `src/lib.rs`
-For detailed information about how to set correct version numbers when developing a new runtime, [see this](https://github.com/paritytech/substrate/blob/master/core/sr-version/src/lib.rs#L60)
-
-
-## Authors
-
-See also the list of [contributors](./CONTRIBUTORS) who participated in this project.
-
-## License
-
-This project is licensed under the GPLv3 License - see the [LICENSE](LICENSE) file for details
-
-## Acknowledgments
-
-Thanks to the whole [Parity Tech](https://www.parity.io/) team for making substrate and helping on riot chat with tips, suggestions, tutorials and answering all our questions during development.
-

+ 0 - 0
runtime/banner_new.svg → runtime/runtime-banner.svg