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

Move cargo deps to workspaces, update rustc, deps #2392

Merged
merged 4 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,399 changes: 637 additions & 762 deletions lib/Cargo.lock

Large diffs are not rendered by default.

102 changes: 102 additions & 0 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,105 @@ lto = true
vsdb = { git = 'https://github.com/defich/vsdb.git' }
vsdbsled = { git = 'https://github.com/defich/vsdbsled.git' }
ethereum = { git = 'https://github.com/defich/ethereum.git' }

[workspace.dependencies]

## lang

log = "0.4"
env_logger = "0.10"
anyhow = "1.0"
thiserror = "1.0"
rand = "0.8"
once_cell = "1.17"
lazy_static = "1.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.1", features = ["rt-multi-thread"] }
async-trait = "0.1"
regex = "1.5"

## crypto

libsecp256k1 = "0.7"
ripemd = { version = "0.1", default-features = false }
sha3 = "0.10"

## common

num = { version = "0.4", default-features = false, features = ["alloc"] }
num-traits = "0.2"

hex = "0.4"
hex-literal = "0.4"
bincode = "1.3"
serde_with = "3.0"

cxx = "1.0"
cxx-build = "1.0"
tonic = "0.9"
tonic-build = "0.9"
prost = "0.11"
prost-build = "0.11"

jsonrpsee = { version = "0.16", features = ["server", "macros", "http-client"] }
jsonrpsee-core = "0.16"
jsonrpsee-server = "0.16"
jsonrpsee-types = "0.16"

### eth

ethereum = "0.14"
ethereum-types = "0.14"
keccak-hash = "0.10"
primitive-types = { version = "0.12", default-features = false, features = ["serde"] }
rlp = "0.5"


### ain-evm
evm = { version = "0.39", default-features = false, features = ["with-serde"] }
ethbloom = "0.13"
statrs = "0.16"
rustc-hex = "2.1"

#### Trie dependencies
hash-db = "0.16"
sp-core = "22.0"
vsdb_trie_db = { version = "0.7", git = "https://github.com/defich/vsdb.git", features = ["rocks_engine"] }
vsdb_core = { version = "0.55", git = "https://github.com/defich/vsdb.git", features = ["rocks_engine", "compress"] }
vsdbsled = { git = "https://github.com/defich/vsdbsled.git" }

#### Cache dependencies
lru = "0.11"

#### Precompile dependencies
sp-io = "24.0"
substrate-bn = "0.6"

#### Database dependencies
rocksdb = { version = "0.21", default-features = false }

## build-deps


### ain-rs-exports

cxx-gen = "0.7"
proc-macro2 = "1.0"

### ain-evm

tempdir = "0.3"

### ain-contracts

ethers = "2.0"
ethers-solc = "2.0"

### ain-grpc

heck = "0.4"
quote = "1.0"
syn = { version = "2.0", default-features = false, features = ["parsing", "printing"] }

prettyplease = "0.2.4"
25 changes: 13 additions & 12 deletions lib/ain-contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
primitive-types = "0.12.1"
anyhow = "1.0"
ethereum = "0.14.0"
serde_json = "1.0.96"
hex = "0.4.3"
lazy_static = "1.4"
sha3 = "0.10.6"
sp-core = "20.0.0"
primitive-types.workspace = true
anyhow.workspace = true
ethereum.workspace = true
serde_json.workspace = true
hex.workspace = true
lazy_static.workspace = true
sha3.workspace = true
sp-core.workspace = true

[build-dependencies]
ethers = "2.0.7"
ethers-solc = "2.0.7"
serde_json = "1.0"
anyhow = "1.0"
ethers.workspace = true
ethers-solc.workspace = true
serde_json.workspace = true
anyhow.workspace = true

8 changes: 4 additions & 4 deletions lib/ain-cpp-imports/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
cxx = "1.0"
serde = { version = "1.0", features = ["derive"] }
cxx.workspace = true
serde = { workspace = true, features = ["derive"] }

[build-dependencies]
anyhow = "1.0.70"
cxx-build = "1.0"
anyhow.workspace = true
cxx-build.workspace = true
76 changes: 38 additions & 38 deletions lib/ain-evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,53 @@ edition = "2021"
ain-cpp-imports = { path = "../ain-cpp-imports" }
ain-contracts = { path = "../ain-contracts" }

