rename zebra-test-vectors to zebra-test
This commit is contained in:
parent
1c42b66a4f
commit
e8561d8f9e
|
@ -42,9 +42,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "addr2line"
|
||||
version = "0.12.1"
|
||||
version = "0.12.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a49806b9dadc843c61e7c97e72490ad7f7220ae249012fbda9ad0609457c0543"
|
||||
checksum = "602d785912f476e480434627e8732e6766b760c045bbf897d9dfaa9f4fbd399c"
|
||||
dependencies = [
|
||||
"gimli",
|
||||
]
|
||||
|
@ -57,9 +57,9 @@ checksum = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d"
|
|||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "0.7.10"
|
||||
version = "0.7.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada"
|
||||
checksum = "c259a748ac706ba73d609b73fc13469e128337f9a6b2fb3cc82d100f8dd8d511"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
@ -423,9 +423,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "dtoa"
|
||||
version = "0.4.5"
|
||||
version = "0.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3"
|
||||
checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b"
|
||||
|
||||
[[package]]
|
||||
name = "ed25519-zebra"
|
||||
|
@ -804,9 +804,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "0.4.5"
|
||||
version = "0.4.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e"
|
||||
checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
|
||||
|
||||
[[package]]
|
||||
name = "jubjub"
|
||||
|
@ -1657,9 +1657,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "signal-hook"
|
||||
version = "0.1.15"
|
||||
version = "0.1.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ff2db2112d6c761e12522c65f7768548bd6e8cd23d2a9dae162520626629bd6"
|
||||
checksum = "604508c1418b99dfe1925ca9224829bb2a8a9a04dda655cc01fcad46f4ab05ed"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"signal-hook-registry",
|
||||
|
@ -2329,7 +2329,7 @@ dependencies = [
|
|||
"sha2",
|
||||
"thiserror",
|
||||
"x25519-dalek",
|
||||
"zebra-test-vectors",
|
||||
"zebra-test",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2350,7 +2350,7 @@ dependencies = [
|
|||
"tracing-subscriber",
|
||||
"zebra-chain",
|
||||
"zebra-state",
|
||||
"zebra-test-vectors",
|
||||
"zebra-test",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -2408,11 +2408,11 @@ dependencies = [
|
|||
"tracing-futures",
|
||||
"tracing-subscriber",
|
||||
"zebra-chain",
|
||||
"zebra-test-vectors",
|
||||
"zebra-test",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zebra-test-vectors"
|
||||
name = "zebra-test"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"hex",
|
||||
|
|
|
@ -8,7 +8,7 @@ members = [
|
|||
"zebra-consensus",
|
||||
"zebra-rpc",
|
||||
"zebra-client",
|
||||
"zebra-test-vectors",
|
||||
"zebra-test",
|
||||
"zebrad",
|
||||
]
|
||||
|
||||
|
|
|
@ -33,4 +33,4 @@ redjubjub = "0.1"
|
|||
[dev-dependencies]
|
||||
proptest = "0.10"
|
||||
proptest-derive = "0.2.0"
|
||||
zebra-test-vectors = { path = "../zebra-test-vectors/" }
|
||||
zebra-test = { path = "../zebra-test/" }
|
||||
|
|
|
@ -105,22 +105,22 @@ fn blockheaderhash_from_blockheader() {
|
|||
fn deserialize_blockheader() {
|
||||
// https://explorer.zcha.in/blocks/415000
|
||||
let _header =
|
||||
BlockHeader::zcash_deserialize(&zebra_test_vectors::HEADER_MAINNET_415000_BYTES[..])
|
||||
BlockHeader::zcash_deserialize(&zebra_test::vectors::HEADER_MAINNET_415000_BYTES[..])
|
||||
.expect("blockheader test vector should deserialize");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn deserialize_block() {
|
||||
Block::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_GENESIS_BYTES[..])
|
||||
Block::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_GENESIS_BYTES[..])
|
||||
.expect("block test vector should deserialize");
|
||||
Block::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_1_BYTES[..])
|
||||
Block::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_1_BYTES[..])
|
||||
.expect("block test vector should deserialize");
|
||||
// https://explorer.zcha.in/blocks/415000
|
||||
Block::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_415000_BYTES[..])
|
||||
Block::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_415000_BYTES[..])
|
||||
.expect("block test vector should deserialize");
|
||||
// https://explorer.zcha.in/blocks/434873
|
||||
// this one has a bad version field
|
||||
Block::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_434873_BYTES[..])
|
||||
Block::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_434873_BYTES[..])
|
||||
.expect("block test vector should deserialize");
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ mod tests {
|
|||
#[test]
|
||||
fn equihash_solution_test_vector() {
|
||||
let solution_bytes =
|
||||
&zebra_test_vectors::HEADER_MAINNET_415000_BYTES[EQUIHASH_SOLUTION_BLOCK_OFFSET..];
|
||||
&zebra_test::vectors::HEADER_MAINNET_415000_BYTES[EQUIHASH_SOLUTION_BLOCK_OFFSET..];
|
||||
let solution = EquihashSolution::zcash_deserialize(solution_bytes)
|
||||
.expect("Test vector EquihashSolution should deserialize");
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ futures-util = "0.3.5"
|
|||
tower = "0.3.1"
|
||||
|
||||
[dev-dependencies]
|
||||
zebra-test-vectors = { path = "../zebra-test-vectors/" }
|
||||
zebra-test = { path = "../zebra-test/" }
|
||||
spandoc = { git = "https://github.com/yaahc/spandoc.git" }
|
||||
tokio = { version = "0.2.21", features = ["full"] }
|
||||
tracing = "0.1.15"
|
||||
|
|
|
@ -166,7 +166,7 @@ mod tests {
|
|||
#[spandoc::spandoc]
|
||||
async fn checkpoint_single_item_list() -> Result<(), Report> {
|
||||
let block0 =
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?;
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?;
|
||||
let hash0: BlockHeaderHash = block0.as_ref().into();
|
||||
|
||||
// Make a checkpoint list containing only the genesis block
|
||||
|
@ -216,7 +216,7 @@ mod tests {
|
|||
#[spandoc::spandoc]
|
||||
async fn checkpoint_list_empty_fail() -> Result<(), Report> {
|
||||
let block0 =
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?;
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?;
|
||||
|
||||
let mut state_service = Box::new(zebra_state::in_memory::init());
|
||||
let mut checkpoint_verifier = super::init(
|
||||
|
@ -263,9 +263,9 @@ mod tests {
|
|||
#[spandoc::spandoc]
|
||||
async fn checkpoint_not_present_fail() -> Result<(), Report> {
|
||||
let block0 =
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?;
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?;
|
||||
let block415000 =
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_415000_BYTES[..])?;
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_415000_BYTES[..])?;
|
||||
|
||||
// Make a checkpoint list containing only the genesis block
|
||||
let genesis_checkpoint_list: HashMap<BlockHeight, BlockHeaderHash> =
|
||||
|
@ -332,7 +332,7 @@ mod tests {
|
|||
#[spandoc::spandoc]
|
||||
async fn checkpoint_wrong_hash_fail() -> Result<(), Report> {
|
||||
let block0 =
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?;
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?;
|
||||
|
||||
// Make a checkpoint list containing the genesis block height,
|
||||
// but use the wrong hash
|
||||
|
|
|
@ -131,7 +131,7 @@ mod tests {
|
|||
#[spandoc::spandoc]
|
||||
async fn verify() -> Result<(), Report> {
|
||||
let block =
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_415000_BYTES[..])?;
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_415000_BYTES[..])?;
|
||||
let hash: BlockHeaderHash = block.as_ref().into();
|
||||
|
||||
let state_service = Box::new(zebra_state::in_memory::init());
|
||||
|
@ -158,7 +158,7 @@ mod tests {
|
|||
#[spandoc::spandoc]
|
||||
async fn round_trip() -> Result<(), Report> {
|
||||
let block =
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_415000_BYTES[..])?;
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_415000_BYTES[..])?;
|
||||
let hash: BlockHeaderHash = block.as_ref().into();
|
||||
|
||||
let mut state_service = zebra_state::in_memory::init();
|
||||
|
@ -202,7 +202,7 @@ mod tests {
|
|||
install_tracing();
|
||||
|
||||
let block =
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_415000_BYTES[..])?;
|
||||
Arc::<Block>::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_415000_BYTES[..])?;
|
||||
let hash: BlockHeaderHash = block.as_ref().into();
|
||||
|
||||
let mut state_service = zebra_state::in_memory::init();
|
||||
|
|
|
@ -18,7 +18,7 @@ serde = { version = "1", features = ["serde_derive"] }
|
|||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "0.2.21", features = ["full"] }
|
||||
zebra-test-vectors = { path = "../zebra-test-vectors/" }
|
||||
zebra-test = { path = "../zebra-test" }
|
||||
spandoc = { git = "https://github.com/yaahc/spandoc.git" }
|
||||
tracing = "0.1.15"
|
||||
tracing-futures = "0.2.4"
|
||||
|
|
|
@ -146,7 +146,7 @@ mod tests {
|
|||
>,
|
||||
{
|
||||
let block: Arc<_> =
|
||||
Block::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_415000_BYTES[..])?.into();
|
||||
Block::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_415000_BYTES[..])?.into();
|
||||
let hash = block.as_ref().into();
|
||||
|
||||
let response = service
|
||||
|
@ -205,9 +205,9 @@ mod tests {
|
|||
install_tracing();
|
||||
|
||||
let block0: Arc<_> =
|
||||
Block::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?.into();
|
||||
Block::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_GENESIS_BYTES[..])?.into();
|
||||
let block1: Arc<_> =
|
||||
Block::zcash_deserialize(&zebra_test_vectors::BLOCK_MAINNET_1_BYTES[..])?.into();
|
||||
Block::zcash_deserialize(&zebra_test::vectors::BLOCK_MAINNET_1_BYTES[..])?.into();
|
||||
|
||||
let block0_hash: BlockHeaderHash = block0.as_ref().into();
|
||||
let block1_hash: BlockHeaderHash = block1.as_ref().into();
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
[package]
|
||||
name = "zebra-test-vectors"
|
||||
name = "zebra-test"
|
||||
version = "0.1.0"
|
||||
authors = ["Jane Lusby <jane@zfnd.org>"]
|
||||
authors = ["Zcash Foundation <zebra@zfnd.org>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
@ -0,0 +1 @@
|
|||
pub mod vectors;
|
Loading…
Reference in New Issue