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.
./scripts/dev_setup.sh
curl https://sh.rustup.rs -sSf | sh
- Restart the shell if necessary
cd diem-move/diem-transaction-benchmarks/src
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;
./scripts/dev_setup.sh
cd diem-move/diem-transaction-benchmarks/benches
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 Core implements a decentralized, programmable database which provides a financial infrastructure that can empower billions of people.
- 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.
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.
- The Diem Blockchain
- Move: A Language With Programmable Resources
- State Machine Replication in the Diem Blockchain
- Join us on the Diem Discord or Discourse.
- Ask a question on Stack Overflow.
- Get the latest updates to our project by signing up for our newsletter.
Diem Core is licensed as Apache 2.0.