The data-store-pallet is one of the components of the data storage service designed and implemented by CESS LAB based on Substrate. See CIP-1 for its design scheme, and it has been included in W3F Grants Program-ces_data_store.
Follow Setup to guide you install the Substrate development.
The cargo run
command will perform an initial build. Use the following command to build the node without launching it:
# Fetch the code
git clone https://github.com/CESSProject/data-store-pallet.git
cd data-store-pallet
# Build the node (The first build will be long (~30min))
cargo build --release
After the node has finished compiling, you can follow these steps below to run it.
Launch node on the dev-env with:
# start
./target/release/node-template --dev
Install Docker first, and run the following command to start a node:
docker pull cesslab/data-store-pallet:0.1.2
docker run -itd --name data-store --network=host cesslab/data-store-pallet:0.1.2 && docker logs -f data-store
CESS has Rust unit tests, and can be run locally.
# Run all the Rust unit tests
cargo test --release
CESS has Rust unit tests with benckmarks also. Currently, testing this feature in docker is not supported. Please execute belows after clone this repo.
# Build project with the benchmarks enabled
cargo build --release --features runtime-benchmarks
./target/release/node-template benchmark --chain dev --pallet pallet_data_store --extrinsic "*" --repeat 50 --output=./pallets/data-store/src/weights.rs