Rust updates (#2619)

### Description

Let this one slip a while. Updates our version of rust and as many
packages as did not conflict with solana. I think we are going to need
to figure something better out going forward with solana since if we
have a couple more envs like this, it is going to make updates very
hard.

### Drive-by changes

None

### Related issues

General Maintenance

### Backward compatibility

Yes

### Testing

Manual & Unit Tests
pull/2633/head
Mattie Conover 1 year ago committed by GitHub
parent 032e2492c4
commit a5e1815746
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      rust-toolchain
  2. 1155
      rust/Cargo.lock
  3. 93
      rust/Cargo.toml
  4. 2
      rust/Dockerfile
  5. 4
      rust/README.md
  6. 4
      rust/agents/relayer/Cargo.toml
  7. 6
      rust/agents/scraper/Cargo.toml
  8. 6
      rust/agents/scraper/migration/Cargo.toml
  9. 2
      rust/agents/validator/Cargo.toml
  10. 4
      rust/chains/hyperlane-ethereum/src/aggregation_ism.rs
  11. 7
      rust/chains/hyperlane-sealevel/src/utils.rs
  12. 2
      rust/ethers-prometheus/Cargo.toml
  13. 20
      rust/hyperlane-base/Cargo.toml
  14. 11
      rust/hyperlane-base/src/metrics/core.rs
  15. 8
      rust/hyperlane-base/src/types/s3_storage.rs
  16. 16
      rust/hyperlane-core/Cargo.toml
  17. 2
      rust/hyperlane-test/Cargo.toml
  18. 2
      rust/sealevel/programs/hyperlane-sealevel-token-native/Cargo.toml
  19. 3
      rust/sealevel/programs/mailbox/Cargo.toml
  20. 2
      rust/utils/backtrace-oneline/Cargo.toml
  21. 2
      rust/utils/hex/Cargo.toml
  22. 14
      rust/utils/run-locally/Cargo.toml

@ -1,3 +1,3 @@
[toolchain]
channel = "1.69"
channel = "1.71.1"
profile = "default"

1155
rust/Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -50,44 +50,66 @@ version = "0.1.0"
Inflector = "0.11.4"
anyhow = "1.0"
async-trait = "0.1"
base64 = "0.13"
auto_impl = "1.0"
backtrace = "0.3"
base64 = "0.21.2"
bincode = "1.3"
blake3 = "1.3"
borsh = "0.9"
bs58 = "0.4.0"
bs58 = "0.5.0"
bytes = "1"
clap = "4"
color-eyre = "0.6"
config = "~0.13.3"
convert_case = "0.6"
crunchy = "0.2"
ctrlc = "3.2"
curve25519-dalek = { version = "~3.2", features = ["serde"] }
derive-new = "0.5"
derive_builder = "0.12"
derive_more = "0.99"
ed25519-dalek = "~1.0"
enum_dispatch = "0.3"
eyre = "0.6"
fixed-hash = "0.8.0"
fuels = "0.38"
fuels-code-gen = "0.38"
futures = "0.3"
futures-util = "0.3"
generic-array = { version = "0.14", features = ["serde", "more_lengths"] }
getrandom = { version = "0.2", features = ["js"] } # Required for WASM support https://docs.rs/getrandom/latest/getrandom/#webassembly-support
hex = "0.4"
itertools = "0.10"
itertools = "0.11.0"
jsonrpc-core = "18.0"
log = "0.4"
macro_rules_attribute = "0.2"
maplit = "1.0"
mockall = "0.11"
nix = { version = "0.26", default-features = false }
num = "0.4"
num-derive = "0.3"
num-bigint = "0.4"
num-derive = "0.4.0"
num-traits = "0.2"
opentelemetry = "0.20.0"
opentelemetry-jaeger = "0.19.0"
opentelemetry-zipkin = "0.18.0"
parking_lot = "0.12"
paste = "1.0"
pretty_env_logger = "0.4"
pretty_env_logger = "0.5.0"
primitive-types = "=0.12.1"
prometheus = "0.13"
regex = "1.5"
reqwest = "0.11"
rlp = "=0.5.2"
rocksdb = "0.20"
rocksdb = "0.21.0"
sea-orm = { version = "0.11.1", features = ["sqlx-postgres", "runtime-tokio-native-tls", "with-bigdecimal", "with-time", "macros"] }
sea-orm-migration = { version = "0.11.1", features = ["sqlx-postgres", "runtime-tokio-native-tls"] }
semver = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_bytes = "0.11"
serde_derive = "1.0"
serde_json = "1.0"
sha2 = "0.10"
sha3 = "0.10"
solana-account-decoder = "=1.14.13"
solana-banks-client = "=1.14.13"
solana-banks-interface = "=1.14.13"
@ -106,26 +128,26 @@ spl-token = { version = "=3.5.0", features = ["no-entrypoint"] }
spl-token-2022 = { version = "=0.5.0", features = ["no-entrypoint"] }
spl-type-length-value = "=0.1.0"
static_assertions = "1.1"
strum = "0.24"
strum_macros = "0.24"
strum = "0.25.0"
strum_macros = "0.25.2"
tempfile = "3.3"
thiserror = "1.0"
time = "0.3"
tiny-keccak = "2.0.2"
tokio = { version = "1", features = ["parking_lot"] }
tokio-test = "0.4"
tracing = { version = "0.1", features = ["release_max_level_debug"] }
tracing-error = "0.2"
tracing-futures = "0.2"
ureq = "2.4"
tracing-opentelemetry = "0.20.0"
tracing-subscriber = { version = "0.3", default-features = false }
uint = "0.9.5"
ureq = { version = "2.4", default-features = false }
url = "2.3"
walkdir = "2"
warp = "0.3"
which = "4.3"
# Required for WASM support https://docs.rs/getrandom/latest/getrandom/#webassembly-support
getrandom = { version = "0.2", features = ["js"] }
[workspace.dependencies.curve25519-dalek]
version = "~3.2"
features = ["serde"]
[workspace.dependencies.ed25519-dalek]
version = "~1.0"
features = []
[workspace.dependencies.ethers]
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2023-06-01"
@ -151,35 +173,6 @@ git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2023-06-01"
features = ["aws"]
[workspace.dependencies.generic-array]
version = "0.14"
features = [
"serde",
"more_lengths",
]
default-features = false
[workspace.dependencies.serde]
version = "1.0"
features = ["derive"]
[workspace.dependencies.solana]
path = "patches/solana-1.14.13"
features = []
[workspace.dependencies.tokio]
version = "1"
features = ["parking_lot"]
[workspace.dependencies.tracing]
version = "0.1"
features = ["release_max_level_debug"]
[workspace.dependencies.tracing-subscriber]
version = "0.3"
features = []
default-features = false
[patch.crates-io.curve25519-dalek]
version = "3.2.2"
git = "https://github.com/Eclipse-Laboratories-Inc/curve25519-dalek"

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:experimental
FROM rust:1.69 as builder
FROM rust:1.71.1 as builder
WORKDIR /usr/src
# 1a: Prepare for static linking

@ -5,14 +5,14 @@
- install `rustup`
- [link here](https://rustup.rs/)
Note: You should be running >= version `1.69.0` of the rustc compiler, you can see that version with this command and
Note: You should be running >= version `1.71.1` of the rustc compiler, you can see that version with this command and
should see similar output:
```
$ rustup --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.69.0 (84c898d65 2023-04-16)`
info: The currently active `rustc` version is `rustc 1.71.1 (eb26296b5 2023-08-03)`
```
### Running Locally

@ -29,7 +29,7 @@ tokio = { workspace = true, features = ["rt", "macros", "parking_lot"] }
tracing-futures.workspace = true
tracing-subscriber.workspace = true
tracing.workspace = true
regex = "1.5"
regex.workspace = true
hyperlane-core = { path = "../../hyperlane-core", features = ["agent"] }
hyperlane-base = { path = "../../hyperlane-base" }
@ -39,7 +39,7 @@ num-traits.workspace = true
derive_more.workspace = true
[dev-dependencies]
tokio-test = "0.4"
tokio-test.workspace = true
hyperlane-test = { path = "../../hyperlane-test" }
hyperlane-base = { path = "../../hyperlane-base", features = ["test-utils"] }

@ -16,13 +16,13 @@ ethers.workspace = true
eyre.workspace = true
futures.workspace = true
itertools.workspace = true
num-bigint = "0.4"
num-bigint.workspace = true
prometheus.workspace = true
sea-orm = { version = "0.11.1", features = ["sqlx-postgres", "runtime-tokio-native-tls", "with-bigdecimal", "with-time", "macros"] }
sea-orm = { workspace = true }
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
time = "0.3"
time.workspace = true
tokio = { workspace = true, features = ["rt", "macros", "parking_lot"] }
tracing-futures.workspace = true
tracing-subscriber.workspace = true

@ -14,10 +14,10 @@ name = "migration"
path = "src/lib.rs"
[dependencies]
sea-orm = {version = "0.11.1", features = ["macros", "with-bigdecimal", "with-time"]}
sea-orm-migration = { version = "0.11.1", features = ["runtime-tokio-native-tls", "sqlx-postgres"] }
sea-orm.workspace = true
sea-orm-migration.workspace = true
serde.workspace = true
time = "0.3"
time.workspace = true
tokio = { workspace = true, features = ["rt", "macros", "parking_lot"] }
# bin-only deps

@ -29,7 +29,7 @@ hyperlane-base = { path = "../../hyperlane-base" }
hyperlane-ethereum = { path = "../../chains/hyperlane-ethereum" }
[dev-dependencies]
tokio-test = "0.4"
tokio-test.workspace = true
hyperlane-test = { path = "../../hyperlane-test" }
[features]

@ -106,9 +106,9 @@ where
}
}
pub struct EthereumRoutingIsmAbi;
pub struct EthereumAggregationIsmAbi;
impl HyperlaneAbi for EthereumRoutingIsmAbi {
impl HyperlaneAbi for EthereumAggregationIsmAbi {
const SELECTOR_SIZE_BYTES: usize = 4;
fn fn_map() -> HashMap<Vec<u8>, &'static str> {

@ -1,3 +1,4 @@
use base64::Engine;
use borsh::{BorshDeserialize, BorshSerialize};
use hyperlane_core::{ChainCommunicationError, ChainResult};
@ -39,9 +40,9 @@ pub async fn simulate_instruction<T: BorshDeserialize + BorshSerialize>(
if let Some(return_data) = return_data {
let bytes = match return_data.data.1 {
UiReturnDataEncoding::Base64 => {
base64::decode(return_data.data.0).map_err(ChainCommunicationError::from_other)?
}
UiReturnDataEncoding::Base64 => base64::engine::general_purpose::STANDARD
.decode(return_data.data.0)
.map_err(ChainCommunicationError::from_other)?,
};
let decoded_data =

@ -25,7 +25,7 @@ static_assertions.workspace = true
tokio = { workspace = true, features = ["time", "sync", "parking_lot"] }
# enable feature for this crate that is imported by ethers-rs
primitive-types = { version = "*", features = ["fp-conversion"] }
primitive-types = { workspace = true, features = ["fp-conversion"] }
[build-dependencies]
abigen = { path = "../utils/abigen", features = ["ethers"] }

@ -22,24 +22,22 @@ eyre.workspace = true
fuels.workspace = true
futures-util.workspace = true
itertools.workspace = true
mockall = "0.11"
once_cell = "1.16"
paste.workspace = true
prometheus.workspace = true
rocksdb.workspace = true
serde.workspace = true
serde_json.workspace = true
static_assertions.workspace = true
tempfile = { version = "3.3", optional = true }
tempfile = { workspace = true, optional = true }
thiserror.workspace = true
tokio = { workspace = true, features = ["rt", "macros", "parking_lot"] }
tracing-error.workspace = true
tracing-futures.workspace = true
tracing-subscriber = { workspace = true, features = ["json", "ansi"] }
tracing.workspace = true
warp = "0.3"
warp.workspace = true
backtrace = { version = "0.3", optional = true }
backtrace = { workspace = true, optional = true }
backtrace-oneline = { path = "../utils/backtrace-oneline", optional = true }
ethers-prometheus = { path = "../ethers-prometheus", features = ["serde"] }
@ -50,13 +48,13 @@ hyperlane-sealevel = { path = "../chains/hyperlane-sealevel" }
hyperlane-test = { path = "../hyperlane-test" }
# these versions are important!
tracing-opentelemetry = "0.18"
opentelemetry = { version = "0.18", features = ["rt-tokio", "trace"] }
opentelemetry-jaeger = { version = "0.17", features = [
tracing-opentelemetry.workspace = true
opentelemetry = { workspace = true, features = ["rt-tokio", "trace"] }
opentelemetry-jaeger = { workspace = true, features = [
"reqwest_collector_client",
"rt-tokio"
] }
opentelemetry-zipkin = { version = "0.16", default-features = false, features = [
opentelemetry-zipkin = { workspace = true, features = [
"reqwest-client",
] }
@ -68,8 +66,8 @@ rusoto_sts = "*"
[dev-dependencies]
color-eyre.workspace = true
tempfile = "3.3"
walkdir = { version = "2" }
tempfile.workspace = true
walkdir.workspace = true
[features]
default = ["oneline-errors", "color-eyre"]

@ -1,9 +1,8 @@
use std::collections::HashMap;
use std::fmt::{Debug, Formatter};
use std::sync::Arc;
use std::sync::{Arc, OnceLock};
use eyre::Result;
use once_cell::sync::OnceCell;
use prometheus::{
histogram_opts, labels, opts, register_counter_vec_with_registry,
register_gauge_vec_with_registry, register_histogram_vec_with_registry,
@ -48,10 +47,10 @@ pub struct CoreMetrics {
/// Set of metrics that tightly wrap the JsonRpcClient for use with the
/// quorum provider.
json_rpc_client_metrics: OnceCell<JsonRpcClientMetrics>,
json_rpc_client_metrics: OnceLock<JsonRpcClientMetrics>,
/// Set of provider-specific metrics. These only need to get created once.
provider_metrics: OnceCell<MiddlewareMetrics>,
provider_metrics: OnceLock<MiddlewareMetrics>,
}
impl CoreMetrics {
@ -179,8 +178,8 @@ impl CoreMetrics {
latest_checkpoint,
json_rpc_client_metrics: OnceCell::new(),
provider_metrics: OnceCell::new(),
json_rpc_client_metrics: OnceLock::new(),
provider_metrics: OnceLock::new(),
})
}

@ -1,10 +1,10 @@
use std::sync::OnceLock;
use std::{fmt, time::Duration};
use async_trait::async_trait;
use derive_new::new;
use eyre::{bail, Result};
use futures_util::TryStreamExt;
use once_cell::sync::OnceCell;
use prometheus::IntGauge;
use rusoto_core::{
credential::{Anonymous, AwsCredentials, StaticProvider},
@ -13,9 +13,9 @@ use rusoto_core::{
use rusoto_s3::{GetObjectError, GetObjectRequest, PutObjectRequest, S3Client, S3};
use tokio::time::timeout;
use crate::settings::aws_credentials::AwsChainCredentialsProvider;
use hyperlane_core::{SignedAnnouncement, SignedCheckpoint, SignedCheckpointWithMessageId};
use crate::settings::aws_credentials::AwsChainCredentialsProvider;
use crate::CheckpointSyncer;
/// The timeout for S3 requests. Rusoto doesn't offer timeout configuration
@ -32,10 +32,10 @@ pub struct S3Storage {
region: Region,
/// A client with AWS credentials.
#[new(default)]
authenticated_client: OnceCell<S3Client>,
authenticated_client: OnceLock<S3Client>,
/// A client without credentials for anonymous requests.
#[new(default)]
anonymous_client: OnceCell<S3Client>,
anonymous_client: OnceLock<S3Client>,
/// The latest seen signed checkpoint index.
latest_index: Option<IntGauge>,
}

@ -11,11 +11,11 @@ version.workspace = true
[dependencies]
async-trait.workspace = true
auto_impl = "1.0"
auto_impl.workspace = true
borsh.workspace = true
bs58.workspace = true
bytes = { version = "1", features = ["serde"] }
convert_case = "0.6"
bytes = { workspace = true, features = ["serde"] }
convert_case.workspace = true
derive-new.workspace = true
derive_more.workspace = true
eyre.workspace = true
@ -27,18 +27,18 @@ num-derive.workspace = true
num-traits.workspace = true
serde.workspace = true
serde_json.workspace = true
sha3 = "0.10"
sha3.workspace = true
thiserror.workspace = true
uint = "0.9.5"
fixed-hash = "0.8.0"
tiny-keccak = { version = "2.0.2", features = ["keccak"]}
uint.workspace = true
fixed-hash.workspace = true
tiny-keccak = { workspace = true, features = ["keccak"]}
config = { workspace = true, optional = true }
ethers = { workspace = true, optional = true }
ethers-core = { workspace = true, optional = true }
ethers-contract = { workspace = true, optional = true }
ethers-providers = { workspace = true, optional = true }
strum = { workspace = true, optional = true }
strum = { workspace = true, optional = true, features = ["derive"] }
primitive-types = { workspace = true, optional = true }
[dev-dependencies]

@ -11,6 +11,6 @@ version.workspace = true
[dependencies]
async-trait.workspace = true
mockall = "0.11"
mockall.workspace = true
hyperlane-core = { path = "../hyperlane-core" }

@ -32,7 +32,7 @@ hyperlane-test-utils = { path = "../../libraries/test-utils" }
hyperlane-sealevel-test-ism = { path = "../ism/test-ism", features = ["no-entrypoint"] }
# Unfortunately required for some functions in `solana-program-test`, and is not
# re-exported
tarpc = "*"
tarpc = "~0.29"
[lib]
crate-type = ["cdylib", "lib"]

@ -20,6 +20,9 @@ spl-noop.workspace = true
# https://github.com/solana-labs/solana/blob/master/docs/src/developing/on-chain-programs/developing-rust.md#depending-on-rand
getrandom = { workspace = true, features = ["custom"] }
proc-macro-crate = "~1.2.1" # TODO: remove this dependency once solana supports rust >=1.64
blake3 = "=1.4.0" # TODO: update once solana supports rust >= 1.66
access-control = { path = "../../libraries/access-control" }
account-utils = { path = "../../libraries/account-utils" }
hyperlane-core = { path = "../../../hyperlane-core" }

@ -8,5 +8,5 @@ license-file.workspace = true
publish.workspace = true
[dependencies]
backtrace = "0.3"
backtrace.workspace = true
derive-new.workspace = true

@ -8,4 +8,4 @@ license-file.workspace = true
publish.workspace = true
[dependencies]
crunchy = "0.2"
crunchy.workspace = true

@ -10,11 +10,11 @@ publish.workspace = true
version.workspace = true
[dependencies]
ctrlc = "3.2"
ctrlc.workspace = true
eyre.workspace = true
maplit = "1.0"
nix = { version = "0.26", default-features = false, features = ["signal"] }
tempfile = "3.3"
ureq = { version = "2.4", default-features = false }
which = "4.4"
macro_rules_attribute = "0.2"
maplit.workspace = true
nix = { workspace = true, features = ["signal"], default-features = false }
tempfile.workspace = true
ureq = { workspace = true, default-features = false }
which.workspace = true
macro_rules_attribute.workspace = true

Loading…
Cancel
Save