A fresh FRAME-based Substrate node
BHO Blockchain Network is interoperable, cross-chain with various digital asset economies and Defi Networks such as Binance Smart Chain, Ethereum, and Polkadot.
To install required packages on macOS or Linux:
- Ubuntu or Debian:
sudo apt update && sudo apt install -y git clang curl libssl-dev llvm libudev-dev
- Arch Linux:
pacman -Syu --needed --noconfirm curl git clang
- Fedora:
sudo dnf update sudo dnf install clang curl git openssl-devel
- macOS:
brew update && brew install openssl
- Windows: Refer to this installation guide.
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:
#### Configure default to the latest stable version:
rustup default stable
rustup update
###F Add the nightly release and the nightly WebAssembly (wasm) targets:
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
#### Verify your installation:
rustc --version
rustup show
-
In early stage, we only support Proof of Staked Authority with private authorities. Hence, users can only run RPC node at the moment.
-
We have two ways to start a BHO node:
- Clone the bholdus-chain repository
git clone https://github.com/Bholdus/bholdus-chain.git
- Build source
- Build Testnet Node: Phoenix
cargo build --features with-phoenix-runtime,evm-tracing --release
- Build Mainnet Node: Ulas
cargo build --features with-ulas-runtime,evm-tracing --release
You should always use the --release flag to build optimized artifacts.
Use branch main
for latest development codebase. However, if you want to build production node, please checkout the tagged release commit. For production build, you can put SKIP_WASM_BUILD=1
env to disable building wasm version of the runtime.
- Start BHO node
- Run Testnet Node: Phoenix
./target/release/bholdus --chain=phoenix --name <INSERT_NAME> --rpc-port 9933 --ws-port 9944 --ws-external --rpc-external --prometheus-external --rpc-cors=all --pruning archive -lruntime=debug
- Run Mainnet Node: Ulas
./target/release/bholdus --chain=ulas --name <INSERT_NAME> --rpc-port 9933 --ws-port 9944 --ws-external --rpc-external --prometheus-external --rpc-cors=all --pruning archive -lruntime=debug
You can use the pre-built binary in the Github Releases
To start a node with a pre-built binary, simply use the commands from 1. Building from source
To build in benchmarking mode:
cargo build --features with-phoenix-runtime --features runtime-benchmarks --release
To run benchmarks and output new weight files
Example:
./target/release/bholdus benchmark \
--chain phoenix-dev \ # Configurable Chain Spec
--execution wasm \ # Always test with Wasm
--wasm-execution compiled \ # Always used `wasm-time`
--pallet bholdus-tokens \ # Select the pallet
--extrinsic '*' \ # Select the benchmark case name, using '*' for all
--steps 20 \ # Number of steps across component ranges
--repeat 10 \ # Number of times we repeat a benchmark
--raw \ # Optionally output raw benchmark data to stdout
--output ./pallets/bholdus-tokens/src/weights.rs # Output results into a Rust file
--template ./.maintain/frame-weight-template.hbs # Template file
Now that we have the bholdus node running, let's connect it with a Bholdus-JS Apps to see it working.
Follow the following steps,
- One the local node is running, open the following in your browser,
https://apps.bholdus.com
- Select
Local node
and ClickSwitch
. The Bholdus-JS app would be connected to your local node.