From 027f0a539d50004b4d81c89c7a0a84a5a365960b Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 3 Jul 2019 16:06:20 +1000 Subject: [PATCH] Prepare ssz for publishing on crates.io --- beacon_node/beacon_chain/Cargo.toml | 4 ++-- beacon_node/client/Cargo.toml | 2 +- beacon_node/eth2-libp2p/Cargo.toml | 4 ++-- beacon_node/http_server/Cargo.toml | 2 +- beacon_node/network/Cargo.toml | 2 +- beacon_node/rpc/Cargo.toml | 2 +- beacon_node/store/Cargo.toml | 4 ++-- eth2/lmd_ghost/Cargo.toml | 2 +- eth2/operation_pool/Cargo.toml | 4 ++-- eth2/state_processing/Cargo.toml | 6 +++--- eth2/types/Cargo.toml | 4 ++-- eth2/utils/bls/Cargo.toml | 2 +- eth2/utils/boolean-bitfield/Cargo.toml | 2 +- eth2/utils/boolean-bitfield/fuzz/Cargo.toml | 2 +- eth2/utils/fixed_len_vec/Cargo.toml | 2 +- eth2/utils/ssz/Cargo.toml | 10 +++++++--- eth2/utils/ssz/src/lib.rs | 2 +- eth2/utils/ssz_derive/Cargo.toml | 9 +++++---- eth2/validator_change/Cargo.toml | 2 +- tests/ef_tests/Cargo.toml | 2 +- validator_client/Cargo.toml | 2 +- 21 files changed, 38 insertions(+), 33 deletions(-) diff --git a/beacon_node/beacon_chain/Cargo.toml b/beacon_node/beacon_chain/Cargo.toml index b6f8d1ab8..793ce79cd 100644 --- a/beacon_node/beacon_chain/Cargo.toml +++ b/beacon_node/beacon_chain/Cargo.toml @@ -20,8 +20,8 @@ serde = "1.0" serde_derive = "1.0" serde_json = "1.0" slot_clock = { path = "../../eth2/utils/slot_clock" } -ssz = { path = "../../eth2/utils/ssz" } -ssz_derive = { path = "../../eth2/utils/ssz_derive" } +eth2_ssz = { path = "../../eth2/utils/ssz" } +eth2_ssz_derive = { path = "../../eth2/utils/ssz_derive" } state_processing = { path = "../../eth2/state_processing" } tree_hash = { path = "../../eth2/utils/tree_hash" } types = { path = "../../eth2/types" } diff --git a/beacon_node/client/Cargo.toml b/beacon_node/client/Cargo.toml index f97302a7c..7c8ee9c7c 100644 --- a/beacon_node/client/Cargo.toml +++ b/beacon_node/client/Cargo.toml @@ -19,7 +19,7 @@ serde = "1.0" serde_derive = "1.0" error-chain = "0.12.0" slog = "^2.2.3" -ssz = { path = "../../eth2/utils/ssz" } +eth2_ssz = { path = "../../eth2/utils/ssz" } tokio = "0.1.15" clap = "2.32.0" dirs = "1.0.3" diff --git a/beacon_node/eth2-libp2p/Cargo.toml b/beacon_node/eth2-libp2p/Cargo.toml index cc6393e38..ada5faebb 100644 --- a/beacon_node/eth2-libp2p/Cargo.toml +++ b/beacon_node/eth2-libp2p/Cargo.toml @@ -12,8 +12,8 @@ libp2p = { git = "https://github.com/SigP/rust-libp2p", rev = "b3c32d9a821ae6cc types = { path = "../../eth2/types" } serde = "1.0" serde_derive = "1.0" -ssz = { path = "../../eth2/utils/ssz" } -ssz_derive = { path = "../../eth2/utils/ssz_derive" } +eth2_ssz = { path = "../../eth2/utils/ssz" } +eth2_ssz_derive = { path = "../../eth2/utils/ssz_derive" } slog = "2.4.1" version = { path = "../version" } tokio = "0.1.16" diff --git a/beacon_node/http_server/Cargo.toml b/beacon_node/http_server/Cargo.toml index 45e0349f5..9a7a4b0a5 100644 --- a/beacon_node/http_server/Cargo.toml +++ b/beacon_node/http_server/Cargo.toml @@ -13,7 +13,7 @@ network = { path = "../network" } eth2-libp2p = { path = "../eth2-libp2p" } version = { path = "../version" } types = { path = "../../eth2/types" } -ssz = { path = "../../eth2/utils/ssz" } +eth2_ssz = { path = "../../eth2/utils/ssz" } slot_clock = { path = "../../eth2/utils/slot_clock" } protos = { path = "../../protos" } grpcio = { version = "0.4", default-features = false, features = ["protobuf-codec"] } diff --git a/beacon_node/network/Cargo.toml b/beacon_node/network/Cargo.toml index ebf71aa4e..695adc9bd 100644 --- a/beacon_node/network/Cargo.toml +++ b/beacon_node/network/Cargo.toml @@ -14,7 +14,7 @@ eth2-libp2p = { path = "../eth2-libp2p" } version = { path = "../version" } types = { path = "../../eth2/types" } slog = { version = "^2.2.3" , features = ["max_level_trace", "release_max_level_debug"] } -ssz = { path = "../../eth2/utils/ssz" } +eth2_ssz = { path = "../../eth2/utils/ssz" } tree_hash = { path = "../../eth2/utils/tree_hash" } futures = "0.1.25" error-chain = "0.12.0" diff --git a/beacon_node/rpc/Cargo.toml b/beacon_node/rpc/Cargo.toml index d707cc36d..a37492796 100644 --- a/beacon_node/rpc/Cargo.toml +++ b/beacon_node/rpc/Cargo.toml @@ -11,7 +11,7 @@ network = { path = "../network" } eth2-libp2p = { path = "../eth2-libp2p" } version = { path = "../version" } types = { path = "../../eth2/types" } -ssz = { path = "../../eth2/utils/ssz" } +eth2_ssz = { path = "../../eth2/utils/ssz" } slot_clock = { path = "../../eth2/utils/slot_clock" } protos = { path = "../../protos" } grpcio = { version = "0.4", default-features = false, features = ["protobuf-codec"] } diff --git a/beacon_node/store/Cargo.toml b/beacon_node/store/Cargo.toml index a95dafa90..6dcb771d2 100644 --- a/beacon_node/store/Cargo.toml +++ b/beacon_node/store/Cargo.toml @@ -14,7 +14,7 @@ bytes = "0.4.10" db-key = "0.0.5" leveldb = "0.8.4" parking_lot = "0.7" -ssz = { path = "../../eth2/utils/ssz" } -ssz_derive = { path = "../../eth2/utils/ssz_derive" } +eth2_ssz = { path = "../../eth2/utils/ssz" } +eth2_ssz_derive = { path = "../../eth2/utils/ssz_derive" } tree_hash = { path = "../../eth2/utils/tree_hash" } types = { path = "../../eth2/types" } diff --git a/eth2/lmd_ghost/Cargo.toml b/eth2/lmd_ghost/Cargo.toml index 788708faa..c21af693e 100644 --- a/eth2/lmd_ghost/Cargo.toml +++ b/eth2/lmd_ghost/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] parking_lot = "0.7" store = { path = "../../beacon_node/store" } -ssz = { path = "../utils/ssz" } +eth2_ssz = { path = "../utils/ssz" } state_processing = { path = "../state_processing" } types = { path = "../types" } log = "0.4.6" diff --git a/eth2/operation_pool/Cargo.toml b/eth2/operation_pool/Cargo.toml index 770843b75..d1fd18191 100644 --- a/eth2/operation_pool/Cargo.toml +++ b/eth2/operation_pool/Cargo.toml @@ -11,5 +11,5 @@ itertools = "0.8" parking_lot = "0.7" types = { path = "../types" } state_processing = { path = "../state_processing" } -ssz = { path = "../utils/ssz" } -ssz_derive = { path = "../utils/ssz_derive" } +eth2_ssz = { path = "../utils/ssz" } +eth2_ssz_derive = { path = "../utils/ssz_derive" } diff --git a/eth2/state_processing/Cargo.toml b/eth2/state_processing/Cargo.toml index fa42671d9..e1f98260b 100644 --- a/eth2/state_processing/Cargo.toml +++ b/eth2/state_processing/Cargo.toml @@ -24,12 +24,12 @@ integer-sqrt = "0.1" itertools = "0.8" log = "0.4" merkle_proof = { path = "../utils/merkle_proof" } -ssz = { path = "../utils/ssz" } -ssz_derive = { path = "../utils/ssz_derive" } +eth2_ssz = { path = "../utils/ssz" } +eth2_ssz_derive = { path = "../utils/ssz_derive" } tree_hash = { path = "../utils/tree_hash" } tree_hash_derive = { path = "../utils/tree_hash_derive" } types = { path = "../types" } rayon = "1.0" [features] -fake_crypto = ["bls/fake_crypto"] \ No newline at end of file +fake_crypto = ["bls/fake_crypto"] diff --git a/eth2/types/Cargo.toml b/eth2/types/Cargo.toml index fa1fe6a6d..ed6307684 100644 --- a/eth2/types/Cargo.toml +++ b/eth2/types/Cargo.toml @@ -26,8 +26,8 @@ serde_derive = "1.0" serde_json = "1.0" serde_yaml = "0.8" slog = "^2.2.3" -ssz = { path = "../utils/ssz" } -ssz_derive = { path = "../utils/ssz_derive" } +eth2_ssz = { path = "../utils/ssz" } +eth2_ssz_derive = { path = "../utils/ssz_derive" } swap_or_not_shuffle = { path = "../utils/swap_or_not_shuffle" } test_random_derive = { path = "../utils/test_random_derive" } tree_hash = { path = "../utils/tree_hash" } diff --git a/eth2/utils/bls/Cargo.toml b/eth2/utils/bls/Cargo.toml index 4fb1246be..127589463 100644 --- a/eth2/utils/bls/Cargo.toml +++ b/eth2/utils/bls/Cargo.toml @@ -13,7 +13,7 @@ rand = "^0.5" serde = "1.0" serde_derive = "1.0" serde_hex = { path = "../serde_hex" } -ssz = { path = "../ssz" } +eth2_ssz = { path = "../ssz" } tree_hash = { path = "../tree_hash" } [features] diff --git a/eth2/utils/boolean-bitfield/Cargo.toml b/eth2/utils/boolean-bitfield/Cargo.toml index dfc97ce77..ceb04a55a 100644 --- a/eth2/utils/boolean-bitfield/Cargo.toml +++ b/eth2/utils/boolean-bitfield/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] cached_tree_hash = { path = "../cached_tree_hash" } serde_hex = { path = "../serde_hex" } -ssz = { path = "../ssz" } +eth2_ssz = { path = "../ssz" } bit-vec = "0.5.0" bit_reverse = "0.1" serde = "1.0" diff --git a/eth2/utils/boolean-bitfield/fuzz/Cargo.toml b/eth2/utils/boolean-bitfield/fuzz/Cargo.toml index 9769fc50e..6a664ee60 100644 --- a/eth2/utils/boolean-bitfield/fuzz/Cargo.toml +++ b/eth2/utils/boolean-bitfield/fuzz/Cargo.toml @@ -9,7 +9,7 @@ publish = false cargo-fuzz = true [dependencies] -ssz = { path = "../../ssz" } +eth2_ssz = { path = "../../ssz" } [dependencies.boolean-bitfield] path = ".." diff --git a/eth2/utils/fixed_len_vec/Cargo.toml b/eth2/utils/fixed_len_vec/Cargo.toml index ddfc33103..2750d3acd 100644 --- a/eth2/utils/fixed_len_vec/Cargo.toml +++ b/eth2/utils/fixed_len_vec/Cargo.toml @@ -9,5 +9,5 @@ cached_tree_hash = { path = "../cached_tree_hash" } tree_hash = { path = "../tree_hash" } serde = "1.0" serde_derive = "1.0" -ssz = { path = "../ssz" } +eth2_ssz = { path = "../ssz" } typenum = "1.10" diff --git a/eth2/utils/ssz/Cargo.toml b/eth2/utils/ssz/Cargo.toml index 0423b1a8b..5fd007264 100644 --- a/eth2/utils/ssz/Cargo.toml +++ b/eth2/utils/ssz/Cargo.toml @@ -1,8 +1,12 @@ [package] -name = "ssz" +name = "eth2_ssz" version = "0.1.0" -authors = ["Paul Hauner "] +authors = ["Paul Hauner "] edition = "2018" +description = "SimpleSerialize (SSZ) as used in Ethereum 2.0" + +[lib] +name = "ssz" [[bench]] name = "benches" @@ -10,7 +14,7 @@ harness = false [dev-dependencies] criterion = "0.2" -ssz_derive = { path = "../ssz_derive" } +eth2_ssz_derive = { path = "../ssz_derive" } [dependencies] bytes = "0.4.9" diff --git a/eth2/utils/ssz/src/lib.rs b/eth2/utils/ssz/src/lib.rs index 51dd16523..bcb9f525c 100644 --- a/eth2/utils/ssz/src/lib.rs +++ b/eth2/utils/ssz/src/lib.rs @@ -2,7 +2,7 @@ //! format designed for use in Ethereum 2.0. //! //! Conforms to -//! [v0.6.1](https://github.com/ethereum/eth2.0-specs/blob/v0.6.1/specs/simple-serialize.md) of the +//! [v0.7.1](https://github.com/ethereum/eth2.0-specs/blob/v0.7.1/specs/simple-serialize.md) of the //! Ethereum 2.0 specification. //! //! ## Example diff --git a/eth2/utils/ssz_derive/Cargo.toml b/eth2/utils/ssz_derive/Cargo.toml index 3e58d752b..0b76f6153 100644 --- a/eth2/utils/ssz_derive/Cargo.toml +++ b/eth2/utils/ssz_derive/Cargo.toml @@ -1,14 +1,15 @@ [package] -name = "ssz_derive" +name = "eth2_ssz_derive" version = "0.1.0" -authors = ["Paul Hauner "] +authors = ["Paul Hauner "] edition = "2018" -description = "Procedural derive macros for SSZ encoding and decoding." +description = "Procedural derive macros to accompany the eth2_ssz crate." [lib] +name = "ssz_derive" proc-macro = true [dependencies] syn = "0.15" quote = "0.6" -ssz = { path = "../ssz" } +eth2_ssz = { path = "../ssz" } diff --git a/eth2/validator_change/Cargo.toml b/eth2/validator_change/Cargo.toml index a1c499340..725799612 100644 --- a/eth2/validator_change/Cargo.toml +++ b/eth2/validator_change/Cargo.toml @@ -7,5 +7,5 @@ edition = "2018" [dependencies] bytes = "0.4.10" hashing = { path = "../utils/hashing" } -ssz = { path = "../utils/ssz" } +eth2_ssz = { path = "../utils/ssz" } types = { path = "../types" } diff --git a/tests/ef_tests/Cargo.toml b/tests/ef_tests/Cargo.toml index e199f4cb6..e8d6b0f2f 100644 --- a/tests/ef_tests/Cargo.toml +++ b/tests/ef_tests/Cargo.toml @@ -17,7 +17,7 @@ serde = "1.0" serde_derive = "1.0" serde_repr = "0.1" serde_yaml = "0.8" -ssz = { path = "../../eth2/utils/ssz" } +eth2_ssz = { path = "../../eth2/utils/ssz" } tree_hash = { path = "../../eth2/utils/tree_hash" } cached_tree_hash = { path = "../../eth2/utils/cached_tree_hash" } state_processing = { path = "../../eth2/state_processing" } diff --git a/validator_client/Cargo.toml b/validator_client/Cargo.toml index 1784bdcb1..fdb4c33c0 100644 --- a/validator_client/Cargo.toml +++ b/validator_client/Cargo.toml @@ -14,7 +14,7 @@ path = "src/lib.rs" [dependencies] bls = { path = "../eth2/utils/bls" } -ssz = { path = "../eth2/utils/ssz" } +eth2_ssz = { path = "../eth2/utils/ssz" } eth2_config = { path = "../eth2/utils/eth2_config" } tree_hash = { path = "../eth2/utils/tree_hash" } clap = "2.32.0"