mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-22 19:49:33 +00:00
clean up dependencies
This commit is contained in:
parent
50894bef89
commit
b9334b6a90
11 changed files with 776 additions and 838 deletions
91
Cargo.lock
generated
91
Cargo.lock
generated
|
@ -285,9 +285,7 @@ checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android-tzdata",
|
"android-tzdata",
|
||||||
"iana-time-zone",
|
"iana-time-zone",
|
||||||
"js-sys",
|
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"wasm-bindgen",
|
|
||||||
"windows-targets 0.48.5",
|
"windows-targets 0.48.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -408,7 +406,6 @@ version = "0.5.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
|
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rand_core",
|
|
||||||
"subtle",
|
"subtle",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -448,7 +445,6 @@ version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"borsh",
|
"borsh",
|
||||||
"clap",
|
"clap",
|
||||||
"crypto-bigint",
|
|
||||||
"cuprate-common",
|
"cuprate-common",
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"dalek-ff-group",
|
"dalek-ff-group",
|
||||||
|
@ -701,7 +697,6 @@ checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-executor",
|
|
||||||
"futures-io",
|
"futures-io",
|
||||||
"futures-sink",
|
"futures-sink",
|
||||||
"futures-task",
|
"futures-task",
|
||||||
|
@ -724,34 +719,12 @@ version = "0.3.30"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
|
checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "futures-executor"
|
|
||||||
version = "0.3.30"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d"
|
|
||||||
dependencies = [
|
|
||||||
"futures-core",
|
|
||||||
"futures-task",
|
|
||||||
"futures-util",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-io"
|
name = "futures-io"
|
||||||
version = "0.3.30"
|
version = "0.3.30"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
|
checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "futures-macro"
|
|
||||||
version = "0.3.30"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 2.0.48",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-sink"
|
name = "futures-sink"
|
||||||
version = "0.3.30"
|
version = "0.3.30"
|
||||||
|
@ -773,7 +746,6 @@ dependencies = [
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-io",
|
"futures-io",
|
||||||
"futures-macro",
|
|
||||||
"futures-sink",
|
"futures-sink",
|
||||||
"futures-task",
|
"futures-task",
|
||||||
"memchr",
|
"memchr",
|
||||||
|
@ -1063,16 +1035,6 @@ version = "0.4.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
|
checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "lock_api"
|
|
||||||
version = "0.4.11"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
|
|
||||||
dependencies = [
|
|
||||||
"autocfg",
|
|
||||||
"scopeguard",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.20"
|
version = "0.4.20"
|
||||||
|
@ -1166,7 +1128,6 @@ dependencies = [
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
"zeroize",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1349,29 +1310,6 @@ version = "2.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
|
checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "parking_lot"
|
|
||||||
version = "0.12.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
|
|
||||||
dependencies = [
|
|
||||||
"lock_api",
|
|
||||||
"parking_lot_core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "parking_lot_core"
|
|
||||||
version = "0.9.9"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
"libc",
|
|
||||||
"redox_syscall",
|
|
||||||
"smallvec",
|
|
||||||
"windows-targets 0.48.5",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "password-hash"
|
name = "password-hash"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
|
@ -1483,9 +1421,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.76"
|
version = "1.0.78"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c"
|
checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
@ -1594,7 +1532,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "randomx-rs"
|
name = "randomx-rs"
|
||||||
version = "1.3.0"
|
version = "1.3.0"
|
||||||
source = "git+https://github.com/Cuprate/randomx-rs.git#6496a61208852a020575dafc160080cf50bda67f"
|
source = "git+https://github.com/Cuprate/randomx-rs.git?rev=6496a61#6496a61208852a020575dafc160080cf50bda67f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 1.3.2",
|
||||||
"libc",
|
"libc",
|
||||||
|
@ -1764,12 +1702,6 @@ dependencies = [
|
||||||
"windows-sys 0.52.0",
|
"windows-sys 0.52.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "scopeguard"
|
|
||||||
version = "1.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sct"
|
name = "sct"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
|
@ -1879,15 +1811,6 @@ dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "signal-hook-registry"
|
|
||||||
version = "1.4.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "simple-request"
|
name = "simple-request"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
@ -1909,9 +1832,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "smallvec"
|
name = "smallvec"
|
||||||
version = "1.12.0"
|
version = "1.13.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2593d31f82ead8df961d8bd23a64c2ccf2eb5dd34b0a34bfb4dd54011c72009e"
|
checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "socket2"
|
name = "socket2"
|
||||||
|
@ -2055,13 +1978,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104"
|
checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"bytes",
|
|
||||||
"libc",
|
"libc",
|
||||||
"mio",
|
"mio",
|
||||||
"num_cpus",
|
"num_cpus",
|
||||||
"parking_lot",
|
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"signal-hook-registry",
|
|
||||||
"socket2",
|
"socket2",
|
||||||
"tokio-macros",
|
"tokio-macros",
|
||||||
"windows-sys 0.48.0",
|
"windows-sys 0.48.0",
|
||||||
|
@ -2169,7 +2089,6 @@ version = "0.1.40"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
|
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"tracing-attributes",
|
"tracing-attributes",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
|
|
56
Cargo.toml
56
Cargo.toml
|
@ -35,32 +35,36 @@ opt-level = 1
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
async-trait = { version = "0.1.74" }
|
async-trait = { version = "0.1.74", default-features = false }
|
||||||
borsh = { version = "1.2.1", features = ["derive"] }
|
borsh = { version = "1.2.1", default-features = false }
|
||||||
bytes = { version = "1.5.0" }
|
bytes = { version = "1.5.0", default-features = false }
|
||||||
clap = { version = "4.4.7" }
|
clap = { version = "4.4.7", default-features = false }
|
||||||
chrono = { version = "0.4.31" }
|
chrono = { version = "0.4.31", default-features = false }
|
||||||
crypto-bigint = { version = "0.5.3" }
|
primitive-types = { version = "0.12.2", default-features = false }
|
||||||
curve25519-dalek = { version = "4.1.1" }
|
curve25519-dalek = { version = "4.1.1", default-features = false }
|
||||||
dalek-ff-group = { git = "https://github.com/Cuprate/serai.git", rev = "a59966b" }
|
dalek-ff-group = { git = "https://github.com/Cuprate/serai.git", rev = "a59966b", default-features = false }
|
||||||
dirs = { version = "5.0.1" }
|
dirs = { version = "5.0.1", default-features = false }
|
||||||
futures = { version = "0.3.29" }
|
futures = { version = "0.3.29", default-features = false }
|
||||||
hex = { version = "0.4.3" }
|
hex = { version = "0.4.3", default-features = false }
|
||||||
monero-epee-bin-serde = { git = "https://github.com/monero-rs/monero-epee-bin-serde.git", rev = "e4a585a" }
|
hex-literal = { version = "0.4", default-features = false }
|
||||||
monero-serai = { git = "https://github.com/Cuprate/serai.git", rev = "a59966b" }
|
monero-epee-bin-serde = { git = "https://github.com/monero-rs/monero-epee-bin-serde.git", rev = "e4a585a", default-features = false }
|
||||||
multiexp = { git = "https://github.com/Cuprate/serai.git", rev = "a59966b" }
|
monero-serai = { git = "https://github.com/Cuprate/serai.git", rev = "a59966b", default-features = false }
|
||||||
randomx-rs = { version = "1.2.1" }
|
multiexp = { git = "https://github.com/Cuprate/serai.git", rev = "a59966b", default-features = false }
|
||||||
rand = { version = "0.8.5" }
|
pin-project = { version = "1.1.3", default-features = false }
|
||||||
rayon = { version = "1.8.0" }
|
randomx-rs = { git = "https://github.com/Cuprate/randomx-rs.git", rev = "6496a61", default-features = false }
|
||||||
serde_bytes = { version = "0.11.12" }
|
rand = { version = "0.8.5", default-features = false }
|
||||||
serde_json = { version = "1.0.108" }
|
rayon = { version = "1.8.0", default-features = false }
|
||||||
serde = { version = "1.0.190", features = ["derive"] }
|
serde_bytes = { version = "0.11.12", default-features = false }
|
||||||
thiserror = { version = "1.0.50" }
|
serde_json = { version = "1.0.108", default-features = false }
|
||||||
tokio-util = { version = "0.7.10", features = ["codec"]}
|
serde = { version = "1.0.190", default-features = false }
|
||||||
tokio = { version = "1.33.0", features = ["full"] }
|
thiserror = { version = "1.0.50", default-features = false }
|
||||||
tower = { version = "0.4.13", features = ["util", "steer"] }
|
thread_local = { version = "1.1.7", default-features = false }
|
||||||
tracing-subscriber = { version = "0.3.17" }
|
tokio-util = { version = "0.7.10", default-features = false }
|
||||||
tracing = { version = "0.1.40" }
|
tokio-stream = { version = "0.1.14", default-features = false }
|
||||||
|
tokio = { version = "1.33.0", default-features = false }
|
||||||
|
tower = { version = "0.4.13", default-features = false }
|
||||||
|
tracing-subscriber = { version = "0.3.17", default-features = false }
|
||||||
|
tracing = { version = "0.1.40", default-features = false }
|
||||||
|
|
||||||
## workspace.dev-dependencies
|
## workspace.dev-dependencies
|
||||||
proptest = { version = "1" }
|
proptest = { version = "1" }
|
||||||
|
|
|
@ -10,10 +10,10 @@ default = []
|
||||||
borsh = ["dep:borsh"]
|
borsh = ["dep:borsh"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = "0.4.24"
|
chrono = { workspace = true }
|
||||||
thiserror = "1"
|
thiserror = { workspace = true }
|
||||||
hex = "0.4"
|
hex = { workspace = true, features = ["std"] }
|
||||||
|
|
||||||
futures = "0.3.29"
|
futures = { workspace = true, features = ["std"] }
|
||||||
|
|
||||||
borsh = {version = "1.2.1", default-features = false, features = ["derive",], optional = true }
|
borsh = { workspace = true, features = ["derive", "std"], optional = true }
|
|
@ -8,15 +8,17 @@ authors = ["Boog900"]
|
||||||
repository = "https://github.com/Cuprate/cuprate/tree/main/consensus"
|
repository = "https://github.com/Cuprate/cuprate/tree/main/consensus"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["binaries"]
|
default = []
|
||||||
binaries = [
|
binaries = [
|
||||||
"tokio/rt-multi-thread",
|
"tokio/rt-multi-thread",
|
||||||
"tokio/macros",
|
"tokio/macros",
|
||||||
"dep:tracing-subscriber",
|
|
||||||
"tower/retry",
|
"tower/retry",
|
||||||
"tower/balance",
|
"tower/balance",
|
||||||
"tower/buffer",
|
"tower/buffer",
|
||||||
"tower/timeout",
|
"tower/timeout",
|
||||||
|
"monero-serai/http-rpc",
|
||||||
|
"dep:curve25519-dalek",
|
||||||
|
"dep:tracing-subscriber",
|
||||||
"dep:serde_json",
|
"dep:serde_json",
|
||||||
"dep:serde",
|
"dep:serde",
|
||||||
"dep:monero-epee-bin-serde",
|
"dep:monero-epee-bin-serde",
|
||||||
|
@ -27,27 +29,23 @@ binaries = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
cuprate-common = {path = "../common"}
|
||||||
monero-consensus = {path = "./rules", features = ["rayon"]}
|
monero-consensus = {path = "./rules", features = ["rayon"]}
|
||||||
|
|
||||||
thiserror = "1"
|
thiserror = { workspace = true }
|
||||||
tower = {version = "0.4", features = ["util"]}
|
tower = { workspace = true, features = ["util"] }
|
||||||
tracing = "0.1"
|
tracing = { workspace = true, features = ["std", "attributes"] }
|
||||||
futures = "0.3"
|
futures = { workspace = true, features = ["std"] }
|
||||||
|
|
||||||
crypto-bigint = "0.5"
|
randomx-rs = { workspace = true }
|
||||||
curve25519-dalek = "4"
|
monero-serai = { workspace = true, features = ["std"] }
|
||||||
|
|
||||||
randomx-rs = {git = "https://github.com/Cuprate/randomx-rs.git"}
|
|
||||||
monero-serai = { workspace = true }
|
|
||||||
multiexp = { workspace = true }
|
multiexp = { workspace = true }
|
||||||
dalek-ff-group = { workspace = true }
|
dalek-ff-group = { workspace = true }
|
||||||
|
|
||||||
cuprate-common = {path = "../common"}
|
rayon = { workspace = true }
|
||||||
|
thread_local = { workspace = true }
|
||||||
rayon = "1"
|
tokio = { workspace = true }
|
||||||
thread_local = "1.1.7"
|
tokio-util = { workspace = true }
|
||||||
tokio = "1"
|
|
||||||
tokio-util = "0.7"
|
|
||||||
|
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
|
|
||||||
|
@ -60,6 +58,7 @@ tracing-subscriber = {version = "0.3", optional = true}
|
||||||
borsh = { workspace = true, optional = true}
|
borsh = { workspace = true, optional = true}
|
||||||
dirs = {version="5.0", optional = true}
|
dirs = {version="5.0", optional = true}
|
||||||
clap = { version = "4.4.8", optional = true, features = ["derive"] }
|
clap = { version = "4.4.8", optional = true, features = ["derive"] }
|
||||||
|
curve25519-dalek = { workspace = true, optional = true }
|
||||||
# here to help cargo to pick a version - remove me
|
# here to help cargo to pick a version - remove me
|
||||||
syn = "2.0.37"
|
syn = "2.0.37"
|
||||||
|
|
||||||
|
@ -67,6 +66,6 @@ syn = "2.0.37"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
monero-consensus = {path = "./rules", features = ["proptest"]}
|
monero-consensus = {path = "./rules", features = ["proptest"]}
|
||||||
|
|
||||||
tokio = {version = "1", features = ["rt-multi-thread", "macros"]}
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros"]}
|
||||||
proptest = "1"
|
proptest = { workspace = true }
|
||||||
proptest-derive = "0.4.0"
|
proptest-derive = { workspace = true }
|
|
@ -12,19 +12,18 @@ rayon = ["dep:rayon"]
|
||||||
cryptonight-cuprate = {path = "../../cryptonight"}
|
cryptonight-cuprate = {path = "../../cryptonight"}
|
||||||
cuprate-common = {path = "../../common"}
|
cuprate-common = {path = "../../common"}
|
||||||
|
|
||||||
monero-serai = { workspace = true }
|
monero-serai = { workspace = true, features = ["std"] }
|
||||||
multiexp = { workspace = true }
|
multiexp = { workspace = true, features = ["std", "batch"] }
|
||||||
dalek-ff-group = { workspace = true }
|
dalek-ff-group = { workspace = true, features = ["std"] }
|
||||||
zeroize = "1.7"
|
curve25519-dalek = { workspace = true, features = ["alloc", "zeroize", "precomputed-tables"] }
|
||||||
curve25519-dalek = { workspace = true }
|
|
||||||
|
|
||||||
rand = { workspace = true }
|
rand = { workspace = true, features = ["std"] }
|
||||||
|
|
||||||
hex = "0.4"
|
hex = { workspace = true, features = ["std"] }
|
||||||
hex-literal = "0.4"
|
hex-literal = { workspace = true }
|
||||||
primitive-types = { version = "0.12.2", default-features = false }
|
primitive-types = { workspace = true } # enabiling std pulls in 9 extra crates!
|
||||||
|
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true, features = ["std"] }
|
||||||
thiserror = { workspace = true }
|
thiserror = { workspace = true }
|
||||||
|
|
||||||
rayon = { workspace = true, optional = true }
|
rayon = { workspace = true, optional = true }
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#![cfg(feature = "binaries")]
|
mod tx_pool;
|
||||||
|
|
||||||
|
#[cfg(feature = "binaries")]
|
||||||
|
mod bin {
|
||||||
use std::{
|
use std::{
|
||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
ops::Range,
|
ops::Range,
|
||||||
|
@ -34,7 +36,7 @@ use cuprate_consensus::{
|
||||||
|
|
||||||
use monero_consensus::{blocks::randomx_seed_height, HardFork};
|
use monero_consensus::{blocks::randomx_seed_height, HardFork};
|
||||||
|
|
||||||
mod tx_pool;
|
use super::tx_pool;
|
||||||
|
|
||||||
const MAX_BLOCKS_IN_RANGE: u64 = 500;
|
const MAX_BLOCKS_IN_RANGE: u64 = 500;
|
||||||
const BATCHES_IN_REQUEST: u64 = 3;
|
const BATCHES_IN_REQUEST: u64 = 3;
|
||||||
|
@ -101,7 +103,8 @@ where
|
||||||
D::Future: Send + 'static,
|
D::Future: Send + 'static,
|
||||||
{
|
{
|
||||||
let mut next_fut = tokio::spawn(call_batch(
|
let mut next_fut = tokio::spawn(call_batch(
|
||||||
start_height..(start_height + (MAX_BLOCKS_IN_RANGE * BATCHES_IN_REQUEST)).min(chain_height),
|
start_height
|
||||||
|
..(start_height + (MAX_BLOCKS_IN_RANGE * BATCHES_IN_REQUEST)).min(chain_height),
|
||||||
database.clone(),
|
database.clone(),
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -333,6 +336,18 @@ where
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async fn rayon_spawn_async<F, R>(f: F) -> R
|
||||||
|
where
|
||||||
|
F: FnOnce() -> R + Send + 'static,
|
||||||
|
R: Send + 'static,
|
||||||
|
{
|
||||||
|
let (tx, rx) = tokio::sync::oneshot::channel();
|
||||||
|
rayon::spawn(|| {
|
||||||
|
let _ = tx.send(f());
|
||||||
|
});
|
||||||
|
rx.await.expect("The sender must not be dropped")
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Parser)]
|
#[derive(Parser)]
|
||||||
struct Args {
|
struct Args {
|
||||||
/// The log level, valid values:
|
/// The log level, valid values:
|
||||||
|
@ -357,8 +372,7 @@ struct Args {
|
||||||
cache_dir: Option<PathBuf>,
|
cache_dir: Option<PathBuf>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
pub async fn run() {
|
||||||
async fn main() {
|
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
|
|
||||||
if args.dont_use_default_nodes & args.rpc_nodes.is_empty() {
|
if args.dont_use_default_nodes & args.rpc_nodes.is_empty() {
|
||||||
|
@ -492,15 +506,13 @@ async fn main() {
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn rayon_spawn_async<F, R>(f: F) -> R
|
|
||||||
where
|
|
||||||
F: FnOnce() -> R + Send + 'static,
|
|
||||||
R: Send + 'static,
|
|
||||||
{
|
|
||||||
let (tx, rx) = tokio::sync::oneshot::channel();
|
|
||||||
rayon::spawn(|| {
|
|
||||||
let _ = tx.send(f());
|
|
||||||
});
|
|
||||||
rx.await.expect("The sender must not be dropped")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "binaries")]
|
||||||
|
#[tokio::main]
|
||||||
|
async fn main() {
|
||||||
|
bin::run().await
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "binaries"))]
|
||||||
|
fn main() {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#![cfg(feature = "binaries")]
|
#[cfg(feature = "binaries")]
|
||||||
|
mod bin {
|
||||||
use std::{
|
use std::{
|
||||||
collections::HashMap,
|
collections::HashMap,
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
|
@ -242,6 +242,10 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "binaries")]
|
||||||
|
pub use bin::*;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -14,8 +14,8 @@ time = ["dep:chrono", "std"]
|
||||||
thread = ["std", "dep:target_os_lib"]
|
thread = ["std", "dep:target_os_lib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { workspace = true, optional = true }
|
chrono = { workspace = true, optional = true, features = ["std", "clock"] }
|
||||||
futures = { workspace = true, optional = true }
|
futures = { workspace = true, optional = true, features = ["std"] }
|
||||||
rayon = { workspace = true, optional = true }
|
rayon = { workspace = true, optional = true }
|
||||||
|
|
||||||
# This is kinda a stupid work around.
|
# This is kinda a stupid work around.
|
||||||
|
|
|
@ -11,20 +11,21 @@ cuprate-common = {path = "../../common"}
|
||||||
monero-wire = {path= "../../net/monero-wire"}
|
monero-wire = {path= "../../net/monero-wire"}
|
||||||
monero-p2p = {path = "../monero-p2p" }
|
monero-p2p = {path = "../monero-p2p" }
|
||||||
|
|
||||||
tower = { version= "0.4.13", features = ["util", "buffer"] }
|
tower = { workspace = true, features = ["util", "buffer"] }
|
||||||
tokio = {version = "1.34.0", default-features = false, features = ["time", "fs", "rt"]}
|
tokio = { workspace = true, features = ["time", "fs", "rt"]}
|
||||||
|
|
||||||
futures = "0.3.29"
|
futures = { workspace = true, features = ["std"] }
|
||||||
pin-project = "1.1.3"
|
pin-project = { workspace = true }
|
||||||
async-trait = "0.1.74"
|
async-trait = { workspace = true }
|
||||||
|
|
||||||
thiserror = "1.0.50"
|
thiserror = { workspace = true }
|
||||||
tracing = "0.1.40"
|
tracing = { workspace = true, features = ["std", "attributes"] }
|
||||||
|
|
||||||
rand = "0.8.5"
|
rand = { workspace = true, features = ["std", "std_rng"] }
|
||||||
|
|
||||||
borsh = {version = "1.2.1", features = ["derive"]}
|
borsh = { workspace = true, features = ["derive", "std"]}
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = {version = "1.34.0", features = ["rt-multi-thread", "macros"]}
|
|
||||||
cuprate-test-utils = {path = "../../test-utils"}
|
cuprate-test-utils = {path = "../../test-utils"}
|
||||||
|
|
||||||
|
tokio = { workspace = true, features = ["rt-multi-thread", "macros"]}
|
||||||
|
|
|
@ -13,21 +13,21 @@ borsh = ["dep:borsh"]
|
||||||
monero-wire = {path= "../../net/monero-wire"}
|
monero-wire = {path= "../../net/monero-wire"}
|
||||||
cuprate-common = {path = "../../common", features = ["borsh"]}
|
cuprate-common = {path = "../../common", features = ["borsh"]}
|
||||||
|
|
||||||
tokio = {version= "1.34.0", default-features = false, features = ["net", "sync"]}
|
tokio = { workspace = true, features = ["net", "sync", "macros"]}
|
||||||
tokio-util = { version = "0.7.10", default-features = false, features = ["codec"] }
|
tokio-util = { workspace = true, features = ["codec"] }
|
||||||
tokio-stream = {version = "0.1.14", default-features = false, features = ["sync"]}
|
tokio-stream = { workspace = true, features = ["sync"]}
|
||||||
futures = "0.3.29"
|
futures = { workspace = true, features = ["std"] }
|
||||||
async-trait = "0.1.74"
|
async-trait = { workspace = true }
|
||||||
tower = { version= "0.4.13", features = ["util"] }
|
tower = { workspace = true, features = ["util"] }
|
||||||
|
|
||||||
thiserror = "1.0.50"
|
thiserror = { workspace = true }
|
||||||
tracing = "0.1.40"
|
tracing = { workspace = true, features = ["std"] }
|
||||||
|
|
||||||
borsh = {version = "1.2.1", default-features = false, features = ["derive", "std"], optional = true }
|
borsh = { workspace = true, default-features = false, features = ["derive", "std"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
cuprate-test-utils = {path = "../../test-utils"}
|
cuprate-test-utils = {path = "../../test-utils"}
|
||||||
|
|
||||||
hex = "0.4.3"
|
hex = { workspace = true }
|
||||||
tokio = {version= "1.34.0", default-features = false, features = ["net", "rt-multi-thread", "rt", "macros"]}
|
tokio = { workspace = true, features = ["net", "rt-multi-thread", "rt", "macros"]}
|
||||||
tracing-subscriber = "0.3"
|
tracing-subscriber = { workspace = true }
|
||||||
|
|
|
@ -7,7 +7,7 @@ edition = "2021"
|
||||||
monero-wire = {path = "../net/monero-wire"}
|
monero-wire = {path = "../net/monero-wire"}
|
||||||
monero-p2p = {path = "../p2p/monero-p2p" }
|
monero-p2p = {path = "../p2p/monero-p2p" }
|
||||||
|
|
||||||
futures = "0.3.29"
|
futures = { workspace = true, features = ["std"] }
|
||||||
async-trait = "0.1.74"
|
async-trait = { workspace = true }
|
||||||
|
|
||||||
borsh = {version = "1.2.1", features = ["derive"]}
|
borsh = { workspace = true, features = ["derive"]}
|
Loading…
Reference in a new issue