diff --git a/.circleci/config.yml b/.circleci/config.yml index 20f836e61e7d..30a5c3137a95 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,14 +15,6 @@ executors: resource_class: small commands: - rust_setup: - description: Set rustc version - steps: - - run: - name: Set rustc version - command: | - rustup default stable - rustup update stable print_versions: description: Version Info steps: @@ -40,6 +32,7 @@ commands: echo 'export LIBRA_DUMP_LOGS=1' >> $BASH_ENV echo 'export CARGO_INCREMENTAL=0' >> $BASH_ENV echo 'export CI_TIMEOUT="timeout 40m"' >> $BASH_ENV + echo 'export CARGO="$(rustup which --toolchain nightly cargo) -Z features=all"' >> $BASH_ENV install_deps: steps: - run: @@ -48,6 +41,7 @@ commands: sudo apt-get update sudo apt-get install -y cmake curl clang llvm rustup component add clippy rustfmt + rustup toolchain install nightly install_code_coverage_deps: steps: - run: @@ -55,7 +49,7 @@ commands: command: | sudo apt-get update sudo apt-get install lcov - cargo install --force grcov + $(CARGO) install --force grcov install_docker_linter: steps: - run: @@ -64,11 +58,6 @@ commands: export HADOLINT=${HOME}/hadolint export HADOLINT_VER=v1.17.4 curl -sL -o ${HADOLINT} "https://github.com/hadolint/hadolint/releases/download/${HADOLINT_VER}/hadolint-$(uname -s)-$(uname -m)" && chmod 700 ${HADOLINT} - install_rust_nightly_toolchain: - steps: - - run: - name: Install nightly toolchain for features not in beta/stable - command: rustup install nightly find_dockerfile_changes: steps: - run: @@ -82,7 +71,6 @@ commands: build_setup: steps: - checkout - - rust_setup - print_versions - env_setup - install_deps @@ -104,37 +92,37 @@ jobs: - run: name: Linting command: | - [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || cargo x lint - [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || cargo xclippy --workspace --all-targets - [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || cargo xfmt --check - [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || cargo install cargo-guppy --git http://github.com/calibra/cargo-guppy --rev 8b2bc45c0cd6323a7a2b8170ddad6d2a5b79047b - [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || [[ -z $(cargo guppy dups --target x86_64-unknown-linux-gnu --kind directthirdparty) ]] + [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || $CARGO x lint + [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || $CARGO xclippy --workspace --all-targets + [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || $CARGO xfmt --check + [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || $CARGO install cargo-guppy --git http://github.com/calibra/cargo-guppy --rev 8b2bc45c0cd6323a7a2b8170ddad6d2a5b79047b + [[ $CIRCLE_NODE_INDEX =~ [1234] ]] || [[ -z $($CARGO guppy dups --target x86_64-unknown-linux-gnu --kind directthirdparty) ]] - run: name: Build Release command: | - [[ $CIRCLE_NODE_INDEX =~ [0234] ]] || RUST_BACKTRACE=1 cargo build -j 16 --release + [[ $CIRCLE_NODE_INDEX =~ [0234] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 --release - run: name: Build Dev command: | - [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 - [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p libra-swarm - [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p cluster-test - [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p libra-fuzzer - [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p language_benchmarks - [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p cost-synthesis - [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 cargo build -j 16 -p test-generation + [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 + [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p libra-swarm + [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p cluster-test + [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p libra-fuzzer + [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p language_benchmarks + [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p cost-synthesis + [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CARGO build -j 16 -p test-generation - run: name: Run All Non Flaky Unit Tests command: | - [[ $CIRCLE_NODE_INDEX =~ [0134] ]] || RUST_BACKTRACE=1 $CI_TIMEOUT cargo test --all-features --workspace --exclude libra-node --exclude libra-crypto --exclude testsuite --exclude consensus + [[ $CIRCLE_NODE_INDEX =~ [0134] ]] || RUST_BACKTRACE=1 $CI_TIMEOUT $CARGO test --all-features --workspace --exclude libra-node --exclude libra-crypto --exclude testsuite --exclude consensus - run: name: Run Cryptography Unit Tests with the formally verified backend command: | - [[ $CIRCLE_NODE_INDEX =~ [0134] ]] || ( RUST_BACKTRACE=1 cd crypto/crypto && $CI_TIMEOUT cargo test --features='std fiat_u64_backend fuzzing' --no-default-features ) + [[ $CIRCLE_NODE_INDEX =~ [0134] ]] || ( RUST_BACKTRACE=1 cd crypto/crypto && $CI_TIMEOUT $CARGO test --features='std fiat_u64_backend fuzzing' --no-default-features ) - run: name: Run All End to End Tests command: | - [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CI_TIMEOUT cargo x test --package testsuite -- --test-threads 1 + [[ $CIRCLE_NODE_INDEX =~ [0124] ]] || RUST_BACKTRACE=1 $CI_TIMEOUT $CARGO x test --package testsuite -- --test-threads 1 - run: name: Run Quarantined Unit Tests 3 (consensus) times command: | @@ -155,16 +143,16 @@ jobs: steps: - build_setup - run: - name: Install Cargo Audit + name: Install cargo-audit command: | - cargo install --force cargo-audit + $CARGO install --force cargo-audit - run: # NOTE ignored advisory rules # RUSTSEC-2018-0015 - term # RUSTSEC-2019-0031 - spin name: Audit crates command: | - cargo audit --deny-warnings \ + $CARGO audit --deny-warnings \ --ignore RUSTSEC-2018-0015 \ --ignore RUSTSEC-2019-0031 - build_teardown @@ -174,7 +162,6 @@ jobs: steps: - build_setup - install_code_coverage_deps - - install_rust_nightly_toolchain - run: name: Setup code coverage output command: echo "export CODECOV_OUTPUT=codecov" >> $BASH_ENV diff --git a/Cargo.lock b/Cargo.lock index 5fb7c720d62f..d1f84e558e6a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,13 +52,17 @@ dependencies = [ "libra-crypto 0.1.0", "libra-logger 0.1.0", "libra-mempool 0.1.0", + "libra-proptest-helpers 0.1.0", + "libra-prost-ext 0.1.0", "libra-types 0.1.0", "once_cell 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "prometheus 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proptest 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", "prost 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", "storage-client 0.1.0", + "storage-service 0.1.0", "tokio 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "tonic 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "vm-validator 0.1.0", diff --git a/Cargo.toml b/Cargo.toml index 14c119346d16..40c7387fb169 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -108,7 +108,8 @@ members = [ # NOTE: These members should never include crates that require fuzzing # features or test features. These are the crates we want built with no extra -# test-only code included. +# test-only code included. These are essentially the main libra release +# binaries. default-members = [ "client/cli", "language/compiler", diff --git a/admission_control/admission-control-service/Cargo.toml b/admission_control/admission-control-service/Cargo.toml index c5a1b0969583..feaf7537f6d3 100644 --- a/admission_control/admission-control-service/Cargo.toml +++ b/admission_control/admission-control-service/Cargo.toml @@ -32,6 +32,12 @@ serde_json = "1.0" [dev-dependencies] assert_matches = "1.3.0" +proptest = "0.9.4" +libra-mempool = { path = "../../mempool", version = "0.1.0", features = ["fuzzing"] } +libra-proptest-helpers = { path = "../../common/proptest-helpers" } +libra-prost-ext = { path = "../../common/prost-ext", version = "0.1.0" } +libra-types = { path = "../../types", version = "0.1.0", features = ["fuzzing"] } +storage-service = { path = "../../storage/storage-service" } vm-validator = { path = "../../vm-validator", version = "0.1.0" } [features] diff --git a/client/cli/Cargo.toml b/client/cli/Cargo.toml index f81436c33f88..b3331334661a 100644 --- a/client/cli/Cargo.toml +++ b/client/cli/Cargo.toml @@ -42,6 +42,7 @@ transaction-builder = { path = "../../language/transaction-builder", version = " [dev-dependencies] proptest = "0.9.2" +libra-crypto = { path = "../../crypto/crypto", version = "0.1.0", features = ["fuzzing"] } [features] default = [] diff --git a/config/Cargo.toml b/config/Cargo.toml index fcd970fb3367..1fc9491e3de2 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -29,6 +29,9 @@ libra-logger = { path = "../common/logger", version = "0.1.0" } libra-temppath = { path = "../common/temppath", version = "0.1.0" } libra-types = { path = "../types", version = "0.1.0" } +[dev-dependencies] +libra-crypto = { path = "../crypto/crypto", version = "0.1.0", features = ["fuzzing"] } + [features] default = [] fuzzing = ["libra-crypto/fuzzing", "libra-types/fuzzing"] diff --git a/consensus/Cargo.toml b/consensus/Cargo.toml index 34bdf629e471..593f1ff37e25 100644 --- a/consensus/Cargo.toml +++ b/consensus/Cargo.toml @@ -31,7 +31,7 @@ prometheus = { version = "0.8.0", default-features = false } proptest = { version = "0.9.4", optional = true } channel = { path = "../common/channel", version = "0.1.0" } -consensus-types = { path = "consensus-types", version = "0.1.0", default-features = false } +consensus-types = { path = "consensus-types", version = "0.1.0" } crash-handler = { path = "../common/crash-handler", version = "0.1.0" } debug-interface = { path = "../common/debug-interface", version = "0.1.0" } executor = { path = "../execution/executor", version = "0.1.0" } @@ -57,6 +57,9 @@ cached = "0.12.0" proptest = "0.9.4" tempfile = "3.1.0" +consensus-types = { path = "consensus-types", version = "0.1.0", features = ["fuzzing"] } +libra-config = { path = "../config", version = "0.1.0", features = ["fuzzing"] } +libra-mempool = { path = "../mempool", version = "0.1.0", features = ["fuzzing"] } vm-genesis = { path = "../language/tools/vm-genesis", version = "0.1.0" } vm-validator = { path = "../vm-validator", version = "0.1.0" } diff --git a/consensus/consensus-types/Cargo.toml b/consensus/consensus-types/Cargo.toml index df633107a571..dc495a5ae330 100644 --- a/consensus/consensus-types/Cargo.toml +++ b/consensus/consensus-types/Cargo.toml @@ -21,6 +21,7 @@ libra-types = { path = "../../types", version = "0.1.0" } [dev-dependencies] proptest = "0.9.4" +libra-types = { path = "../../types", version = "0.1.0", features = ["fuzzing"] } [features] default = [] diff --git a/consensus/safety-rules/Cargo.toml b/consensus/safety-rules/Cargo.toml index 2cab5a96ae40..dfdbcd8aeaf6 100644 --- a/consensus/safety-rules/Cargo.toml +++ b/consensus/safety-rules/Cargo.toml @@ -28,6 +28,8 @@ workspace-builder = { path = "../../common/workspace-builder", version = "0.1.0" criterion = "0.3" rand = { version = "0.6.5", default-features = false } tempfile = "3.1.0" +consensus-types = { path = "../consensus-types", version = "0.1.0", features = ["fuzzing"] } +libra-config = { path = "../../config", version = "0.1.0", features = ["fuzzing"] } [[bench]] name = "safety_rules" diff --git a/consensus/src/chained_bft/chained_bft_smr_test.rs b/consensus/src/chained_bft/chained_bft_smr_test.rs index 6f2fe2e15f7d..68e7bbb52179 100644 --- a/consensus/src/chained_bft/chained_bft_smr_test.rs +++ b/consensus/src/chained_bft/chained_bft_smr_test.rs @@ -44,7 +44,6 @@ struct SMRNode { commit_cb_receiver: mpsc::UnboundedReceiver, storage: Arc>, state_sync: mpsc::UnboundedReceiver>, - shared_mempool: MockSharedMempool, } impl SMRNode { @@ -101,7 +100,6 @@ impl SMRNode { commit_cb_receiver, storage, state_sync, - shared_mempool, } } diff --git a/consensus/src/chained_bft/event_processor_test.rs b/consensus/src/chained_bft/event_processor_test.rs index a624c5514e7c..4f74ff9d6def 100644 --- a/consensus/src/chained_bft/event_processor_test.rs +++ b/consensus/src/chained_bft/event_processor_test.rs @@ -65,7 +65,6 @@ pub struct NodeSetup { storage: Arc>, signer: ValidatorSigner, proposer_author: Author, - validators: Arc, safety_rules_manager: SafetyRulesManager, } @@ -199,7 +198,6 @@ impl NodeSetup { storage, signer, proposer_author, - validators, safety_rules_manager, } } diff --git a/consensus/src/chained_bft/test_utils/mod.rs b/consensus/src/chained_bft/test_utils/mod.rs index 541b9761cd0b..8d7024761cbf 100644 --- a/consensus/src/chained_bft/test_utils/mod.rs +++ b/consensus/src/chained_bft/test_utils/mod.rs @@ -61,20 +61,6 @@ pub fn build_simple_tree() -> ( (vec![genesis_block, a1, a2, a3, b1, b2, c1], block_store) } -pub fn build_chain() -> Vec>> { - let mut inserter = TreeInserter::default(); - let block_store = inserter.block_store(); - let genesis = block_store.root(); - let a1 = inserter.insert_block_with_qc(certificate_for_genesis(), &genesis, 1); - let a2 = inserter.insert_block(&a1, 2, None); - let a3 = inserter.insert_block(&a2, 3, Some(genesis.block_info())); - let a4 = inserter.insert_block(&a3, 4, Some(a1.block_info())); - let a5 = inserter.insert_block(&a4, 5, Some(a2.block_info())); - let a6 = inserter.insert_block(&a5, 6, Some(a3.block_info())); - let a7 = inserter.insert_block(&a6, 7, Some(a4.block_info())); - vec![genesis, a1, a2, a3, a4, a5, a6, a7] -} - pub fn build_empty_tree() -> Arc> { let (initial_data, storage) = EmptyStorage::start_for_testing(); Arc::new(BlockStore::new( diff --git a/execution/executor/Cargo.toml b/execution/executor/Cargo.toml index a6ee38fd5d8d..1c61bafd668e 100644 --- a/execution/executor/Cargo.toml +++ b/execution/executor/Cargo.toml @@ -42,7 +42,8 @@ executor-utils = { path = "../executor-utils", version = "0.1.0" } storage-service = { path = "../../storage/storage-service", version = "0.1.0" } stdlib = { path = "../../language/stdlib", version = "0.1.0" } transaction-builder = { path = "../../language/transaction-builder", version = "0.1.0" } - +libra-config = { path = "../../config", version = "0.1.0", features = ["fuzzing"] } +libra-types = { path = "../../types", version = "0.1.0", features = ["fuzzing"] } vm-genesis = { path = "../../language/tools/vm-genesis", version = "0.1.0" } [features] diff --git a/json-rpc/Cargo.toml b/json-rpc/Cargo.toml index 1b0f6d1e4b13..4a74cc53a492 100644 --- a/json-rpc/Cargo.toml +++ b/json-rpc/Cargo.toml @@ -37,6 +37,12 @@ libra-temppath = { path = "../common/temppath", version = "0.1.0", optional = tr storage-proto = { path = "../storage/storage-proto", version = "0.1.0" } [dev-dependencies] +proptest = "0.9.2" +reqwest = { version = "0.10.4", features = ["blocking", "json"], default_features = false } +libra-crypto = { path = "../crypto/crypto", version = "0.1.0" } +libra-temppath = { path = "../common/temppath", version = "0.1.0" } +libra-types = { path = "../types", version = "0.1.0", features = ["fuzzing"] } +libradb = { path = "../storage/libradb", version = "0.1.0", features = ["fuzzing"] } vm-validator = { path = "../vm-validator", version = "0.1.0" } [features] diff --git a/language/libra-vm/Cargo.toml b/language/libra-vm/Cargo.toml index bce064c7c3ef..44708853c214 100644 --- a/language/libra-vm/Cargo.toml +++ b/language/libra-vm/Cargo.toml @@ -36,6 +36,7 @@ serde = { version = "1.0.105", default-features = false } [dev-dependencies] proptest = "0.9" +libra-types = { path = "../../types", version = "0.1.0", features = ["fuzzing"] } [features] default = [] diff --git a/language/move-vm/types/Cargo.toml b/language/move-vm/types/Cargo.toml index 3f1a302620ba..c93cb26f1f12 100644 --- a/language/move-vm/types/Cargo.toml +++ b/language/move-vm/types/Cargo.toml @@ -24,6 +24,7 @@ move-core-types = { path = "../../move-core/types", version = "0.1.0" } [dev-dependencies] proptest = "0.9" +vm = { path = "../../vm", version = "0.1.0", features = ["fuzzing"] } [features] default = [] diff --git a/language/vm/Cargo.toml b/language/vm/Cargo.toml index 80746108b546..68fd2fb8eb3f 100644 --- a/language/vm/Cargo.toml +++ b/language/vm/Cargo.toml @@ -30,8 +30,9 @@ num-variants = { path = "../../common/num-variants", version = "0.1.0" } [dev-dependencies] proptest = "0.9" proptest-derive = "0.1.1" -libra-proptest-helpers = { path = "../../common/proptest-helpers", version = "0.1.0" } serde_json = "1" +libra-proptest-helpers = { path = "../../common/proptest-helpers", version = "0.1.0" } +libra-types = { path = "../../types", version = "0.1.0", features = ["fuzzing"] } [features] default = [] diff --git a/mempool/Cargo.toml b/mempool/Cargo.toml index b4ec36376e85..f50c622c77ab 100644 --- a/mempool/Cargo.toml +++ b/mempool/Cargo.toml @@ -44,6 +44,7 @@ storage-service = { path = "../storage/storage-service", version = "0.1.0", opti [dev-dependencies] parity-multiaddr = { version = "0.7.2", default-features = false } rand = "0.6.5" +storage-service = { path = "../storage/storage-service", version = "0.1.0", features = ["fuzzing"] } [build-dependencies] tonic-build = "0.1" diff --git a/mempool/src/lib.rs b/mempool/src/lib.rs index d53951f9e1cc..c7a33f82334a 100644 --- a/mempool/src/lib.rs +++ b/mempool/src/lib.rs @@ -60,7 +60,7 @@ extern crate prometheus; /// This module provides mocks of shared mempool for tests. -#[cfg(feature = "fuzzing")] +#[cfg(any(test, feature = "fuzzing"))] pub mod mocks; pub use shared_mempool::{ bootstrap, generate_reconfig_subscription, CommitNotification, CommitResponse, diff --git a/network/Cargo.toml b/network/Cargo.toml index 3a235d2f65ab..aba7f5c9c82d 100644 --- a/network/Cargo.toml +++ b/network/Cargo.toml @@ -43,6 +43,9 @@ proptest = { version = "0.9.4", default-features = true, optional = true } [dev-dependencies] criterion = "=0.3.1" noise = { path = "noise", version = "0.1.0", features = ["testing"] } +proptest = { version = "0.9.4", default-features = false } +libra-proptest-helpers = { path = "../common/proptest-helpers", version = "0.1.0" } +libra-types = { path = "../types", version = "0.1.0", features = ["fuzzing"] } socket-bench-server = { path = "socket-bench-server", version = "0.1.0" } [features] diff --git a/secure/storage/Cargo.toml b/secure/storage/Cargo.toml index fe0825fba95f..a90b8fa878aa 100644 --- a/secure/storage/Cargo.toml +++ b/secure/storage/Cargo.toml @@ -24,6 +24,7 @@ toml = { version = "0.5.3", default-features = false } [dev-dependencies] libra-config = { path = "../../config", version = "0.1.0" } +libra-crypto = { path = "../../crypto/crypto", version = "0.1.0", features = ["fuzzing"] } rand = "0.6.5" [features] diff --git a/state-synchronizer/Cargo.toml b/state-synchronizer/Cargo.toml index 9db3c187591a..a4d1e597dc10 100644 --- a/state-synchronizer/Cargo.toml +++ b/state-synchronizer/Cargo.toml @@ -38,6 +38,7 @@ bytes = "0.5.4" config-builder = { path = "../config/config-builder", version = "0.1.0" } libra-crypto = { path = "../crypto/crypto", version = "0.1.0" } +libra-mempool = { path = "../mempool", version = "0.1.0", features = ["fuzzing"] } parity-multiaddr = "0.7.2" vm-genesis = { path = "../language/tools/vm-genesis", version = "0.1.0" } transaction-builder = { path = "../language/transaction-builder", version = "0.1.0" } diff --git a/storage/accumulator/Cargo.toml b/storage/accumulator/Cargo.toml index 64ba45ec4e9c..65eb149752d1 100644 --- a/storage/accumulator/Cargo.toml +++ b/storage/accumulator/Cargo.toml @@ -18,6 +18,7 @@ libra-types = { path = "../../types", version = "0.1.0" } [dev-dependencies] rand = "0.6.5" proptest = "0.9.1" +libra-crypto = { path = "../../crypto/crypto", version = "0.1.0", features = ["fuzzing"] } [features] default = [] diff --git a/storage/jellyfish-merkle/Cargo.toml b/storage/jellyfish-merkle/Cargo.toml index 7d07d082929e..ab8bf303cc75 100644 --- a/storage/jellyfish-merkle/Cargo.toml +++ b/storage/jellyfish-merkle/Cargo.toml @@ -30,6 +30,9 @@ libra-types = { path = "../../types", version = "0.1.0" } rand = "0.6.5" proptest = "0.9.2" proptest-derive = "0.1.2" +libra-crypto = { path = "../../crypto/crypto", version = "0.1.0", features = ["fuzzing"] } +libra-nibble = { path = "../../common/nibble", version = "0.1.0", features = ["fuzzing"] } +libra-types = { path = "../../types", version = "0.1.0", features = ["fuzzing"] } [features] default = [] diff --git a/storage/libradb/Cargo.toml b/storage/libradb/Cargo.toml index 189f194c66a8..a2fd875959e5 100644 --- a/storage/libradb/Cargo.toml +++ b/storage/libradb/Cargo.toml @@ -41,7 +41,10 @@ libra-temppath = { path = "../../common/temppath", version = "0.1.0", optional = [dev-dependencies] proptest = "0.9.2" proptest-derive = "0.1.2" +jellyfish-merkle = { path = "../jellyfish-merkle", version = "0.1.0", features = ["fuzzing"] } libra-proptest-helpers = { path = "../../common/proptest-helpers", version = "0.1.0" } +libra-temppath = { path = "../../common/temppath", version = "0.1.0" } +libra-types = { path = "../../types", version = "0.1.0", features = ["fuzzing"] } [features] default = [] diff --git a/storage/storage-proto/Cargo.toml b/storage/storage-proto/Cargo.toml index 9a10ab40d56f..aa39a3dfbfe9 100644 --- a/storage/storage-proto/Cargo.toml +++ b/storage/storage-proto/Cargo.toml @@ -23,7 +23,9 @@ libra-types = { path = "../../types", version = "0.1.0" } tonic-build = "0.1" [dev-dependencies] +libra-crypto = { path = "../../crypto/crypto", version = "0.1.0", features = ["fuzzing"] } libra-prost-ext = { path = "../../common/prost-ext", version = "0.1.0" } +libra-types = { path = "../../types", version = "0.1.0", features = ["fuzzing"] } proptest = "0.9.2" proptest-derive = "0.1.0" diff --git a/storage/storage-service/Cargo.toml b/storage/storage-service/Cargo.toml index 336a8778003c..c1e697b047c2 100644 --- a/storage/storage-service/Cargo.toml +++ b/storage/storage-service/Cargo.toml @@ -30,8 +30,10 @@ storage-client = { path = "../storage-client", version = "0.1.0", optional = tru [dev-dependencies] itertools = "0.9.0" -libra-temppath = { path = "../../common/temppath", version = "0.1.0" } proptest = "0.9.2" +libradb = { path = "../libradb", version = "0.1.0", features = ["fuzzing"] } +libra-temppath = { path = "../../common/temppath", version = "0.1.0" } +storage-client = { path = "../storage-client", version = "0.1.0" } [features] default = [] diff --git a/types/Cargo.toml b/types/Cargo.toml index 5643db26bb42..46c50f862aec 100644 --- a/types/Cargo.toml +++ b/types/Cargo.toml @@ -40,6 +40,7 @@ prost-build = "0.6" regex = "1.3.6" proptest = "0.9.4" proptest-derive = "0.1.2" +libra-crypto = { path = "../crypto/crypto", version = "0.1.0", features = ["fuzzing"] } libra-proptest-helpers = { path = "../common/proptest-helpers", version = "0.1.0" } libra-prost-ext = { path = "../common/prost-ext", version = "0.1.0" } diff --git a/types/src/event.rs b/types/src/event.rs index 0acea4aab983..443929b088cf 100644 --- a/types/src/event.rs +++ b/types/src/event.rs @@ -132,7 +132,7 @@ impl EventHandle { self.count } - #[cfg(feature = "fuzzing")] + #[cfg(any(test, feature = "fuzzing"))] pub fn count_mut(&mut self) -> &mut u64 { &mut self.count } @@ -146,7 +146,7 @@ impl EventHandle { } } - #[cfg(feature = "fuzzing")] + #[cfg(any(test, feature = "fuzzing"))] /// Derive a unique handle by using an AccountAddress and a counter. pub fn new_from_address(addr: &AccountAddress, salt: u64) -> Self { Self { diff --git a/vm-validator/Cargo.toml b/vm-validator/Cargo.toml index 12ac9001a9a6..dc2abc6b677c 100644 --- a/vm-validator/Cargo.toml +++ b/vm-validator/Cargo.toml @@ -27,8 +27,9 @@ rand = "0.6.5" config-builder = { path = "../config/config-builder", version = "0.1.0" } libra-crypto = { path = "../crypto/crypto", version = "0.1.0" } executor = { path = "../execution/executor", version = "0.1.0" } +libra-types = { path = "../types", version = "0.1.0" } +libra-vm = { path = "../language/libra-vm", version = "0.1.0", features = ["fuzzing"] } storage-service = { path = "../storage/storage-service", version = "0.1.0" } -libra-vm = { path = "../language/libra-vm", version = "0.1.0" } transaction-builder = { path = "../language/transaction-builder", version = "0.1.0" } [features]