HiBo001 / slimchain

Source code for the VLDB21 paper "SlimChain: Scaling Blockchain Transactions through Off-Chain Storage and Parallel Processing"

Home Page:https://xuc.me/publication/pvldb/slimchain/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SlimChain

WARNING: This is an academic proof-of-concept prototype, and in particular has not received careful code review. This implementation is NOT ready for production use.

If you find the code here useful, please consider to cite our paper:

@article{PVLDB:slimchain,
  author = {Xu, Cheng and Zhang, Ce and Xu, Jianliang and Pei, Jian},
  title = {{SlimChain}: Scaling Blockchain Transactions through Off-Chain Storage and Parallel Processing},
  journal = {Proceedings of the VLDB Endowment},
  year = {2021},
  month = jul,
  volume = {14},
  number = {11},
}

Install Dependencies

  • OS: Ubuntu 18.04 LTS or Ubuntu 20.04 LTS.
  • Install Rust.
  • Run sudo ./scripts/install_deps.sh.
  • Install SGX Driver by running sudo ./scripts/install_sgx_driver.sh.
  • Enable SGX Aesm service: sudo /opt/intel/sgx-aesm-service/startup.sh.

Build and Test

  • Create a minimal config.toml file in the root directory with the following content:
# Obtain keys from https://api.portal.trustedservices.intel.com/EPID-attestation
[tee]
# Subscription Key that provides access to the Intel API
api_key = "YOUR_API_KEY"
# Service Provider ID (SPID)
spid = "YOUR_SPID"
# Whether to sign linkable quote
linkable = false
  • Run the following commands.
make
make test-release

Run Nodes

  • Create proper config.toml file based on examples from config-example.
  • See help messages on how to run nodes and send txs:
./target/release/slimchain-node-tee --help # run slimchain nodes
./target/release/slimchain-send-tx --help # send tx
./target/release/baseline-classic-node --help # run baseline (classic) nodes
./target/release/baseline-stateful-node-tee --help # run baseline (stateful) nodes
./target/release/slimchain-inspect-db --help # check storage size

Adjust Proof-of-Work Difficulty

You can change the initial Proof-of-Work difficulty in the config.toml.

To test the difficulty:

cargo test --release -p slimchain-chain consensus::pow::tests::test_pow  -- --nocapture --exact --ignored

About

Source code for the VLDB21 paper "SlimChain: Scaling Blockchain Transactions through Off-Chain Storage and Parallel Processing"

https://xuc.me/publication/pvldb/slimchain/

License:Apache License 2.0


Languages

Language:Rust 95.8%Language:Ruby 2.4%Language:Makefile 0.6%Language:Solidity 0.5%Language:Shell 0.5%Language:Dockerfile 0.1%Language:JavaScript 0.1%