Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ WORKDIR /dhx/node

COPY . .

RUN apt-get update && apt-get install -y build-essential wget cmake pkg-config libssl-dev \
# https://substrate.dev/docs/en/knowledgebase/getting-started
RUN apt-get update && apt-get install -y build-essential wget cmake pkg-config libssl-dev llvm \
openssl git gcc clang libclang-dev curl vim unzip screen bash \
&& curl https://getsubstrate.io -sSf | bash -s -- --fast \
&& wget -O - https://sh.rustup.rs | sh -s -- -y \
&& . /root/.cargo/env \
&& PATH=$PATH:/root/.cargo/bin \
&& rustup update stable \
&& rustup update nightly \
&& rustup toolchain install nightly-2021-03-10 \
&& rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-10 \
&& rustup default nightly-2021-03-10 \
&& rustup override set nightly-2021-03-10 \
&& ./scripts/init.sh && \
&& cargo version \
&& rustc --version \
&& cargo build --release
Expand Down
19 changes: 6 additions & 13 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,21 @@

## Install and update: Rust, Substrate, Wasm, and Subkey <a id="chapter-ca1234"></a>

* Install and update dependencies (i.e. cmake, gcc, ssl, llvm, etc)
* Refer to the [Dockerfile](./Dockerfile) for details on linux.
* Refer to https://getsubstrate.io/ for installation steps on various operating systems.
* Install and update Build Dependencies by following Substrate Developer Hub instructions https://substrate.dev/docs/en/knowledgebase/getting-started/#1-build-dependencies for your specific operating system

* Install and update Rust, Substrate, Wasm, and Subkey:
* Install and update Rust, Substrate, Wasm:

```bash
curl https://getsubstrate.io -sSf | bash -s -- --fast && \
cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.0 --locked && \
./scripts/init.sh && \
. ~/.cargo/env && \
wget -O - https://sh.rustup.rs | sh -s -- -y && \
. ~/.cargo/env && \
PATH=$PATH:~/.cargo/bin && \
rustup update stable nightly && \
rustup toolchain install nightly-2021-03-10 && \
rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-10 && \
rustup default nightly-2021-03-10 && \
rustup override set nightly-2021-03-10 && \
./scripts/init.sh && \
cargo version && \
rustc --version
```

* Optionally install Subkey from https://substrate.dev/docs/en/knowledgebase/integrate/subkey

## Example "dev" development PoS testnet (with single node) <a id="chapter-f21efd"></a>

### Intro
Expand Down
1 change: 1 addition & 0 deletions scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e

echo "*** Initializing WASM build environment"

rustup default stable
rustup update stable
rustup update nightly
rustup toolchain install nightly-2021-03-10
Expand Down