Skip to content

Commit

Permalink
feat: Migrate common types and traits to phaselock-types
Browse files Browse the repository at this point in the history
Nearly completly migrate over the data and traits modules to phaselock-types.
This includes:
 - The hash types and assocaited macro generation
 - The Stage enum
 - The Quorum certificate types
 - The State and BlockContents traits
 - The Message module and associated types
 - The PubKey and PrivKey types
 - The NetworkingImplementation trait
 - The Storage trait
 - The NodeImplementation trait
 - The Event struct and EventType enum

This required changing some pub(crate)s over to pub.
No breaking changes have been made in phaselock, as the modules have been modified to rexport the
relevant types.

This change will allow an implementation of one of the core phaselock traits, such as a
NetworkingImplmentation, to live in a seperate crate from phaselock proper, while still allowing
phaselock to depend upon it without creating a circular dependency.

Closes #25
  • Loading branch information
nmccarty committed Feb 15, 2022
1 parent ec1ce9a commit 5cff09c
Show file tree
Hide file tree
Showing 25 changed files with 865 additions and 799 deletions.
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ dashmap = "5.1.0"
flume = "0.10.10"
futures = "0.3.21"
hex_fmt = "0.3.0"
phaselock-types = { path = "./phaselock-types", version = "0.0.6-dev" }
# jf-primitives = { features=["std"], git = "ssh://[email protected]/translucence/crypto/jellyfish.git", rev = "3faf4400a7ae67de18400051f57afe8e4fb6d4de"}
rand = "0.7.3"
rand_chacha = "0.2.2"
serde_bytes = "0.11"
serde = { version = "1.0.136", features = ["derive", "rc"] }
serde_bytes = "0.11"
snafu = { version = "0.7.0", features = ["backtraces"] }
threshold_crypto = "0.4.0"
tracing = "0.1.30"
tracing-error = "0.2.0"
tracing-futures = "0.2.5"
tracing-unwrap = "0.9.2"
phaselock-types = { path = "./phaselock-types", version = "0.0.6-dev" }

[dev-dependencies]
async-std = { version = "1.10.0", features = ["attributes"] }
Expand Down Expand Up @@ -79,4 +79,4 @@ lto = "thin"

members = [
"phaselock-types"
]
]
12 changes: 12 additions & 0 deletions phaselock-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@ version = "0.0.6-dev"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
async-std = "1.10.0"
async-tungstenite = "0.16.1"
bincode = "1.3.3"
blake3 = "1.3.1"
futures = "0.3.21"
hex_fmt = "0.3.0"
rand = "0.7.3"
rand_chacha = "0.2.2"
serde = { version = "1.0.136", features = ["derive"] }
serde_bytes = "0.11.5"
snafu = "0.7.0"
threshold_crypto = "0.4.0"
Loading

0 comments on commit 5cff09c

Please sign in to comment.