WeTEE Docs
WeTEE Docs
  • OVERVIEW
  • MINNER INSTALLATION GUIDES
    • Supported Devices
    • Host Operating System
    • Install SGX driver in all nodes in the cluster
    • Install k3s cluster on linux
    • Install wetee chain node in cluster
    • Install Intel SGX/TDX PCCS service in cluster
    • Install Confidential wetee worker operator in cluster
    • Install NVIDIA Container Runtime Support(Optional)
    • Staking ant mint
  • DEVELOPMENT GUIDES
    • Blockchain validation node
    • Run TEE miner
    • Run TEE DKG
  • PRODUCTS
    • Confidential Service
    • Confidential Task
    • GPU Compute service
  • For golang developer
    • Golang TEE introduction
    • Libos ego sdk
    • Deploy TEE program on the cloud
    • Deploy TEE program on WeTEE
    • Deploy program docker image on WeTEE
  • Mint
    • Blockchain mint
    • TEE computing mint
Powered by GitBook
On this page
  • Getting Started
  • Run
  • Build
  • Run local dev chain
  • Unit Test
  1. DEVELOPMENT GUIDES

Blockchain validation node

PreviousStaking ant mintNextRun TEE miner

Last updated 8 months ago

Getting Started

Follow the steps below to get started with the example node.

Rust Setup

  • .

  • .

  • .

Run

Use Rust's native cargo command to build and launch the node:

cargo run --release -p wetee-node -- --dev

Build

The cargo run command will perform an initial build. Use the following command to build the node without launching it:

cargo build --release

Embedded Docs

Once the project has been built, the following command can be used to explore all parameters and subcommands:

./target/release/wetee-node -h

Run local dev chain

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.

Single-Node Development Chain

This command will start the single-node development chain with non-persistent state:

./target/release/wetee-node --dev

Purge the development chain's state:

./target/release/wetee-node purge-chain --dev

Start the development chain with detailed logging:

RUST_BACKTRACE=1 ./target/release/wetee-node -ldebug --dev

Development chain means that the state of our chain will be in a tmp folder while the nodes are running. the following accounts will be pre-funded:

  • Alice

  • Bob

In case of being interested in maintaining the chain' state between runs a base path must be added so the db can be stored in the provided folder instead of a temporary one. We could use this folder to store different chain databases, as a different folder will be created for each chain that is ran. The following commands shows how to use a newly created folder as our db base path.

// Create a folder to use as the db base path
$ mkdir local-chain-state

// Use of that folder to store the chain state
$ ./target/release/wetee-node --dev --base-path ./local-chain-state/

// Check the folder structure created inside the base path after running the chain
$ ls ./local-chain-state
chains
$ ls ./local-chain-state/chains/
dev
$ ls ./local-chain-state/chains/dev
db keystore network

Unit Test

To run Unit Tests, execute the following command:

cargo test
Linux development environment
MacOS development environment
Windows development environment