From c52ed9614a03f58da48e9311fbf00bd5884501f7 Mon Sep 17 00:00:00 2001 From: juanbono Date: Wed, 14 Feb 2024 13:49:27 -0300 Subject: [PATCH 1/7] upgrade rust --- Makefile | 4 ++-- rust-toolchain.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8536c4071..b1701f560 100644 --- a/Makefile +++ b/Makefile @@ -166,7 +166,7 @@ deps: check-python-version build-cairo-2-compiler build-cairo-1-compiler -pyenv && pyenv install -s 3.9.15 python3.9 -m venv starknet-venv . starknet-venv/bin/activate && $(MAKE) deps-venv - cargo install cargo-nextest --version 0.9.49 + cargo install cargo-nextest --version 0.9.49 --locked deps-macos: check-python-version build-cairo-2-compiler-macos build-cairo-1-compiler-macos cargo install flamegraph --version 0.6.2 @@ -175,7 +175,7 @@ deps-macos: check-python-version build-cairo-2-compiler-macos build-cairo-1-comp -pyenv install -s 3.9.15 python3.9 -m venv starknet-venv . starknet-venv/bin/activate && $(MAKE) deps-venv - cargo install cargo-nextest + cargo install cargo-nextest --locked clean: -rm -rf starknet-venv/ diff --git a/rust-toolchain.toml b/rust-toolchain.toml index baa36b056..4da0ec7b8 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.72.1" +channel = "1.74.1" components = ["rustfmt", "clippy"] profile = "minimal" From e7fe21afa6e616f02cfbac938c6c1cdecad98522 Mon Sep 17 00:00:00 2001 From: juanbono Date: Wed, 14 Feb 2024 14:01:39 -0300 Subject: [PATCH 2/7] fix clippy --- src/transaction/fee.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transaction/fee.rs b/src/transaction/fee.rs index be9b86f95..c5398f15d 100644 --- a/src/transaction/fee.rs +++ b/src/transaction/fee.rs @@ -221,7 +221,7 @@ pub(crate) fn check_fee_bounds( VersionSpecificAccountTxFields::Current(fields) => { // Check l1_gas amount if (fields.l1_resource_bounds.max_amount as u128) < minimal_l1_gas_amount { - return Err(TransactionError::MaxL1GasAmountTooLow( + Err(TransactionError::MaxL1GasAmountTooLow( fields.l1_resource_bounds.max_amount, minimal_l1_gas_amount, ))?; @@ -230,7 +230,7 @@ pub(crate) fn check_fee_bounds( let actual_gas_price = block_context.get_gas_price_by_fee_type(&account_tx_fields.fee_type()); if fields.l1_resource_bounds.max_price_per_unit < actual_gas_price { - return Err(TransactionError::MaxL1GasPriceTooLow( + Err(TransactionError::MaxL1GasPriceTooLow( fields.l1_resource_bounds.max_price_per_unit, actual_gas_price, ))?; From d4e007b40ead1138374f24c9aa43c91cd12bb3cc Mon Sep 17 00:00:00 2001 From: juanbono Date: Wed, 14 Feb 2024 14:20:52 -0300 Subject: [PATCH 3/7] fix clippy for benches --- bench/yas.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/bench/yas.rs b/bench/yas.rs index 924d86e92..b17e3bbf8 100644 --- a/bench/yas.rs +++ b/bench/yas.rs @@ -283,9 +283,6 @@ fn main() -> Result<(), Box> { let mut state = loop { let mut state = state.clone(); - let yas_router_address = yas_router_address; - let yas_pool_address = yas_pool_address; - // Swap (invoke). info!("Swapping tokens."); let t0 = Instant::now(); From 680fbba5e46ba56cead608fe4a756056d51bf9f3 Mon Sep 17 00:00:00 2001 From: juanbono Date: Thu, 15 Feb 2024 08:14:40 -0300 Subject: [PATCH 4/7] fix clippy for benches --- tests/yas_bench_test.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/yas_bench_test.rs b/tests/yas_bench_test.rs index ad2127dd8..6ace1b773 100644 --- a/tests/yas_bench_test.rs +++ b/tests/yas_bench_test.rs @@ -234,12 +234,6 @@ fn compare_yas_bench() -> Result<(), Box> { // Execute swaps for _ in 0..5 { - let yas_router_address_jit = yas_router_address_jit; - let yas_pool_address_jit = yas_pool_address_jit; - - let yas_router_address_vm = yas_router_address_vm; - let yas_pool_address_vm = yas_pool_address_vm; - swap( &mut state_jit, program_cache_jit.clone(), From 699ff9c7fe3f7fd82af40043ecf1204adbc5f6ae Mon Sep 17 00:00:00 2001 From: juanbono Date: Thu, 15 Feb 2024 09:27:26 -0300 Subject: [PATCH 5/7] go back to 1.72.1 --- rust-toolchain.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4da0ec7b8..baa36b056 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.74.1" +channel = "1.72.1" components = ["rustfmt", "clippy"] profile = "minimal" From 1854f8222adb62ae1c1e5284e82bde7a58d7c353 Mon Sep 17 00:00:00 2001 From: Esteve Soler Arderiu Date: Fri, 16 Feb 2024 15:37:44 +0000 Subject: [PATCH 6/7] Update Rust version. --- .github/workflows/rust-tests.yml | 2 +- rust-toolchain.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-tests.yml b/.github/workflows/rust-tests.yml index bd34ee090..2d1e1cca2 100644 --- a/.github/workflows/rust-tests.yml +++ b/.github/workflows/rust-tests.yml @@ -9,7 +9,7 @@ on: env: CARGO_TERM_COLOR: always - RUST_TOOLCHAIN: '1.72.1' + RUST_TOOLCHAIN: '1.74.1' jobs: build: diff --git a/rust-toolchain.toml b/rust-toolchain.toml index baa36b056..4da0ec7b8 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.72.1" +channel = "1.74.1" components = ["rustfmt", "clippy"] profile = "minimal" From c29111509d1f10fee08dcf983de58662623e44c0 Mon Sep 17 00:00:00 2001 From: Edgar Luque Date: Fri, 16 Feb 2024 18:56:29 +0100 Subject: [PATCH 7/7] missing rust updates --- .github/workflows/rust-tests.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust-tests.yml b/.github/workflows/rust-tests.yml index 2d1e1cca2..aa6e3ad39 100644 --- a/.github/workflows/rust-tests.yml +++ b/.github/workflows/rust-tests.yml @@ -170,7 +170,7 @@ jobs: uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@1.70.0 + uses: dtolnay/rust-toolchain@1.74.1 with: components: llvm-tools-preview diff --git a/README.md b/README.md index fb11b24fb..c262e6abf 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ It makes use of [cairo-vm](https://github.com/lambdaclass/cairo-vm), the Rust im ## 🌅 Getting Started ### Dependencies -- Rust 1.70 +- Rust 1.74.1 - A working installation of cairo-lang 0.12 (for compiling the cairo files) - [Optional, for testing purposes] Heaptrack