Skip to content

Commit

Permalink
Merge pull request #2920 from Pana/addEspaceRpcApi
Browse files Browse the repository at this point in the history
Add new espace async rpc traits
  • Loading branch information
Pana authored Oct 16, 2024
2 parents d5eac9b + 5032deb commit 8513c83
Show file tree
Hide file tree
Showing 46 changed files with 1,207 additions and 197 deletions.
415 changes: 364 additions & 51 deletions Cargo.lock

Large diffs are not rendered by default.

25 changes: 22 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ members = [
"crates/serde_utils",
"crates/cfxcore/geth-tracer",
"crates/rpc/rpc-eth-types",
"crates/rpc/rpc-primitives",
"crates/rpc/rpc-cfx-types",
"crates/rpc/rpc-primitives",
"crates/rpc/rpc-cfx-types",
"crates/rpc/rpc-eth-api",
"crates/cfxcore/parity-trace-types",
"crates/rpc/rpc",
]

resolver = "2"
Expand Down Expand Up @@ -147,10 +149,12 @@ cfx-rpc-eth-types = { path = "./crates/rpc/rpc-eth-types" }
cfx-rpc-primitives = { path = "./crates/rpc/rpc-primitives" }
cfx-rpc-cfx-types = { path = "./crates/rpc/rpc-cfx-types" }
cfx-parity-trace-types = { path = "./crates/cfxcore/parity-trace-types" }
cfx-rpc-eth-api = { path = "./crates/rpc/rpc-eth-api" }

serde = { version = "1.0", features = ["derive", "alloc"] }
serde_json = "1.0"
serde_derive = "1.0"
fail = "0.4.0"
thiserror = "1.0.63"
anyhow = "1.0"
chrono = "=0.4.38"
Expand All @@ -162,8 +166,12 @@ strum_macros = "0.20"
lazy_static = "1.4"
parking_lot = "0.11"
rayon = "1.10"
jsonrpsee = "0.24.4"
once_cell = "1.17.1"
rand = "0.7"
itertools = "0.10.0"

