Skip to content

Latest commit

 

History

History
102 lines (70 loc) · 5.5 KB

README.md

File metadata and controls

102 lines (70 loc) · 5.5 KB

Block-STM

This repository implements and benchmarks Block-STM and other baselines for the paper Block-STM: Scaling Blockchain Execution by Turning Ordering Curse to a Performance Blessing. The implementation of Block-STM has been merged on the main branch of the Diem blockchain open source code-base, see PR.

Branches block_stm and aptos implement and benchmark Block-STM with Diem peer-to-peer transactions and Aptos peer-to-peer transactions, respectively. The 160k tps number is achievable for Aptos peer-to-peer transactions. Similarly, branches bohm and litm implement and benchmark Bohm and LiTM with Diem peer-to-peer transactions, respectively. After running Block-STM, you can checkout to these branches and run them following similar steps as below.

Run Block-STM:

  1. ./scripts/dev_setup.sh
  2. curl https://sh.rustup.rs -sSf | sh
  3. Restart the shell if necessary
  4. cd diem-move/diem-transaction-benchmarks/src
  5. cargo run --release main

Use taskset commands to run experiments with different threads number.

If you run the benchmark on Ubuntu, please use Ubuntu 20.04.

If you run the benchmark on M1, there may be error error: failed to run custom build command for librocksdb-sys v6.20.3. This solution should resolve the issue by downgrading to clang 14.

Set parameters (number of accounts/transactions/warmup-runs/runs) in diem-move/diem-transaction-benchmarks/src/main.rs.

let acts = [2, 10, 100, 1000, 10000];
let txns = [1000, 10000];
let num_warmups = 2;
let num_runs = 10;

Run sequential baseline:

  1. ./scripts/dev_setup.sh
  2. cd diem-move/diem-transaction-benchmarks/benches
  3. cargo bench peer_to_peer

Set parameters (number of accounts/transactions) in diem-move/diem-transaction-benchmarks/src/transactions.rs.

/// The number of accounts created by default.
pub const DEFAULT_NUM_ACCOUNTS: usize = 100;

/// The number of transactions created by default.
pub const DEFAULT_NUM_TRANSACTIONS: usize = 1000;

Note to readers: On December 1, 2020, the Libra Association was renamed to Diem Association. The project repos are in the process of being migrated. All projects will remain available for use here until the migration to a new GitHub Organization is complete.

Diem Logo

Diem Rust Crate Documentation (main) License grcov test history Automated Issues Discord chat

Diem Core implements a decentralized, programmable database which provides a financial infrastructure that can empower billions of people.

Note to Developers

  • Diem Core is a prototype.
  • The APIs are constantly evolving and designed to demonstrate types of functionality. Expect substantial changes before the release.
  • We’ve launched a testnet that is a live demonstration of an early prototype of the Diem Blockchain software.

Contributing

To begin contributing, sign the CLA. You can learn more about contributing to the Diem project by reading our Contribution Guide and by viewing our Code of Conduct.

Getting Started

Learn About Diem

Try Diem Core

Technical Papers

Blog

Community

License

Diem Core is licensed as Apache 2.0.