diff --git a/Cargo.lock b/Cargo.lock index 3f96711d5db..c0fb9cb06e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5757,6 +5757,7 @@ dependencies = [ "jsonrpc-derive", "jsonrpc-http-server", "proptest", + "proptest-derive", "serde", "serde_json", "thiserror", diff --git a/zebra-consensus/Cargo.toml b/zebra-consensus/Cargo.toml index dcc53b6065d..b8f3a612f4e 100644 --- a/zebra-consensus/Cargo.toml +++ b/zebra-consensus/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [features] default = [] -proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl"] +proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl", "zebra-state/proptest-impl"] [dependencies] blake2b_simd = "1.0.0" diff --git a/zebra-consensus/src/checkpoint.rs b/zebra-consensus/src/checkpoint.rs index 7895e09d8a9..9678a907b27 100644 --- a/zebra-consensus/src/checkpoint.rs +++ b/zebra-consensus/src/checkpoint.rs @@ -495,7 +495,7 @@ where crate::block::check::equihash_solution_is_valid(&block.header)?; // don't do precalculation until the block passes basic difficulty checks - let block = FinalizedBlock::with_hash_and_height(block, hash, height); + let block = FinalizedBlock::with_hash(block, hash); crate::block::check::merkle_root_validity( self.network, diff --git a/zebra-rpc/Cargo.toml b/zebra-rpc/Cargo.toml index 22fbf11d629..4fa2d78c7e7 100644 --- a/zebra-rpc/Cargo.toml +++ b/zebra-rpc/Cargo.toml @@ -7,6 +7,10 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[features] +default = [] +proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl", "zebra-state/proptest-impl"] + [dependencies] zebra-chain = { path = "../zebra-chain" } zebra-network = { path = "../zebra-network" } @@ -35,8 +39,12 @@ tracing-futures = "0.2.5" hex = { version = "0.4.3", features = ["serde"] } serde = { version = "1.0.136", features = ["serde_derive"] } +proptest = { version = "0.10.1", optional = true } +proptest-derive = { version = "0.3.0", optional = true } + [dev-dependencies] proptest = "0.10.1" +proptest-derive = "0.3.0" serde_json = "1.0.79" thiserror = "1.0.30" tokio = { version = "1.16.1", features = ["full", "test-util"] } diff --git a/zebra-state/Cargo.toml b/zebra-state/Cargo.toml index bf82d2d8007..c10552e8b13 100644 --- a/zebra-state/Cargo.toml +++ b/zebra-state/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" edition = "2021" [features] -proptest-impl = ["proptest", "proptest-derive", "zebra-test"] +proptest-impl = ["proptest", "proptest-derive", "zebra-test", "zebra-chain/proptest-impl"] [dependencies] bincode = "1.3.3" diff --git a/zebrad/Cargo.toml b/zebrad/Cargo.toml index 1fb091ea82f..e2369516421 100644 --- a/zebrad/Cargo.toml +++ b/zebrad/Cargo.toml @@ -9,6 +9,16 @@ repository = "https://github.com/ZcashFoundation/zebra" # when run in the workspace directory default-run = "zebrad" +[features] +default = [] +proptest-impl = ["proptest", "proptest-derive", "zebra-chain/proptest-impl", "zebra-state/proptest-impl", "zebra-consensus/proptest-impl", "zebra-network/proptest-impl"] + +enable-sentry = [] +test_sync_to_mandatory_checkpoint_mainnet = [] +test_sync_to_mandatory_checkpoint_testnet = [] +test_sync_past_mandatory_checkpoint_mainnet = [] +test_sync_past_mandatory_checkpoint_testnet = [] + [dependencies] zebra-chain = { path = "../zebra-chain" } zebra-consensus = { path = "../zebra-consensus/" } @@ -53,6 +63,9 @@ sentry = { version = "0.23.0", default-features = false, features = ["backtrace" num-integer = "0.1.44" rand = { version = "0.8.5", package = "rand" } +proptest = { version = "0.10.1", optional = true } +proptest-derive = { version = "0.3.0", optional = true } + [build-dependencies] vergen = { version = "7.0.0", default-features = false, features = ["cargo", "git"] } @@ -74,10 +87,3 @@ zebra-consensus = { path = "../zebra-consensus/", features = ["proptest-impl"] } zebra-network = { path = "../zebra-network", features = ["proptest-impl"] } zebra-state = { path = "../zebra-state", features = ["proptest-impl"] } zebra-test = { path = "../zebra-test" } - -[features] -enable-sentry = [] -test_sync_to_mandatory_checkpoint_mainnet = [] -test_sync_to_mandatory_checkpoint_testnet = [] -test_sync_past_mandatory_checkpoint_mainnet = [] -test_sync_past_mandatory_checkpoint_testnet = []