This repo contains the code for the Porta network blockchain.
This node has been tested for Ubuntu version 20.04.
Use a terminal shell to execute the following commands:
sudo apt update
# May prompt for location information
sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl
This project uses rustup
to help manage the Rust toolchain. First install
and configure rustup
:
# Install
curl https://sh.rustup.rs -sSf | sh
# Configure
source ~/.cargo/env
Finally, configure the Rust toolchain:
rustup default stable
rustup update nightly
rustup update stable
rustup target add wasm32-unknown-unknown --toolchain nightly
Use Rust's native cargo
command to build and launch the template node:
cargo run --release -- --dev --tmp
The cargo run
command will perform an initial build. Use the following command to build the node
without launching it:
cargo build --release
Once the project has been built, the following command can be used to explore all parameters and subcommands:
./target/release/porta -h
The provided cargo run
command will launch a temporary node and its state will be discarded after
you terminate the process. After the project has been built, there are other ways to launch the
node.
This command will start the single-node development chain with persistent state:
./target/release/porta --dev
Purge the development chain's state:
./target/release/porta purge-chain --dev
Start the development chain with detailed logging:
RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/porta -lruntime=debug --dev
A blockchain node is an application that allows users to participate in a blockchain network.
After the node has been built, refer to the embedded documentation to learn more about the capabilities and configuration parameters that it exposes:
./target/release/porta --help