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

upgrade rust to 1.74.1 #1239

Merged
merged 9 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
2 changes: 1 addition & 1 deletion .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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
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/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
Loading