From 74a5e0e126ecde24fce5bd04763cc20626bd0c42 Mon Sep 17 00:00:00 2001 From: Kolby Moroz Liebl <31669092+KolbyML@users.noreply.github.com> Date: Thu, 5 Sep 2024 01:25:33 -0600 Subject: [PATCH] chore: update rust version to 1.80.0 (#1421) --- .circleci/config.yml | 8 ++++---- Cargo.toml | 2 +- .../src/developers/contributing/releases/deployment.md | 6 +++--- book/src/developers/quick_setup.md | 2 +- docker/Dockerfile | 2 +- docker/Dockerfile.bridge | 2 +- rust-toolchain.toml | 2 +- trin-beacon/src/storage.rs | 10 +++++----- .../src/versioned/id_indexed_v1/pruning_strategy.rs | 6 +++--- utp-testing/docker/Dockerfile | 2 +- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index deaf2a387..6596e29f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,7 @@ executors: environment: IMAGE_NAME: portalnetwork/trin docker: - - image: cimg/rust:1.79.0 + - image: cimg/rust:1.80.0 docker-nightly: docker: - image: rustlang/rust:nightly @@ -153,7 +153,7 @@ jobs: resource_class: xlarge executor: name: rust/default - tag: 1.79.0 + tag: 1.80.0 environment: RUSTFLAGS: "-D warnings" RUST_LOG: "debug" @@ -174,7 +174,7 @@ jobs: resource_class: xlarge executor: name: rust/default - tag: 1.79.0 + tag: 1.80.0 environment: RUSTFLAGS: "-D warnings" RUST_LOG: "debug" @@ -211,7 +211,7 @@ jobs: resource_class: 2xlarge executor: name: rust/default - tag: 1.79.0 + tag: 1.80.0 environment: RUSTFLAGS: "-D warnings" RUST_LOG: "debug,html5ever=error,selectors=error,discv5::service=info" diff --git a/Cargo.toml b/Cargo.toml index 0915aa1db..776f8c18f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "trin" version = "0.1.0" authors = ["https://github.com/ethereum/trin/graphs/contributors"] edition = "2021" -rust-version = "1.79.0" +rust-version = "1.80.0" default-run = "trin" repository = "https://github.com/ethereum/trin" license = "GPL-3.0" diff --git a/book/src/developers/contributing/releases/deployment.md b/book/src/developers/contributing/releases/deployment.md index b275e1bb5..290311e68 100644 --- a/book/src/developers/contributing/releases/deployment.md +++ b/book/src/developers/contributing/releases/deployment.md @@ -4,7 +4,7 @@ - Get access to cluster repo (add person to @trin-deployments) - `git clone` the cluster repo: https://github.com/ethereum/cluster.git - Install dependencies within `cluster` virtualenv: - ```shell= + ```bash cd cluster python3 -m venv venv . venv/bin/activate @@ -35,7 +35,7 @@ ### Update Docker images Docker images are how Ansible moves the binaries to the nodes. Update the Docker tags with: -```shell= +```shell docker pull portalnetwork/trin:latest docker pull portalnetwork/trin:latest-bridge docker image tag portalnetwork/trin:latest portalnetwork/trin:testnet @@ -105,7 +105,7 @@ Note that building the Docker image on git's master takes some time. If you merg ### Why can't I decrypt the SOPS file? You might see this when running ansible, or the sops check: -```shell= +```shell Failed to get the data key required to decrypt the SOPS file. Group 0: FAILED diff --git a/book/src/developers/quick_setup.md b/book/src/developers/quick_setup.md index 89c10ba95..c444196e5 100644 --- a/book/src/developers/quick_setup.md +++ b/book/src/developers/quick_setup.md @@ -83,7 +83,7 @@ rustc --version You should see something like: ```bash -rustc 1.79.0 (129f3b996 2024-06-10) +rustc 1.80.0 (051478957 2024-07-21) ``` Next, install the required dependencies: diff --git a/docker/Dockerfile b/docker/Dockerfile index 4164e982f..801f6be52 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ # select build image -FROM rust:1.79.0 AS builder +FROM rust:1.80.0 AS builder # create a new empty shell project RUN USER=root cargo new --bin trin diff --git a/docker/Dockerfile.bridge b/docker/Dockerfile.bridge index 7e4826bba..d7de25324 100644 --- a/docker/Dockerfile.bridge +++ b/docker/Dockerfile.bridge @@ -10,7 +10,7 @@ RUN mkdir /portal-accumulators COPY ./portal-accumulators /portal-accumulators # select build image -FROM rust:1.79.0 AS builder +FROM rust:1.80.0 AS builder # create a new empty shell project RUN USER=root cargo new --bin trin diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 07e2d0e86..51592e498 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -2,4 +2,4 @@ # The default profile includes rustc, rust-std, cargo, rust-docs, rustfmt and clippy. # https://rust-lang.github.io/rustup/concepts/profiles.html profile = "default" -channel = "1.79.0" +channel = "1.80.0" diff --git a/trin-beacon/src/storage.rs b/trin-beacon/src/storage.rs index b7c4a20af..e74b929c8 100644 --- a/trin-beacon/src/storage.rs +++ b/trin-beacon/src/storage.rs @@ -730,7 +730,7 @@ mod test { let key = BeaconContentKey::LightClientBootstrap(LightClientBootstrapKey { block_hash: *block_root, }); - storage.put(key.clone(), &value.as_ssz_bytes()).unwrap(); + storage.put(key.clone(), value.as_ssz_bytes()).unwrap(); let result = storage.get(&key).unwrap().unwrap(); assert_eq!(result, value.as_ssz_bytes()); } @@ -750,7 +750,7 @@ mod test { lc_update_1.clone(), ]) .unwrap(); - storage.put(key.clone(), &value.as_ssz_bytes()).unwrap(); + storage.put(key.clone(), value.as_ssz_bytes()).unwrap(); let result = storage.get(&key).unwrap().unwrap(); assert_eq!(result, value.as_ssz_bytes()); @@ -786,7 +786,7 @@ mod test { let key = BeaconContentKey::LightClientFinalityUpdate(LightClientFinalityUpdateKey { finalized_slot, }); - storage.put(key.clone(), &value.as_ssz_bytes()).unwrap(); + storage.put(key.clone(), value.as_ssz_bytes()).unwrap(); let result = storage.get(&key).unwrap().unwrap(); assert_eq!(result, value.as_ssz_bytes()); @@ -825,7 +825,7 @@ mod test { let key = BeaconContentKey::LightClientOptimisticUpdate(LightClientOptimisticUpdateKey { signature_slot, }); - storage.put(key.clone(), &value.as_ssz_bytes()).unwrap(); + storage.put(key.clone(), value.as_ssz_bytes()).unwrap(); let result = storage.get(&key).unwrap().unwrap(); assert_eq!(result, value.as_ssz_bytes()); @@ -864,7 +864,7 @@ mod test { let key = BeaconContentKey::HistoricalSummariesWithProof(HistoricalSummariesWithProofKey { epoch, }); - storage.put(key.clone(), &value.as_ssz_bytes()).unwrap(); + storage.put(key.clone(), value.as_ssz_bytes()).unwrap(); let result = storage.get(&key).unwrap().unwrap(); assert_eq!(result, value.as_ssz_bytes()); diff --git a/trin-storage/src/versioned/id_indexed_v1/pruning_strategy.rs b/trin-storage/src/versioned/id_indexed_v1/pruning_strategy.rs index 9b71c43dd..8e6bb5d67 100644 --- a/trin-storage/src/versioned/id_indexed_v1/pruning_strategy.rs +++ b/trin-storage/src/versioned/id_indexed_v1/pruning_strategy.rs @@ -77,12 +77,12 @@ impl Default for PruningConfig { /// Ideally, we would want to prune down to `target_capacity_bytes`, but this would usually be too /// slow. The `max_pruning_count` represents the maximum number of entries that we will prune at /// one point, and it will be updated based on how long it takes in comparison to -/// `optimal_pruning_duration_range`: +/// `optimal_pruning_duration_range`: /// - it will not change if pruning duration falls within `optimal_pruning_duration_range` /// - it will increase by `max_pruning_count_change_fraction` if pruning duration is below the -/// `optimal_pruning_duration_range` +/// `optimal_pruning_duration_range` /// - it will decrease by `max_pruning_count_change_fraction` if pruning duration is above the -/// `optimal_pruning_duration_range` +/// `optimal_pruning_duration_range` pub struct PruningStrategy { /// The store configuration. config: IdIndexedV1StoreConfig, diff --git a/utp-testing/docker/Dockerfile b/utp-testing/docker/Dockerfile index 7494857c9..e0cc02fae 100644 --- a/utp-testing/docker/Dockerfile +++ b/utp-testing/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.79.0-bullseye AS builder +FROM rust:1.80.0-bullseye AS builder RUN apt-get update \ && apt-get install clang -y \