Use published ssz/tree_hash (#2825)

## Proposed Changes

Switch over to the latest published versions of the crates in the SSZ/`tree_hash` family.

## Additional Info

The crates were published at the current head of `unstable`: 0b319d4926. All 5 crates listed in this PR were published via tags, e.g. https://github.com/sigp/lighthouse/releases/tag/tree-hash-v0.4.0
This commit is contained in:
Michael Sproul
2021-11-24 00:28:30 +00:00
parent c61fbf71a4
commit 3fb8162dcc
2 changed files with 124 additions and 70 deletions

189
Cargo.lock generated
View File

@@ -298,9 +298,9 @@ dependencies = [
"eth1", "eth1",
"eth2", "eth2",
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types", "eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fork_choice", "fork_choice",
"futures", "futures",
"genesis", "genesis",
@@ -331,7 +331,7 @@ dependencies = [
"task_executor", "task_executor",
"tempfile", "tempfile",
"tokio", "tokio",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
] ]
@@ -450,14 +450,14 @@ dependencies = [
"blst", "blst",
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1", "ethereum-types 0.12.1",
"hex", "hex",
"milagro_bls", "milagro_bls",
"rand 0.7.3", "rand 0.7.3",
"serde", "serde",
"serde_derive", "serde_derive",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zeroize", "zeroize",
] ]
@@ -480,7 +480,7 @@ dependencies = [
"beacon_node", "beacon_node",
"clap", "clap",
"clap_utils", "clap_utils",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hex", "hex",
"lighthouse_network", "lighthouse_network",
"log", "log",
@@ -581,14 +581,14 @@ name = "cached_tree_hash"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types", "eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1", "ethereum-types 0.12.1",
"quickcheck", "quickcheck",
"quickcheck_macros", "quickcheck_macros",
"smallvec", "smallvec",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -681,7 +681,7 @@ dependencies = [
"clap", "clap",
"dirs", "dirs",
"eth2_network_config", "eth2_network_config",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hex", "hex",
] ]
@@ -1072,13 +1072,13 @@ checksum = "b72465f46d518f6015d9cf07f7f3013a95dd6b9c2747c3d65ae0cce43929d14f"
name = "deposit_contract" name = "deposit_contract"
version = "0.2.0" version = "0.2.0"
dependencies = [ dependencies = [
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethabi 12.0.0", "ethabi 12.0.0",
"hex", "hex",
"reqwest", "reqwest",
"serde_json", "serde_json",
"sha2", "sha2",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
] ]
@@ -1270,8 +1270,8 @@ dependencies = [
"compare_fields", "compare_fields",
"compare_fields_derive", "compare_fields_derive",
"derivative", "derivative",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1", "ethereum-types 0.12.1",
"fs2", "fs2",
"hex", "hex",
@@ -1284,8 +1284,8 @@ dependencies = [
"state_processing", "state_processing",
"store", "store",
"swap_or_not_shuffle", "swap_or_not_shuffle",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tree_hash_derive", "tree_hash_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
] ]
@@ -1413,8 +1413,8 @@ dependencies = [
"environment", "environment",
"eth1_test_rig", "eth1_test_rig",
"eth2", "eth2",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fallback", "fallback",
"futures", "futures",
"hex", "hex",
@@ -1432,7 +1432,7 @@ dependencies = [
"task_executor", "task_executor",
"tokio", "tokio",
"toml", "toml",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
"web3", "web3",
] ]
@@ -1456,8 +1456,8 @@ dependencies = [
"bytes", "bytes",
"eth2_keystore", "eth2_keystore",
"eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"futures", "futures",
"futures-util", "futures-util",
"libsecp256k1 0.6.0", "libsecp256k1 0.6.0",
@@ -1561,7 +1561,7 @@ version = "0.2.0"
dependencies = [ dependencies = [
"enr", "enr",
"eth2_config", "eth2_config",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml", "serde_yaml",
"tempfile", "tempfile",
"types", "types",
@@ -1593,7 +1593,17 @@ dependencies = [
name = "eth2_ssz" name = "eth2_ssz"
version = "0.4.0" version = "0.4.0"
dependencies = [ dependencies = [
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1",
"smallvec",
]
[[package]]
name = "eth2_ssz"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "948e343aa022785c07193f41ed37adfd9dd0350368060803b8302c7f798e8306"
dependencies = [
"ethereum-types 0.12.1", "ethereum-types 0.12.1",
"smallvec", "smallvec",
] ]
@@ -1608,18 +1618,45 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "eth2_ssz_derive"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "635b86d2c941bb71e7419a571e1763d65c93e51a1bafc400352e3bef6ff59fc9"
dependencies = [
"darling 0.13.0",
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "eth2_ssz_types" name = "eth2_ssz_types"
version = "0.2.1" version = "0.2.1"
dependencies = [ dependencies = [
"arbitrary", "arbitrary",
"eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde", "serde",
"serde_derive", "serde_derive",
"serde_json", "serde_json",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tree_hash_derive", "tree_hash_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"typenum",
]
[[package]]
name = "eth2_ssz_types"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9423ac7fb37037f828a32b724cdfa65ea62290055811731402a90fb8a5bcbb1"
dependencies = [
"arbitrary",
"eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde",
"serde_derive",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"typenum", "typenum",
] ]
@@ -1884,8 +1921,8 @@ name = "fork_choice"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"beacon_chain", "beacon_chain",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proto_array", "proto_array",
"store", "store",
"types", "types",
@@ -2047,7 +2084,7 @@ dependencies = [
"eth1", "eth1",
"eth1_test_rig", "eth1_test_rig",
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"futures", "futures",
"int_to_bytes", "int_to_bytes",
"merkle_proof", "merkle_proof",
@@ -2056,7 +2093,7 @@ dependencies = [
"slog", "slog",
"state_processing", "state_processing",
"tokio", "tokio",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
] ]
@@ -2329,7 +2366,7 @@ dependencies = [
"environment", "environment",
"eth1", "eth1",
"eth2", "eth2",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"futures", "futures",
"hex", "hex",
"lazy_static", "lazy_static",
@@ -2345,7 +2382,7 @@ dependencies = [
"store", "store",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
"warp", "warp",
"warp_utils", "warp_utils",
@@ -2670,7 +2707,7 @@ dependencies = [
"eth1_test_rig", "eth1_test_rig",
"eth2", "eth2",
"eth2_network_config", "eth2_network_config",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_wallet", "eth2_wallet",
"genesis", "genesis",
"lighthouse_network", "lighthouse_network",
@@ -2681,7 +2718,7 @@ dependencies = [
"serde_json", "serde_json",
"serde_yaml", "serde_yaml",
"state_processing", "state_processing",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
"validator_dir", "validator_dir",
"web3", "web3",
@@ -3215,9 +3252,9 @@ dependencies = [
"dirs", "dirs",
"discv5", "discv5",
"error-chain", "error-chain",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types", "eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"exit-future", "exit-future",
"fnv", "fnv",
"futures", "futures",
@@ -3611,8 +3648,8 @@ dependencies = [
"beacon_chain", "beacon_chain",
"environment", "environment",
"error-chain", "error-chain",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types", "eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"exit-future", "exit-future",
"fnv", "fnv",
"futures", "futures",
@@ -3876,8 +3913,8 @@ version = "0.2.0"
dependencies = [ dependencies = [
"beacon_chain", "beacon_chain",
"derivative", "derivative",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools", "itertools",
"lazy_static", "lazy_static",
"lighthouse_metrics", "lighthouse_metrics",
@@ -4387,8 +4424,8 @@ dependencies = [
name = "proto_array" name = "proto_array"
version = "0.2.0" version = "0.2.0"
dependencies = [ dependencies = [
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde", "serde",
"serde_derive", "serde_derive",
"serde_yaml", "serde_yaml",
@@ -5229,8 +5266,8 @@ version = "0.1.0"
dependencies = [ dependencies = [
"bincode", "bincode",
"byteorder", "byteorder",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"filesystem", "filesystem",
"flate2", "flate2",
"lazy_static", "lazy_static",
@@ -5248,8 +5285,8 @@ dependencies = [
"slog", "slog",
"sloggers", "sloggers",
"tempfile", "tempfile",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tree_hash_derive", "tree_hash_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
] ]
@@ -5508,8 +5545,8 @@ dependencies = [
"bls", "bls",
"env_logger 0.9.0", "env_logger 0.9.0",
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types", "eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"int_to_bytes", "int_to_bytes",
"integer-sqrt", "integer-sqrt",
"itertools", "itertools",
@@ -5519,7 +5556,7 @@ dependencies = [
"rayon", "rayon",
"safe_arith", "safe_arith",
"smallvec", "smallvec",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
] ]
@@ -5528,7 +5565,7 @@ name = "state_transition_vectors"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"beacon_chain", "beacon_chain",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static", "lazy_static",
"state_processing", "state_processing",
"types", "types",
@@ -5547,8 +5584,8 @@ dependencies = [
"beacon_chain", "beacon_chain",
"db-key", "db-key",
"directory", "directory",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools", "itertools",
"lazy_static", "lazy_static",
"leveldb", "leveldb",
@@ -6093,15 +6130,26 @@ version = "0.4.0"
dependencies = [ dependencies = [
"beacon_chain", "beacon_chain",
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1", "ethereum-types 0.12.1",
"rand 0.7.3", "rand 0.7.3",
"smallvec", "smallvec",
"tree_hash_derive", "tree_hash_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
] ]
[[package]]
name = "tree_hash"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f9c8a86fad3169a65aad2265d3c6a8bc119d0b771046af3c1b2fb0e9b12182b"
dependencies = [
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1",
"smallvec",
]
[[package]] [[package]]
name = "tree_hash_derive" name = "tree_hash_derive"
version = "0.4.0" version = "0.4.0"
@@ -6111,6 +6159,17 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "tree_hash_derive"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cd22d128157837a4434bb51119aef11103f17bfe8c402ce688cf25aa1e608ad"
dependencies = [
"darling 0.13.0",
"quote",
"syn",
]
[[package]] [[package]]
name = "trust-dns-proto" name = "trust-dns-proto"
version = "0.20.3" version = "0.20.3"
@@ -6211,9 +6270,9 @@ dependencies = [
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_interop_keypairs", "eth2_interop_keypairs",
"eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz", "eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive", "eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types", "eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1", "ethereum-types 0.12.1",
"hex", "hex",
"int_to_bytes", "int_to_bytes",
@@ -6236,8 +6295,8 @@ dependencies = [
"swap_or_not_shuffle", "swap_or_not_shuffle",
"tempfile", "tempfile",
"test_random_derive", "test_random_derive",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tree_hash_derive", "tree_hash_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@@ -6426,7 +6485,7 @@ dependencies = [
"task_executor", "task_executor",
"tempfile", "tempfile",
"tokio", "tokio",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
"url", "url",
"validator_dir", "validator_dir",
@@ -6447,7 +6506,7 @@ dependencies = [
"lockfile", "lockfile",
"rand 0.7.3", "rand 0.7.3",
"tempfile", "tempfile",
"tree_hash", "tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types", "types",
] ]

View File

@@ -85,10 +85,5 @@ members = [
[patch] [patch]
[patch.crates-io] [patch.crates-io]
eth2_ssz = { path = "consensus/ssz" }
eth2_ssz_types = { path = "consensus/ssz_types" }
eth2_ssz_derive = { path = "consensus/ssz_derive" }
tree_hash = { path = "consensus/tree_hash" }
tree_hash_derive = { path = "consensus/tree_hash_derive" }
fixed-hash = { git = "https://github.com/paritytech/parity-common", rev="df638ab0885293d21d656dc300d39236b69ce57d" } fixed-hash = { git = "https://github.com/paritytech/parity-common", rev="df638ab0885293d21d656dc300d39236b69ce57d" }
warp = { git = "https://github.com/macladson/warp", rev ="7e75acc" } warp = { git = "https://github.com/macladson/warp", rev ="7e75acc" }