Persistent beacon state (consensus/types)

This commit is contained in:
Michael Sproul
2021-11-24 17:21:01 +11:00
parent 0b319d4926
commit 1b4dad0d76
7 changed files with 237 additions and 107 deletions

218
Cargo.lock generated
View File

@@ -298,9 +298,9 @@ dependencies = [
"eth1",
"eth2",
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz_types",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fork_choice",
"futures",
"genesis",
@@ -331,7 +331,7 @@ dependencies = [
"task_executor",
"tempfile",
"tokio",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
]
@@ -450,14 +450,14 @@ dependencies = [
"blst",
"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_ssz",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1",
"hex",
"milagro_bls",
"rand 0.7.3",
"serde",
"serde_derive",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zeroize",
]
@@ -480,7 +480,7 @@ dependencies = [
"beacon_node",
"clap",
"clap_utils",
"eth2_ssz",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hex",
"lighthouse_network",
"log",
@@ -581,14 +581,14 @@ name = "cached_tree_hash"
version = "0.1.0"
dependencies = [
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz_types",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1",
"quickcheck",
"quickcheck_macros",
"smallvec",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -681,7 +681,7 @@ dependencies = [
"clap",
"dirs",
"eth2_network_config",
"eth2_ssz",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"hex",
]
@@ -1072,13 +1072,13 @@ checksum = "b72465f46d518f6015d9cf07f7f3013a95dd6b9c2747c3d65ae0cce43929d14f"
name = "deposit_contract"
version = "0.2.0"
dependencies = [
"eth2_ssz",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethabi 12.0.0",
"hex",
"reqwest",
"serde_json",
"sha2",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
]
@@ -1270,8 +1270,8 @@ dependencies = [
"compare_fields",
"compare_fields_derive",
"derivative",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1",
"fs2",
"hex",
@@ -1284,8 +1284,8 @@ dependencies = [
"state_processing",
"store",
"swap_or_not_shuffle",
"tree_hash",
"tree_hash_derive",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tree_hash_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
]
@@ -1413,8 +1413,8 @@ dependencies = [
"environment",
"eth1_test_rig",
"eth2",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fallback",
"futures",
"hex",
@@ -1432,7 +1432,7 @@ dependencies = [
"task_executor",
"tokio",
"toml",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
"web3",
]
@@ -1456,8 +1456,8 @@ dependencies = [
"bytes",
"eth2_keystore",
"eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"futures",
"futures-util",
"libsecp256k1 0.6.0",
@@ -1561,7 +1561,7 @@ version = "0.2.0"
dependencies = [
"enr",
"eth2_config",
"eth2_ssz",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml",
"tempfile",
"types",
@@ -1593,7 +1593,17 @@ dependencies = [
name = "eth2_ssz"
version = "0.4.0"
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",
"smallvec",
]
@@ -1608,18 +1618,45 @@ dependencies = [
"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]]
name = "eth2_ssz_types"
version = "0.2.1"
dependencies = [
"arbitrary",
"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_derive",
"serde_json",
"tree_hash",
"tree_hash_derive",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"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",
]
@@ -1884,8 +1921,8 @@ name = "fork_choice"
version = "0.1.0"
dependencies = [
"beacon_chain",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"proto_array",
"store",
"types",
@@ -2047,7 +2084,7 @@ dependencies = [
"eth1",
"eth1_test_rig",
"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",
"int_to_bytes",
"merkle_proof",
@@ -2056,7 +2093,7 @@ dependencies = [
"slog",
"state_processing",
"tokio",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
]
@@ -2329,7 +2366,7 @@ dependencies = [
"environment",
"eth1",
"eth2",
"eth2_ssz",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"futures",
"hex",
"lazy_static",
@@ -2345,7 +2382,7 @@ dependencies = [
"store",
"tokio",
"tokio-stream",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
"warp",
"warp_utils",
@@ -2670,7 +2707,7 @@ dependencies = [
"eth1_test_rig",
"eth2",
"eth2_network_config",
"eth2_ssz",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_wallet",
"genesis",
"lighthouse_network",
@@ -2681,7 +2718,7 @@ dependencies = [
"serde_json",
"serde_yaml",
"state_processing",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
"validator_dir",
"web3",
@@ -3215,9 +3252,9 @@ dependencies = [
"dirs",
"discv5",
"error-chain",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz_types",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"exit-future",
"fnv",
"futures",
@@ -3240,7 +3277,7 @@ dependencies = [
"smallvec",
"snap",
"strum",
"superstruct",
"superstruct 0.2.0",
"task_executor",
"tempfile",
"tiny-keccak 2.0.2",
@@ -3435,6 +3472,19 @@ dependencies = [
"zeroize",
]
[[package]]
name = "milhouse"
version = "0.1.0"
dependencies = [
"derivative",
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot",
"serde",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"typenum",
]
[[package]]
name = "mime"
version = "0.3.16"
@@ -3611,8 +3661,8 @@ dependencies = [
"beacon_chain",
"environment",
"error-chain",
"eth2_ssz",
"eth2_ssz_types",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"exit-future",
"fnv",
"futures",
@@ -3876,8 +3926,8 @@ version = "0.2.0"
dependencies = [
"beacon_chain",
"derivative",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools",
"lazy_static",
"lighthouse_metrics",
@@ -4387,8 +4437,8 @@ dependencies = [
name = "proto_array"
version = "0.2.0"
dependencies = [
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde",
"serde_derive",
"serde_yaml",
@@ -5229,8 +5279,8 @@ version = "0.1.0"
dependencies = [
"bincode",
"byteorder",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"filesystem",
"flate2",
"lazy_static",
@@ -5248,8 +5298,8 @@ dependencies = [
"slog",
"sloggers",
"tempfile",
"tree_hash",
"tree_hash_derive",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tree_hash_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
]
@@ -5508,8 +5558,8 @@ dependencies = [
"bls",
"env_logger 0.9.0",
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz",
"eth2_ssz_types",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"int_to_bytes",
"integer-sqrt",
"itertools",
@@ -5519,7 +5569,7 @@ dependencies = [
"rayon",
"safe_arith",
"smallvec",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
]
@@ -5528,7 +5578,7 @@ name = "state_transition_vectors"
version = "0.1.0"
dependencies = [
"beacon_chain",
"eth2_ssz",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static",
"state_processing",
"types",
@@ -5547,8 +5597,8 @@ dependencies = [
"beacon_chain",
"db-key",
"directory",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"itertools",
"lazy_static",
"leveldb",
@@ -5603,6 +5653,17 @@ version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
[[package]]
name = "superstruct"
version = "0.1.0"
dependencies = [
"darling 0.13.0",
"itertools",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "superstruct"
version = "0.2.0"
@@ -6093,15 +6154,26 @@ version = "0.4.0"
dependencies = [
"beacon_chain",
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1",
"rand 0.7.3",
"smallvec",
"tree_hash_derive",
"tree_hash_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"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]]
name = "tree_hash_derive"
version = "0.4.0"
@@ -6111,6 +6183,17 @@ dependencies = [
"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]]
name = "trust-dns-proto"
version = "0.20.3"
@@ -6211,15 +6294,16 @@ dependencies = [
"eth2_hashing 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_interop_keypairs",
"eth2_serde_utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz",
"eth2_ssz_derive",
"eth2_ssz_types",
"eth2_ssz 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"eth2_ssz_types 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"ethereum-types 0.12.1",
"hex",
"int_to_bytes",
"itertools",
"lazy_static",
"log",
"milhouse",
"parking_lot",
"rand 0.7.3",
"rand_xorshift",
@@ -6232,12 +6316,12 @@ dependencies = [
"serde_yaml",
"slog",
"state_processing",
"superstruct",
"superstruct 0.1.0",
"swap_or_not_shuffle",
"tempfile",
"test_random_derive",
"tree_hash",
"tree_hash_derive",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tree_hash_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -6426,7 +6510,7 @@ dependencies = [
"task_executor",
"tempfile",
"tokio",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
"url",
"validator_dir",
@@ -6447,7 +6531,7 @@ dependencies = [
"lockfile",
"rand 0.7.3",
"tempfile",
"tree_hash",
"tree_hash 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"types",
]