Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[parallel executor] parallel executor (#3940)
* add crate multi version hashmap

* add crate infallible and parallel-executor

* add vm-runtime parallel_executor

* add vm-runtime/parallel_executor

* update crate mvhashmap and parallel-executor

* update vm-runtime

* add chunk_block_transactions unit_test

* add parallel executor flow (notice can't compiler)

* add VMAdaptor,VMValidator, VMExecutor

* update BlockExecute

* update executor

* tidy code

* update ci pr

* fix clippy warning

* set concurrency level

* set concurrency level

* update rpc schema

* set concurrency level

* update StarcoinVMWrapper init

* set concurrency_level

* fix should_restart_execution logic

* remove log

* add error process

* update set_concurrency_level_once equals num_cpus::get

* remove comment msg

* fix rebase master compiler error

* add TurboSTM executor log

* add TurboSTM gen txn

* add TurboSTM apply txn cmd

* TurboSTM not save_log

* set_concurrency_level cmd

* revert TurboSTM not save_log

* add debug.json
  • Loading branch information
nkysg committed Aug 28, 2023
1 parent 641a902 commit ef27ca5
Show file tree
Hide file tree
Showing 52 changed files with 2,643 additions and 70 deletions.
65 changes: 65 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion Cargo.toml
Expand Up @@ -17,6 +17,7 @@ members = [
"commons/accumulator",
"commons/forkable-jellyfish-merkle",
"commons/time-service",
"commons/infallible",
"types",
"types/uint",
"genesis",
Expand Down Expand Up @@ -73,6 +74,8 @@ members = [
"vm/stdlib",
"vm/compiler",
"vm/move-prover",
"vm/mvhashmap",
"vm/parallel-executor",
"vm/transaction-builder",
"vm/transaction-builder-generator",
"vm/move-coverage",
Expand Down Expand Up @@ -122,6 +125,7 @@ default-members = [
"commons/api-limiter",
"commons/accumulator",
"commons/forkable-jellyfish-merkle",
"commons/infallible",
"types",
"types/uint",
"genesis",
Expand Down Expand Up @@ -176,6 +180,8 @@ default-members = [
"vm/stdlib",
"vm/compiler",
"vm/move-prover",
"vm/mvhashmap",
"vm/parallel-executor",
"vm/transaction-builder",
"vm/transaction-builder-generator",
"vm/move-coverage",
Expand Down Expand Up @@ -258,6 +264,7 @@ codespan = { version = "0.8.0", features = ["serialization"] }
codespan-reporting = "0.11"
colored = "2.0.0"
criterion = "0.3"
crossbeam = "0.8.1"
crossbeam-channel = "0.5.6"
cryptonight-rs = { path = "consensus/cryptonight-rs" }
csv = "~1"
Expand Down Expand Up @@ -376,7 +383,7 @@ proptest-derive = "0.3.0"
quote = "1.0.16"
rand = "0.8.5"
rand_core = { version = "0.6.3", default-features = false }
rayon = "1"
rayon = "1.6.1"
regex = "1.6.0"
ripemd160 = "0.9.1"
rlp = "0.4"
Expand Down Expand Up @@ -479,6 +486,9 @@ stdlib = { path = "vm/stdlib" }
stest = { path = "commons/stest" }
stest-macro = { path = "commons/stest/stest-macro" }
stream-task = { path = "commons/stream-task" }
starcoin-mvhashmap = { path = "vm/mvhashmap" }
starcoin-parallel-executor = { path = "vm/parallel-executor" }
starcoin-infallible = { path = "commons/infallible" }
syn = { version = "1.0.107", features = [
"full",
"extra-traits",
Expand Down
10 changes: 10 additions & 0 deletions chain/open-block/src/lib.rs
Expand Up @@ -185,6 +185,10 @@ impl OpenedBlock {
self.included_user_txns
.push(txn.try_into().expect("user txn"));
}
TransactionStatus::Retry => {
debug!("impossible retry txn {}", txn_hash);
discard_txns.push(txn.try_into().expect("user txn"));
}
};
}
Ok(ExcludedTxns {
Expand Down Expand Up @@ -216,6 +220,12 @@ impl OpenedBlock {
TransactionStatus::Keep(_) => {
let _ = self.push_txn_and_state(block_meta_txn_hash, output)?;
}
TransactionStatus::Retry => {
bail!(
"block_metadata txn {:?} is retry impossible",
self.block_meta
);
}
};
Ok(())
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/db-exporter/Cargo.toml
Expand Up @@ -31,8 +31,10 @@ starcoin-storage = { workspace = true }
starcoin-transaction-builder = { workspace = true }
starcoin-types = { workspace = true }
starcoin-vm-types = { workspace = true }
starcoin-vm-runtime = { workspace = true }
futures = { workspace = true }
rayon = { workspace = true }
num_cpus = { workspace = true }

[package]
authors = { workspace = true }
Expand Down

0 comments on commit ef27ca5

Please sign in to comment.