You don't need SGX to run a node (only workers do).
curl https://sh.rustup.rs -sSf | sh
In order to compile ring into wasm, you'll need LLVM-9 or above or you'll get linker errors. Here the instructions for Ubuntu 18.04
wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh sudo ./llvm.sh 10 export CC=/usr/bin/clang-10 export AR=/usr/bin/llvm-ar-10 # if you already built, make sure to run cargo clean
Initialize your Wasm Build environment:
Build Wasm and native code:
cargo build --release
If you prefer to skip the setup, you can just use our docker and build the node like this (run in the repo root):
docker pull scssubstratee/substratee_dev:1804-2.12-1.1.3-001 docker run -it -v $(pwd):/root/work scssubstratee/substratee_dev:1804-2.12-1.1.3-001 /bin/bash ./scripts/init.sh cargo build --release
Purge any existing developer chain state:
./target/release/substratee-node purge-chain --dev
Start a development chain with:
If you want the substraTEE-node to expose a different websocket port, use the option
--ws-port xxx. If external workers or clients need to access, add the option
Detailed logs may be shown by running the node with the following environment variables set:
RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev.
If you want to run your node as a system service in Linux, create (as root or user with sudo permissions) a file in
substraTEE-node.service with the following content:
[Unit] Description=SubstraTEE Node After=network.target StartLimitIntervalSec=0 [Service] Type=simple Restart=always RestartSec=10 User=<USER TO RUN THE NODE> ExecStart=<ABSOLUTE PATH TO>/substratee-node --chain <PATH TO CHAIN JSON> --name <NAME OF THE NODE> [Install] WantedBy=multi-user.target
StartLimitIntervalSecmakes that systemd will try to re-start the service forever.
RestartSecindicates the interval between two restarts.
Userspecifies the user that should run the node.
ExecStartspecifies the path to the binary. Use absolute paths here.
Update the systemd daemon with
Use the following commands:
systemctrl start substraTEE-node.serviceto start the node.
systemctrl stop substraTEE-node.serviceto stop the node.
systemctrl status substraTEE-node.serviceto check the status of the node/service.