keccak-hash = "0.5"
byteorder = "1.2.7"
rlp = "0.4.0"
rlp_derive = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
hex = "0.4.3"
Expand All @@ -176,3 +184,14 @@ alloy-rpc-types-trace = { git = "https://github.com/alloy-rs/alloy", rev = "4e22
revm = "8.0"

bls-signatures = { git = "https://github.com/Conflux-Chain/bls-signatures.git", rev = "fb52187df92d27c365642cb7e7b2aaf60437cf9c", default-features = false, features = ["multicore", "blst"] }

# async
async-trait = "0.1"

# crypto
fixed-hash = "0.5"
keccak-hash = "0.5"
tiny-keccak = "2.0.2"

# misc
clap = "2"
2 changes: 1 addition & 1 deletion bins/conflux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation.workspace = true

[dependencies]
mio = "0.6.8"
clap = { version = "2", features = ["yaml"] }
clap = { workspace = true, features = ["yaml"] }
textwrap = "0.9"
toml = "0.5.8"
serde = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions crates/blockgen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ version = "0.1.0"
edition = "2021"

[dependencies]
clap = "2"
clap = { workspace = true }
cfxcore = { workspace = true }
cfxkey = { workspace = true }
cfx-parameters = { workspace = true }
cfx-stratum = { workspace = true }
cfx-types = { workspace = true }
db = { workspace = true }
lazy_static = "1.4"
log = "0.4"
lazy_static = { workspace = true }
log = { workspace = true }
metrics = { workspace = true }
network = { workspace = true }
primitives = { workspace = true }
Expand Down
34 changes: 17 additions & 17 deletions crates/cfxcore/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"
[dependencies]
bit-set = "0.4"
substrate-bn = { git = "https://github.com/paritytech/bn", default-features = false, rev="63f8c587356a67b33c7396af98e065b66fca5dda" }
byteorder = "1.0"
byteorder = { workspace = true }
cfxkey = { workspace = true }
cfx-addr = { workspace = true }
cfx-bytes = { workspace = true }
Expand All @@ -26,7 +26,7 @@ cfx-vm-interpreter = { workspace = true }
cfx-executor = { workspace = true }
cfx-execute-helper = { workspace = true }
channel = { path = "src/pos/common/channel" }
clap = "2"
clap = { workspace = true }
dag = { workspace = true }
derivative = "2.0.2"
db = { workspace = true }
Expand All @@ -37,15 +37,15 @@ fs_extra = "1.1.0"
futures = {version="0.3.3", features = ["compat"]}
hashbrown = "0.7.1"
hibitset = { workspace = true }
itertools = "0.9"
itertools = { workspace = true }
io = { workspace = true }
jsonrpc-core = "15.1.0"
jsonrpc-core = { workspace = true }
keccak-hash = { workspace = true }
kvdb = "0.4"
kvdb-rocksdb = { workspace = true }
lazy_static = "1.4"
lazy_static = { workspace = true }
link-cut-tree = { workspace = true }
log = "0.4"
log = { workspace = true }
log4rs = { version = "1.2.0", features = ["background_rotation", "gzip"] }
lru_time_cache = "0.9.0"
malloc_size_of = { workspace = true }
Expand All @@ -63,18 +63,18 @@ primal = "0.2.3"
primitives = { workspace = true }
priority-send-queue = { workspace = true }
prometheus = { version = "0.7.0", default-features = false }
rand = "0.7"
rand = { workspace = true }
rand_08 = {package = "rand", version = "0.8"}
rand_xorshift="0.2"
random-crash = { workspace = true }
rayon = "1.0"
rayon = { workspace = true }
rlp = { workspace = true }
rlp_derive = { workspace = true }
rustc-hex = "2.1"
rustc-hex = { workspace = true }
secret-store = { workspace = true }
serde = { version = "1.0", features = ["rc"] }
serde_derive = "1.0"
serde_json = "1.0"
serde_derive = { workspace = true }
serde_json = { workspace = true }
siphasher = "0.3"
slab = "0.4"
solidity-abi = { workspace = true }
Expand All @@ -93,11 +93,11 @@ tokio = { version = "1.6", features = ["full"] }
tokio-timer = "0.2.13"
tokio-stream = "0.1.4"
unexpected = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
strum = "0.20"
strum_macros = "0.20"
strum = { workspace = true }
strum_macros = { workspace = true }
smart-default = "0.6.0"
bls-signatures = { workspace = true }
tiny-keccak = {version = "2.0", features = ["keccak"]}
tiny-keccak = { workspace = true, features = ["keccak"]}
bcs = "0.1.2"
async-trait = "0.1"
num-derive = { version = "0.3.3", default-features = false }
Expand All @@ -122,9 +122,9 @@ 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" }
fail = "0.4.0"
anyhow = "1.0.38"
once_cell = "1.7.2"
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" }
async-oneshot = "0.5.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/cfxcore/core/benchmark/storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cfx-internal-common = { workspace = true }
primitives = { workspace = true }
db = { workspace = true }

clap = "2.32"
clap = { workspace = true }
env_logger = "0.7"
error-chain = "0.12"
ethcore = { package = "ethcore", git = "https://github.com/paritytech/parity-ethereum", tag = "v2.4.0" }
Expand Down
2 changes: 1 addition & 1 deletion crates/cfxcore/core/src/pos/common/time-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ diem-infallible = { path = "../infallible" }

[dev-dependencies]
futures = "0.3.12"
pin-project = "1.0.5"
pin-project = "1.1.3"
tokio = { version = "1.3.0", features = ["macros", "rt-multi-thread", "time"] }
tokio-test = "0.4.1"

Expand Down
10 changes: 5 additions & 5 deletions crates/cfxcore/core/src/pos/consensus/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ publish = false
edition = "2018"

[dependencies]
anyhow = "1.0.38"
fail = "0.4.0"
anyhow = { workspace = true }
fail = { workspace = true }
itertools = { version = "0.10.0", default-features = false }
once_cell = "1.7.2"
serde_json = "1.0.64"
serde = { version = "1.0.124", features = ["derive"] }
once_cell = { workspace = true }
serde_json = { workspace = true }
serde = { workspace = true, features = ["derive"] }

consensus-types = { path = "../consensus-types" }
executor-types = { path = "../../types/executor-types" }
Expand Down
2 changes: 1 addition & 1 deletion crates/cfxcore/core/src/pos/crypto/crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ serde-name = "0.1.1"
sha2 = "0.9.3"
static_assertions = "1.1.0"
thiserror = "1.0.24"
tiny-keccak = { version = "2.0.2", features = ["sha3"] }
tiny-keccak = { workspace = true, features = ["sha3"] }
x25519-dalek = { version = "0.1.0", package = "x25519-dalek-fiat", default-features = false, features = ["std"] }
aes-gcm = "0.8.0"
diem-crypto-derive = { path = "../crypto-derive", version = "0.1.0" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ byteorder = "1.4.3"
bytes = "1.0.1"
futures = "0.3.12"
hex = "0.4.3"
itertools = "0.10.0"
itertools = { workspace = true }
num_cpus = "1.13.0"
once_cell = "1.7.2"
pin-project = "1.0.5"
Expand Down
8 changes: 4 additions & 4 deletions crates/cfxcore/core/src/pos/storage/pos-ledger-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ publish = false
edition = "2018"

[dependencies]
anyhow = "1.0.38"
anyhow = { workspace = true }
arc-swap = "1.2.0"
byteorder = "1.4.3"
itertools = "0.10.0"
once_cell = "1.7.2"
itertools = { workspace = true }
once_cell = { workspace = true }
num-derive = "0.3.3"
num-traits = "0.2.14"
proptest = { version = "1.0.0", optional = true }
proptest-derive = { version = "0.3.0", optional = true }
serde = "1.0.124"
thiserror = "1.0.24"
thiserror = { workspace = true }

accumulator = { path = "../accumulator" }
bcs = "0.1.2"
Expand Down
2 changes: 1 addition & 1 deletion crates/cfxcore/core/src/pos/storage/scratchpad/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = "2018"

[dependencies]
arc-swap = "1.2.0"
itertools = "0.10.0"
itertools = { workspace = true }

diem-crypto = { path = "../../crypto/crypto" }
diem-infallible = { path = "../../common/infallible" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition = "2018"

[dependencies]
anyhow = "1.0.38"
itertools = "0.10.0"
itertools = { workspace = true }
serde = { version = "1.0.124", default-features = false }
thiserror = "1.0.24"
parking_lot = "0.11.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ storage-client = { path = "../storage-client", optional = true }
proptest = { version = "1.0.0", optional = true }

[dev-dependencies]
itertools = "0.10.0"
itertools = { workspace = true }
pos-ledger-db = { path = "../pos-ledger-db", features = ["fuzzing"] }
diem-temppath = { path = "../../common/temppath" }
proptest = "1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/cfxcore/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sha3-macro = { workspace = true }
strum = { workspace = true }
strum_macros = { workspace = true }
bls-signatures = {git = "https://github.com/Conflux-Chain/bls-signatures.git", rev = "fb52187df92d27c365642cb7e7b2aaf60437cf9c", default-features = false, features = ["multicore"]}
tiny-keccak = {version = "2.0", features = ["keccak"]}
tiny-keccak = { workspace = true, features = ["keccak"]}
diem-crypto = { path = "../core/src/pos/crypto/crypto" }
diem-types = { path = "../core/src/pos/types" }
pow-types = {path = "../core/src/pos/types/pow-types" }
Expand Down
26 changes: 13 additions & 13 deletions crates/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ edition = "2021"
bigdecimal = "0.1.0"
num-bigint = "0.2.6"
mio = "0.6.8"
clap = "2"
clap = { workspace = true }
textwrap = "0.9"
toml = "0.5.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_derive = "1.0"
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
serde_derive = { workspace = true }
parking_lot = { workspace = true }
io = { workspace = true }
cfxkey = { workspace = true }
Expand All @@ -27,15 +27,15 @@ cfx-vm-types = { workspace = true }
app_dirs = "1.2.1"
dir = { git = "https://github.com/Conflux-Chain/conflux-parity-deps.git", rev = "1597a9cab02343eb2322ca0ac58d39b64e3f42d1" }
ctrlc = { git = "https://github.com/paritytech/rust-ctrlc.git", rev="b523017108bb2d571a7a69bd97bc406e63bc7a9d" }
jsonrpc-core = "15.1.0"
jsonrpc-core = { workspace = true }
jsonrpc-tcp-server = "15.1.0"
jsonrpc-http-server = "15.1.0"
jsonrpc-derive = "15.1.0"
jsonrpc-core-client = "15.1.0"
jsonrpc-pubsub = "15.1.0"
jsonrpc-ws-server = "15.1.0"
error-chain = { version = "0.12" }
lazy_static = "1.4"
error-chain = { workspace = true }
lazy_static = { workspace = true }
log = { workspace = true }
cfx-types = { workspace = true }
cfx-addr = { workspace = true }
Expand All @@ -52,7 +52,7 @@ primitives = { workspace = true }
log4rs = { version = "1.2.0", features = ["background_rotation", "gzip"] }
rlp = { workspace = true }
keccak-hash = { workspace = true }
rand = "0.7.2"
rand = { workspace = true }
rand_08 = {package = "rand", version = "0.8.0"}
kvdb-rocksdb = { workspace = true }
tempdir = "0.3"
Expand All @@ -62,20 +62,20 @@ metrics = { workspace = true }
delegate = { workspace = true }
transient-hashmap = "0.4"
rand_xorshift = "0.2"
itertools = "0.9"
itertools = { workspace = true }
order-stat = "0.1"
futures01 = "0.1"
futures = { version = "0.3.3", features = ["compat"] }
rayon = "1.2.0"
rayon = { workspace = true }
throttling = { workspace = true }
tokio = { version = "1.6", features = ["full"] }
tokio-stream = "0.1.4"
tokio-timer = "0.2.13"
malloc_size_of = { workspace = true }
random-crash = { workspace = true }
cfx-parameters = { workspace = true }
strum = "0.20"
strum_macros = "0.20"
strum = { workspace = true }
strum_macros = { workspace = true }
crash-handler = { path = "../cfxcore/core/src/pos/common/crash-handler" }
cached-pos-ledger-db = { path = "../cfxcore/core/src/pos/storage/cached-pos-ledger-db" }
pos-ledger-db = { path = "../cfxcore/core/src/pos/storage/pos-ledger-db" }
Expand All @@ -91,7 +91,7 @@ diem-types = { path = "../cfxcore/core/src/pos/types" }
pow-types = {path = "../cfxcore/core/src/pos/types/pow-types" }
executor-types = { path = "../cfxcore/core/src/pos/types/executor-types" }
executor = { path = "../cfxcore/core/src/pos/consensus/executor" }
fail = "0.4.0"
fail = { workspace = true }
storage-interface = { path = "../cfxcore/core/src/pos/storage/storage-interface" }
consensus-types = {path = "../cfxcore/core/src/pos/consensus/consensus-types" }
rpassword = "5.0.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/dbs/statedb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ log = "0.4"
parking_lot = { workspace = true }
primitives = { workspace = true, optional = true }
rlp = { workspace = true }
tiny-keccak = "2.0.2"
tiny-keccak = { workspace = true }
lazy_static = "1.4.0"

[dev-dependencies]
Expand Down
Loading

0 comments on commit 8513c83

Please sign in to comment.