From 1680819da3e9b9c7ea01326969ce52be1696c0f3 Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Wed, 21 Oct 2020 10:52:31 -0400 Subject: [PATCH 1/4] First pass - how t obuild and run standalone --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a8b833a5c5..66c4465541 100644 --- a/README.md +++ b/README.md @@ -2,28 +2,28 @@ # ![moonbeam](media/moonbeam-cover.jpg) ![Tests](https://github.com/PureStake/moonbeam/workflows/Tests/badge.svg) -Run an Ethereum compatible ~~parachain~~ (blockchain for now, until parachains are available) based on Substrate. +Run an Ethereum compatible ~~parachain~~ (and blockchain for now, until parachains are more stable) based on Substrate. *See [moonbeam.network](https://moonbeam.network) for the moonbeam blockchain description.* *See [www.substrate.io](https://www.substrate.io/) for substrate information.* ## Install (linux) -### Moonbeam +### Get the code ```bash git clone -b moonbeam-tutorials https://github.com/PureStake/moonbeam cd moonbeam ``` -### Dependencies +### Rust developer environment -Install Substrate and its pre-requisites (including Rust): +Install Substrate pre-requisites (including Rust): ```bash curl https://getsubstrate.io -sSf | bash -s -- --fast ``` -## Build +## Build Parachain Build Wasm and native code: ```bash @@ -36,12 +36,18 @@ If a _cargo not found_ error appears in the terminal, manually add Rust to your source $HOME/.cargo/env ``` +## Build Standalone +```bash +cd node/standalone +cargo build --release +``` + ## Run ### Single node dev ```bash -./target/release/moonbase-standalone --dev +./node/standalone/target/release/moonbase-standalone --dev ``` ### Docker image From a15ff56a98520919175053efb9890bf3840d00ee Mon Sep 17 00:00:00 2001 From: Alan Sapede Date: Thu, 22 Oct 2020 15:05:25 -0400 Subject: [PATCH 2/4] Fixes standalone binary path (#75) Co-authored-by: Alan --- scripts/_init_var.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_init_var.sh b/scripts/_init_var.sh index 4e95c8bb41..78ed1a3e2c 100644 --- a/scripts/_init_var.sh +++ b/scripts/_init_var.sh @@ -8,7 +8,7 @@ mkdir -p $PARACHAIN_BUILD_FOLDER if [ -z "$STANDALONE_BINARY" ]; then - STANDALONE_BINARY="target/release/moonbase-standalone" + STANDALONE_BINARY="node/standalone/target/release/moonbase-standalone" fi if [ -z "$PARACHAIN_BINARY" ]; then From 0363c02f4b6629c4ac761bd23fbd6a731fe69ddf Mon Sep 17 00:00:00 2001 From: albertov19 <64150856+albertov19@users.noreply.github.com> Date: Thu, 22 Oct 2020 21:12:53 +0200 Subject: [PATCH 3/4] Removed the gas value (#79) --- tools/truffle/migrations/2_deploy_contracts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/truffle/migrations/2_deploy_contracts.js b/tools/truffle/migrations/2_deploy_contracts.js index 066b4f0cc5..52e4370ad4 100644 --- a/tools/truffle/migrations/2_deploy_contracts.js +++ b/tools/truffle/migrations/2_deploy_contracts.js @@ -2,6 +2,6 @@ var MyToken = artifacts.require("MyToken"); module.exports = function (deployer) { // deployment steps - deployer.deploy(MyToken, "8000000000000000000000000", { gas: 4294967295 }); + deployer.deploy(MyToken, "8000000000000000000000000"); }; From 7627f2bc9a0821c8f11e4a973fea289f5fef384d Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Thu, 22 Oct 2020 16:17:06 -0400 Subject: [PATCH 4/4] Add a `rust-toolchain` file (#80) * Add the toolchain file * Update the CI --- .github/workflows/release.yml | 11 +++++------ rust-toolchain | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 rust-toolchain diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43629e6275..6d1fdb39df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,9 +8,6 @@ on: branches: - master -env: - WASM_BUILD_TOOLCHAIN: nightly-2020-07-20 - jobs: get-variables: runs-on: ubuntu-latest @@ -71,14 +68,16 @@ jobs: ~/.cargo/git target node/standalone/target - key: ${{ runner.OS }}-build-${{ env.WASM_BUILD_TOOLCHAIN }}-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }} restore-keys: | - ${{ runner.OS }}-build-${{ env.WASM_BUILD_TOOLCHAIN }} + ${{ runner.OS }}-build - uses: actions-rs/toolchain@v1 with: target: wasm32-unknown-unknown - toolchain: ${{ env.WASM_BUILD_TOOLCHAIN }} + # Toolchain is autodetected from `rust-toolchain` file + # https://github.com/actions-rs/toolchain#the-toolchain-file + #toolchain: ${{ env.WASM_BUILD_TOOLCHAIN }} default: true - id: get-rust-versions diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000000..80184fde89 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +nightly-2020-07-20