evm = { version = "0.39", default-features = false, features = ["with-serde"] }
primitive-types = { version = "0.12", default-features = false, features = ["serde"] }
log = "0.4"
rlp = "0.5.2"
libsecp256k1 = "0.7.1"
ethereum = "0.14.0"
sha3 = "0.10.6"
hex = "0.4.3"
hex-literal = "0.4"
anyhow = "1.0"
thiserror = "1.0.44"
bincode = "1.3.3"
rand = "0.8.5"
keccak-hash = "0.10.0"
serde = { version = "1.0", features = ["derive"] }
ethbloom = "0.13.0"
ethereum-types = "0.14.1"
serde_json = "1.0.96"
statrs = "0.16.0"
rustc-hex = "2.1.0"
evm = { workspace = true, default-features = false, features = ["with-serde"] }
primitive-types = { workspace = true, default-features = false, features = ["serde"] }
log.workspace = true
rlp.workspace = true
libsecp256k1.workspace = true
ethereum.workspace = true
sha3.workspace = true
hex.workspace = true
hex-literal.workspace = true
anyhow.workspace = true
thiserror.workspace = true
bincode.workspace = true
rand.workspace = true
keccak-hash.workspace = true
serde = { workspace = true, features = ["derive"] }
ethbloom.workspace = true
ethereum-types.workspace = true
serde_json.workspace = true
statrs.workspace = true
rustc-hex.workspace = true

# Trie dependencies
hash-db = "0.16.0"
sp-core = "20.0.0"
vsdb_trie_db = { version = "0.7.0", git = "https://github.com/defich/vsdb.git", features = ["rocks_engine"] }
vsdb_core = { version = "0.55.0", git = "https://github.com/defich/vsdb.git", features = ["rocks_engine", "compress"] }
vsdbsled = { git = "https://github.com/defich/vsdbsled.git" }
hash-db.workspace = true
sp-core.workspace = true
vsdb_trie_db = { workspace = true, features = ["rocks_engine"] }
vsdb_core = { workspace = true, features = ["rocks_engine", "compress"] }
vsdbsled = { workspace = true }

# Runtime dependencies
lazy_static = "1.4"
jsonrpsee-core = "0.18"
jsonrpsee-http-server = "0.15"
jsonrpsee-types = "0.18"
tokio = { version = "1.1", features = ["rt-multi-thread"] }
lazy_static.workspace = true
jsonrpsee-core.workspace = true
jsonrpsee-server.workspace = true
jsonrpsee-types.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }

# Cache dependencies
lru = "0.10.0"
lru.workspace = true

# Precompile dependencies
sp-io = "20.0.0"
num = { version = "0.4", default-features = false, features = ["alloc"] }
ripemd = { version = "0.1", default-features = false }
substrate-bn = "0.6.0"
sp-io.workspace = true
num = { workspace = true, default-features = false, features = ["alloc"] }
ripemd = { workspace = true, default-features = false }
substrate-bn.workspace = true

# Database dependencies
rocksdb = { version = "0.20.1", default-features = false }
rocksdb = { workspace = true, default-features = false }

