Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
upgrade rust to 1.74.1 (#1239)
Browse files Browse the repository at this point in the history
* upgrade rust

* fix clippy

* fix clippy for benches

* fix clippy for benches

* go back to 1.72.1

* Update Rust version.

* missing rust updates

---------

Co-authored-by: Esteve Soler Arderiu <[email protected]>
Co-authored-by: Edgar Luque <[email protected]>
Co-authored-by: Pedro Fontana <[email protected]>
  • Loading branch information
4 people authored Feb 19, 2024
1 parent 8704fd3 commit b7a60e3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: '1.72.1'
RUST_TOOLCHAIN: '1.74.1'

jobs:
build:
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 0 additions & 3 deletions bench/yas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
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();
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.72.1"
channel = "1.74.1"
components = ["rustfmt", "clippy"]
profile = "minimal"
4 changes: 2 additions & 2 deletions src/transaction/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
))?;
Expand All @@ -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,
))?;
Expand Down
6 changes: 0 additions & 6 deletions tests/integration_tests/yas_bench_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,6 @@ fn compare_yas_bench() -> Result<(), Box<dyn std::error::Error>> {
// 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(),
Expand Down

0 comments on commit b7a60e3

Please sign in to comment.