First, complete the basic Rust setup instructions.
Recommended OS to build the xxnetwork-chain binary is Ubuntu 20 or above.
The makefile provides build commands, of which the most important are:
make build-prod # Build production ready node binary
make build-release # Build release node binary
make build # Build all packagesBefore being able to build for linux on macOS, the following extra steps are needed:
rustup target add x86_64-unknown-linux-gnu # Install linux GNU rust target
brew tap SergioBenitez/osxct # Tap this project with brew
brew install x86_64-unknown-linux-gnu # Install cross-compile tools for GNUThen, the target for the rust compiler needs to be specified on any build command with --target=x86_64-unknown-linux-gnu.
The makefile provides the test-pallets command which runs unit tests for all custom pallets, as follows:
chainbridge
claims
staking
swap
xx-cmix
xx-economics
xx-team-custodyIncluded is a script that automatically runs the benchmarking code and calculates extrinsic weights for relevant pallets.
This can be executed with:
sh ./scripts/benchmark.shA code review was performed by ChainSafe. It focused mostly on the modifications to the Staking pallet and the custom made xx network pallets for cmix, economics and team custody. The report can be found here.