This is the source code of our published paper at VLDB 22.
git clone https://github.com/iDC-NEU/NeuChain.git
The following is the build guide in the ubuntu20.04 environment (in docker or in a host machine). You can also use the DockerFile to init a build environment, and build the binary inside the container. You may need to change the CMakeLists.txt to build the binaries.
# in home folder
sudo apt update;
sudo apt install -y unzip;
unzip -q NeuChain.zip;
cd NeuChain/;
sudo sh ./install_deps.sh;
Dependency installation scripts are optimized for docker. When executing on a host or a VPS, you can remove the ssh installation and configuration part of the script.
cmake -B build -D CMAKE_BUILD_TYPE=Release
# build the block server
cmake --build build --target block_server_test_comm -j$(nproc)
# build the epoch server
cmake --build build --target epoch_server -j$(nproc)
# build the user
cmake --build build --target user -j$(nproc)
We recommend using the following tools for a quick deployment. You can use the following methods to manually compile the installation package, or download the package through the following link.
wget https://github.com/iDC-NEU/neuchain_deployer/releases/download/v1.1/release_0.30_v5.zip
# in home folder
git clone https://github.com/iDC-NEU/neuchain_deployer.git
cd neuchain_deployer/
cmake -B build -D CMAKE_BUILD_TYPE=Release
cmake --build build --target block_server_test_comm -j$(nproc)
cmake --build build --target protobuf -j$(nproc)
# build the server, each server is on a separate machine.
cmake --build build --target aria_deliver_server -j$(nproc)
# build the client, The client controls the start and stop of all nodes
cmake --build build --target deliver_client -j$(nproc)
# in home folder
mkdir -p "neuchain_release/bin/crypto"
cp neuchain_deployer/build/aria_deliver_server ./neuchain_release/
cp neuchain_deployer/build/deliver_client ./neuchain_release/
cp NeuChain/build/src/block_server/block_server_test_comm ./neuchain_release/bin/
cp NeuChain/build/src/epoch_server/epoch_server ./neuchain_release/bin/
cp NeuChain/build/src/user/user ./neuchain_release/bin/
cp NeuChain/doc/4_servers_example.yaml ./neuchain_release/config.yaml
cp NeuChain/doc/install.sh ./neuchain_release/install.sh
chmod +x ./neuchain_release/install.sh
# in home folder
mkdir -p "neuchain_release/so"
cp /usr/local/lib/*.so neuchain_release/so/
# in home folder
cp NeuChain/doc/config_template_4_servers.yaml ./neuchain_release/bin/config-template.yaml
cp NeuChain/doc/config_template_local.yaml ./neuchain_release/bin/config_local.yaml
cp NeuChain/doc/init_crypto.yaml ./neuchain_release/bin/config_crypto.yaml
# in home folder
# Modify src/block_server/server.cpp
cat src/block_server/server.cpp
# Recompile block_server_test_comm
cd NeuChain
cmake --build build --target block_server_test_comm -j$(nproc)
cd ..
# copy binary
cp NeuChain/build/src/block_server/block_server_test_comm ./neuchain_release/bin/db_init
cd ./neuchain_release/bin/
# in home/neuchain_release/bin/ folder
cp config_local.yaml config.yaml # use local config to init db
./db_init
# backup database
mv small_bank small_bank_bk
mv ycsb ycsb_bk
# in home/neuchain_release/bin/ folder
cp config_crypto.yaml config.yaml # use crypto config to init crypto
./user -b 1 1 1 # Can be terminated when prompted "all worker started"
# the public and private keys can be seen in ./crypto folder
Unzip your archive on each peer, the example shows the zip file downloaded from the url.
apt update;
apt install unzip;
unzip release_0.XX.zip;
cd release_0.XX;
./install.sh; # install so files
./aria_deliver_server # start the deployer server
./deliver_client
./deliver_client
# in release_0.XX or neuchain_release
cd bin
./user [worker count] [tps of each worker] [duration]