Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move pos related crates into a separate folder #2976

Merged
merged 3 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 13 additions & 3 deletions Cargo.lock

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

110 changes: 98 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,54 @@ members = [
"crates/util/version",
"crates/util/serde_utils",
"crates/cfxcore/geth-tracer",
"crates/rpc/rpc-eth-types",
"crates/rpc/rpc-eth-types",
"crates/rpc/rpc-primitives",
"crates/rpc/rpc-cfx-types",
"crates/rpc/rpc-cfx-types",
"crates/rpc/rpc-eth-api",
"crates/cfxcore/parity-trace-types",
"crates/rpc/rpc",
"crates/util/util-macros",
"crates/rpc/rpc-utils",
"crates/rpc/rpc-builder",
"crates/pos/common/bounded-executor",
"crates/pos/common/crash-handler",
"crates/pos/common/fallible",
"crates/pos/common/infallible",
"crates/pos/common/logger",
"crates/pos/common/metrics",
"crates/pos/common/metrics-core",
"crates/pos/common/nibble",
"crates/pos/common/num-variants",
"crates/pos/common/proptest-helpers",
"crates/pos/common/proxy",
"crates/pos/common/short-hex-str",
"crates/pos/common/subscription-service",
"crates/pos/common/temppath",
"crates/pos/common/time-service",
"crates/pos/config/generate-key",
"crates/pos/config/global-constants",
"crates/pos/consensus/consensus-types",
"crates/pos/config/config",
"crates/pos/consensus/executor",
"crates/pos/consensus/safety-rules",
"crates/pos/crypto/crypto",
"crates/pos/crypto/crypto-derive",
"crates/pos/secure/net",
"crates/pos/secure/push-metrics",
"crates/pos/secure/storage",
"crates/pos/storage/accumulator",
"crates/pos/storage/cached-pos-ledger-db",
"crates/pos/storage/jellyfish-merkle",
"crates/pos/storage/pos-ledger-db",
"crates/pos/storage/schemadb",
"crates/pos/storage/scratchpad",
"crates/pos/storage/state-view",
"crates/pos/storage/storage-interface",
"crates/pos/types/executor-types",
"crates/pos/types/move-core-types",
"crates/pos/types/pow-types",
"crates/pos/types/types",
"crates/pos/config/management/network-address-encryption",
]

resolver = "2"
Expand Down Expand Up @@ -152,12 +191,56 @@ cfx-util-macros = { path = "./crates/util/util-macros" }
cfx-rpc = { path = "./crates/rpc/rpc" }
cfx-rpc-utils = { path = "./crates/rpc/rpc-utils" }
cfx-rpc-builder = { path = "./crates/rpc/rpc-builder" }

bounded-executor = { path = "./crates/pos/common/bounded-executor" }
diem-channel = { path = "./crates/pos/common/channel", package = "channel" }
channel = { path = "./crates/pos/common/channel" }
crash-handler = { path = "./crates/pos/common/crash-handler" }
fallible = { path = "./crates/pos/common/fallible" }
diem-infallible = { path = "./crates/pos/common/infallible" }
diem-logger = { path = "./crates/pos/common/logger" }
diem-metrics = { path = "./crates/pos/common/metrics" }
diem-metrics-core = { path = "./crates/pos/common/metrics-core" }
diem-nibble = { path = "./crates/pos/common/nibble" }
num-variants = { path = "./crates/pos/common/num-variants" }
diem-proptest-helpers = { path = "./crates/pos/common/proptest-helpers" }
proxy = { path = "./crates/pos/common/proxy" }
short-hex-str = { path = "./crates/pos/common/short-hex-str" }
subscription-service = { path = "./crates/pos/common/subscription-service" }
diem-temppath = { path = "./crates/pos/common/temppath" }
diem-time-service = { path = "./crates/pos/common/time-service" }
generate-key = { path = "./crates/pos/config/generate-key" }
diem-global-constants = { path = "./crates/pos/config/global-constants" }
diem-config = { path = "./crates/pos/config/config" }
consensus-types = { path = "./crates/pos/consensus/consensus-types" }
executor = { path = "./crates/pos/consensus/executor" }
safety-rules = { path = "./crates/pos/consensus/safety-rules" }
diem-crypto = { path = "./crates/pos/crypto/crypto" }
diem-crypto-derive = { path = "./crates/pos/crypto/crypto-derive" }
diem-secure-net = { path = "./crates/pos/secure/net" }
diem-secure-push-metrics = { path = "./crates/pos/secure/push-metrics" }
diem-secure-storage = { path = "./crates/pos/secure/storage" }
accumulator = { path = "./crates/pos/storage/accumulator" }
cached-pos-ledger-db = { path = "./crates/pos/storage/cached-pos-ledger-db" }
diem-jellyfish-merkle = { path = "./crates/pos/storage/jellyfish-merkle" }
pos-ledger-db = { path = "./crates/pos/storage/pos-ledger-db" }
schemadb = { path = "./crates/pos/storage/schemadb" }
scratchpad = { path = "./crates/pos/storage/scratchpad" }
diem-state-view = { path = "./crates/pos/storage/state-view" }
storage-client = { path = "./crates/pos/storage/storage-client" }
storage-interface = { path = "./crates/pos/storage/storage-interface" }
executor-types = { path = "./crates/pos/types/executor-types" }
move-core-types = { path = "./crates/pos/types/move-core-types" }
pow-types = { path = "./crates/pos/types/pow-types" }
diem-types = { path = "./crates/pos/types/types" }
diem-network-address-encryption = { path = "./crates/pos/config/management/network-address-encryption" }
# proc-macros
proc-macro2 = "1.0"
quote = "1.0"