[dev-dependencies]
tempdir = "0.3.7"
once_cell = "1.17.1"
tempdir.workspace = true
once_cell.workspace = true
2 changes: 1 addition & 1 deletion lib/ain-evm/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl EVMServices {
self.reserve_dst20_namespace(&mut executor)?;

let migration_txs = get_dst20_migration_txs(mnview_ptr)?;
queue.transactions.extend(migration_txs.into_iter());
queue.transactions.extend(migration_txs);

// Deploy counter contract on the first block
let DeployContractInfo {
Expand Down
2 changes: 1 addition & 1 deletion lib/ain-evm/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::{Arc, Mutex};
use std::thread::{self, JoinHandle};

use anyhow::Result;
use jsonrpsee_http_server::HttpServerHandle;
use jsonrpsee_server::ServerHandle as HttpServerHandle;
use tokio::runtime::{Builder, Handle as AsyncHandle};
use tokio::sync::mpsc::{self, Sender};

Expand Down
63 changes: 32 additions & 31 deletions lib/ain-grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,37 @@ build = "build.rs"
[dependencies]
ain-evm = { path = "../ain-evm" }
ain-cpp-imports = { path = "../ain-cpp-imports" }
cxx = "1.0"
env_logger = "0.10"
jsonrpsee = { version = "0.15", features = ["http-server", "macros", "http-client"] }
lazy_static = "1.4"
log = "0.4"
libsecp256k1 = "0.7.1"
num-traits = "0.2"
prost = "0.11"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.1", features = ["rt-multi-thread"] }
tonic = "0.9"
primitive-types = "0.12.1"
ethereum = "0.14.0"
ethereum-types = "0.14.1"
hex = "0.4.3"
async-trait = "0.1.68"
rlp = "0.5.2"
sha3 = "0.10.6"
serde_with = "3.0.0"
anyhow = "1.0.71"
cxx.workspace = true
env_logger.workspace = true
jsonrpsee = { workspace = true, features = ["server", "macros", "http-client"] }
jsonrpsee-server.workspace = true
lazy_static.workspace = true
log.workspace = true
libsecp256k1.workspace = true
num-traits.workspace = true
prost.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
tokio = { workspace = true, features = ["rt-multi-thread"] }
tonic.workspace = true
primitive-types.workspace = true
ethereum.workspace = true
ethereum-types.workspace = true
hex.workspace = true
async-trait.workspace = true
rlp.workspace = true
sha3.workspace = true
serde_with.workspace = true
anyhow.workspace = true

[build-dependencies]
cxx-gen = "0.7"
heck = "0.4"
proc-macro2 = "1.0"
quote = "1.0"
regex = "1.5"
syn = { version = "2.0", default-features = false, features = ["parsing", "printing"] }
prost-build = "0.11"
tonic-build = "0.9"
prettyplease = "0.2.4"
anyhow = "1.0.70"
cxx-gen.workspace = true
heck.workspace = true
proc-macro2.workspace = true
quote.workspace = true
regex.workspace = true
syn = { workspace = true, default-features = false, features = ["parsing", "printing"] }
prost-build.workspace = true
tonic-build.workspace = true
prettyplease.workspace = true
anyhow.workspace = true
2 changes: 1 addition & 1 deletion lib/ain-grpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use std::{net::SocketAddr, path::PathBuf};
use ain_evm::services::{Services, IS_SERVICES_INIT_CALL, SERVICES};
use anyhow::{format_err, Result};
use jsonrpsee::core::server::rpc_module::Methods;
use jsonrpsee::http_server::HttpServerBuilder;
use jsonrpsee_server::ServerBuilder as HttpServerBuilder;
use log::info;
use logging::CppLogTarget;

Expand Down
20 changes: 10 additions & 10 deletions lib/ain-rs-exports/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ ain-evm = { path = "../ain-evm" }
ain-grpc = { path = "../ain-grpc" }
ain-contracts = { path = "../ain-contracts" }

ethereum = "0.14.0"
rlp = "0.5.2"
primitive-types = "0.12.1"
log = { version = "0.4" }
hex = "0.4.3"
serde_json = "1.0"
anyhow = "1.0.71"
ethereum.workspace = true
rlp.workspace = true
primitive-types.workspace = true
log.workspace = true
hex.workspace = true
serde_json.workspace = true
anyhow.workspace = true

# Build
cxx = "1.0"
cxx.workspace = true

[build-dependencies]
cxx-gen = "0.7"
proc-macro2 = "1.0"
cxx-gen.workspace = true
proc-macro2.workspace = true
2 changes: 1 addition & 1 deletion make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ setup_vars() {
PYTHON_VENV_DIR=${PYTHON_VENV_DIR:-"${BUILD_DIR}/pyenv"}

CLANG_DEFAULT_VERSION=${CLANG_DEFAULT_VERSION:-"15"}
RUST_DEFAULT_VERSION=${RUST_DEFAULT_VERSION:-"1.71"}
RUST_DEFAULT_VERSION=${RUST_DEFAULT_VERSION:-"1.72"}

MAKE_DEBUG=${MAKE_DEBUG:-"1"}
MAKE_USE_CLANG=${MAKE_USE_CLANG:-"$(get_default_use_clang)"}
Expand Down