Skip to content
Substrate node implementing Straightedge
Branch: master
Clone or download
Pull request Compare This branch is 2 commits ahead of hicommonwealth:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
modules
node
scripts
testnets
.dockerignore
.gitignore
Cargo.lock
Cargo.toml
Dockerfile
LICENSE
README.md
build.rs
gen-docs.sh
setup.sh

README.md

straightedge-node

A Parity Substrate node implementing Straightedge, an ethical fork of Edgeware.

To get started

  • Download this entire repository to the file system that you are using to run the validator node.

    • You can do this by going to this page and selecting "Clone or download" followed by "Download ZIP".
    • If you are installing via a command line interface (e.g. SSH into a remote server), you can download by running wget https://github.com/heystraightedge/straightedge-node/archive/master.zip
    • Once you have downloaded the zip file, unzip the straightedge-node-master folder onto the file system. If you are using a command line interface, you can unzip by running unzip master.zip
    • All commands referenced in this document need to be run from within the straightedge-node-master folder.
  • You will also need to install rust and cargo by installing rustup here.

    • Note: at the end of the install, you will need to log out and log in again, or run the suggested source command to configure the current shell.

Fresh start

If your device is clean (such as a fresh cloud VM) you can use this script, otherwise, proceed with the Initial Setup.

./setup.sh

To create a keypair, install subkey with cargo install --force --git https://github.com/paritytech/substrate subkey. Then run the following:

subkey generate

To create an ED25519 keypair, run the following:

subkey -e generate

To create derived keypairs, use the mnemonic generated from a method above and run:

subkey inspect "<mnemonic>"//<derive_path>

For example:

subkey inspect "west paper guide park design weekend radar chaos space giggle execute canoe"//edgewarerocks

Then proceed to the Running instructions or follow the instructions below for the manual setup.

Initial Setup

curl https://sh.rustup.rs -sSf | sh
rustup update stable
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
cargo install --git https://github.com/alexcrichton/wasm-gc

You will also need to install the following packages:

Linux:

sudo apt install cmake pkg-config libssl-dev git clang libclang-dev

Mac:

brew install cmake pkg-config openssl git llvm

Building

./scripts/build.sh
cargo build --release

Running

Ensure you have a fresh start if updating from another version:

./scripts/purge-chain.sh

Implemented Modules

Edge

SRML

Developing on Starightedge

Running A Local Chain

To run a chain locally for development purposes: ./target/release/straightedge --chain=local --alice --validator

To force your local to create new blocks, even if offline, add the --force-authoring flag.

Adding A Module

  1. Add its github repo to:
  1. Changes to the runtime:
  • Add it as an extern crate.
  • Implement its Trait with production types.
  • Add it to the construct_runtime macro with all implemented components.
  1. If its storage contains config elements, then you need to modify the chain spec:
  • Add it to the straightedge_runtime's list of Config types.
  • Add it to the testnet_genesis function, initializing all storage fields set to config().
  1. Build and run the chain.
You can’t perform that action at this time.