serde = { version = "1.0", features = ["derive", "alloc"], default-features = false }
serde = { version = "1.0", features = [
"derive",
"alloc",
], default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
serde_derive = { version = "1.0", default-features = false }
hex = "0.4.3"
Expand Down Expand Up @@ -217,13 +300,16 @@ reqwest = { version = "0.12", default-features = false }
pin-project = "1.0.12"
mio = "0.6.8"
# old version tokio 0.2
tokio02 = { version = "0.2", package="tokio", features = ["full"] }
tokio02 = { version = "0.2", package = "tokio", features = ["full"] }

# crypto & hash
fixed-hash = "0.5"
keccak-hash = "0.5"
tiny-keccak = "2.0.2"
bls-signatures = { git = "https://github.com/Conflux-Chain/bls-signatures.git", rev = "fb52187df92d27c365642cb7e7b2aaf60437cf9c", default-features = false, features = ["multicore", "blst"] }
bls-signatures = { git = "https://github.com/Conflux-Chain/bls-signatures.git", rev = "fb52187df92d27c365642cb7e7b2aaf60437cf9c", default-features = false, features = [
"multicore",
"blst",
] }
secp256k1 = "0.30.0"

# misc
Expand Down Expand Up @@ -263,15 +349,15 @@ rocksdb = { git = "https://github.com/Conflux-Chain/rust-rocksdb.git", rev = "37

# parity crates
rlp = "0.4.0"
rlp_derive = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
panic_hook = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
dir = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
unexpected = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
rlp_derive = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
panic_hook = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
dir = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
unexpected = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
ethereum-types = "0.9"
parity-wordlist = "1.3.0"
parity-crypto = "0.9.0"
parity-path = "0.1"
parity-util-mem = { version = "0.5", default-features = false }
parity-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1.git" }
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git", rev="b523017108bb2d571a7a69bd97bc406e63bc7a9d" }
substrate-bn = { git = "https://github.com/paritytech/bn", rev="63f8c587356a67b33c7396af98e065b66fca5dda", default-features = false }
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git", rev = "b523017108bb2d571a7a69bd97bc406e63bc7a9d" }
substrate-bn = { git = "https://github.com/paritytech/bn", rev = "63f8c587356a67b33c7396af98e065b66fca5dda", default-features = false }
12 changes: 6 additions & 6 deletions bins/conflux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ parity-wordlist = { workspace = true }
rustc-hex = { workspace = true }
env_logger = { workspace = true }
malloc_size_of = { workspace = true }
diem-crypto = { path= "../../crates/cfxcore/core/src/pos/crypto/crypto" }
diem-types = { path= "../../crates/cfxcore/core/src/pos/types" }
pos-ledger-db = { path = "../../crates/cfxcore/core/src/pos/storage/pos-ledger-db" }
executor = { path = "../../crates/cfxcore/core/src/pos/consensus/executor" } # used by pos-genesis-tool
storage-interface = { path = "../../crates/cfxcore/core/src/pos/storage/storage-interface" }
move-core-types = { path = "../../crates/cfxcore/core/src/pos/types/move-core-types" }
diem-crypto = { workspace = true }
diem-types = { workspace = true }
pos-ledger-db = { workspace = true }
executor = { workspace = true } # used by pos-genesis-tool
storage-interface = { workspace = true }
move-core-types = { workspace = true }
bcs = "0.1.3"
tempdir = { workspace = true }
hex = { workspace = true }
Expand Down
60 changes: 30 additions & 30 deletions crates/cfxcore/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ cfx-vm-types = { workspace = true }
cfx-vm-interpreter = { workspace = true }
cfx-executor = { workspace = true }
cfx-execute-helper = { workspace = true }
channel = { path = "src/pos/common/channel" }
channel = { workspace = true }
clap = { workspace = true }
dag = { workspace = true }
derivative = "2.0.2"
db = { workspace = true }
either = "1.5.3"
fallible-iterator = "0.2"
fs_extra = "1.1.0"
futures = { workspace = true, features = ["compat"]}
futures = { workspace = true, features = ["compat"] }
hashbrown = "0.7.1"
hibitset = { workspace = true }
itertools = { workspace = true }
Expand Down Expand Up @@ -62,8 +62,8 @@ primitives = { workspace = true }
priority-send-queue = { workspace = true }
prometheus = { version = "0.7.0", default-features = false }
rand = { workspace = true }
rand_08 = {package = "rand", version = "0.8"}
rand_xorshift="0.2"
rand_08 = { package = "rand", version = "0.8" }
rand_xorshift = "0.2"
rangetools = "0.1.4"
random-crash = { workspace = true }
rayon = { workspace = true }
Expand Down Expand Up @@ -95,41 +95,41 @@ strum = { workspace = true }
strum_macros = { workspace = true }
smart-default = "0.6.0"
bls-signatures = { workspace = true }
tiny-keccak = { workspace = true, features = ["keccak"]}
tiny-keccak = { workspace = true, features = ["keccak"] }
bcs = "0.1.2"
async-trait = { workspace = true }
num-derive = { version = "0.3.3", default-features = false }
thiserror = { workspace = true }
fallible = { path = "src/pos/common/fallible" }
fallible = { workspace = true }
mirai-annotations = { version = "1.10.1", default-features = false }
bounded-executor = { path = "src/pos/common/bounded-executor" }
diem-config = { path = "src/pos/config" }
diem-crypto = { path = "src/pos/crypto/crypto" }
diem-infallible = { path = "src/pos/common/infallible" }
diem-logger = { path = "src/pos/common/logger" }
diem-metrics = { path = "src/pos/common/metrics" }
diem-secure-storage = { path = "src/pos/secure/storage" }
diem-types = { path = "src/pos/types" }
executor-types = { path = "src/pos/types/executor-types" }
executor = {path = "src/pos/consensus/executor" }
consensus-types = { path = "src/pos/consensus/consensus-types" }
safety-rules = { path = "src/pos/consensus/safety-rules" }
pos-ledger-db = { path = "src/pos/storage/pos-ledger-db" }
cached-pos-ledger-db = { path = "src/pos/storage/cached-pos-ledger-db" }
schemadb = { path = "src/pos/storage/schemadb" }
storage-interface = { path = "src/pos/storage/storage-interface" }
short-hex-str = { path = "src/pos/common/short-hex-str" }
subscription-service = { path = "src/pos/common/subscription-service" }
bounded-executor = { workspace = true }
diem-config = { workspace = true }
diem-crypto = { workspace = true }
diem-infallible = { workspace = true }
diem-logger = { workspace = true }
diem-metrics = { workspace = true }
diem-secure-storage = { workspace = true }
diem-types = { workspace = true }
executor-types = { workspace = true }
executor = { workspace = true }
consensus-types = { workspace = true }
safety-rules = { workspace = true }
pos-ledger-db = { workspace = true }
cached-pos-ledger-db = { workspace = true }
schemadb = { workspace = true }
storage-interface = { workspace = true }
short-hex-str = { workspace = true }
subscription-service = { workspace = true }
fail = { workspace = true }
anyhow = { workspace = true }
once_cell = { workspace = true }
move-core-types = { path = "src/pos/types/move-core-types" }
pow-types = {path = "src/pos/types/pow-types" }
move-core-types = { workspace = true }
pow-types = { workspace = true }
async-oneshot = { workspace = true }
proptest = { version = "1.0.0", optional = true }
proptest-derive = { version = "0.3.0", optional = true }
diem-temppath = { path = "src/pos/common/temppath" }
crash-handler = { path = "src/pos/common/crash-handler" }
diem-temppath = { workspace = true }
crash-handler = { workspace = true }
heap-map = { workspace = true }
impl-trait-for-tuples = "^0.2"
impl-tools = "^0.10"
Expand All @@ -150,12 +150,12 @@ cfx-storage = { workspace = true, features = ["testonly_code"] }
cfx-vm-types = { workspace = true, features = ["testonly_code"] }
proptest = "1.0.0"
proptest-derive = "0.3.0"
consensus-types = { path = "src/pos/consensus/consensus-types", features = ["fuzzing"] }
consensus-types = { workspace = true, features = ["fuzzing"] }

[features]
default = []
# Unfortunately cfg test attributes doesn't work across crates,
# we have to define a feature for test code.
# https://users.rust-lang.org/t/cfg-test-doesnt-propagate-to-external-crates/13046
testonly_code = []
fuzzing = ["proptest", "proptest-derive"]
fuzzing = ["proptest", "proptest-derive"]
47 changes: 0 additions & 47 deletions crates/cfxcore/core/src/pos/consensus/executor/Cargo.toml

This file was deleted.

Loading