Skip to content

Commit

Permalink
Update dependencies and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD committed Jul 26, 2024
1 parent 6858895 commit 4d0ec75
Show file tree
Hide file tree
Showing 8 changed files with 1,209 additions and 406 deletions.
1,569 changes: 1,184 additions & 385 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag =
evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.42.0-aurora", default-features = false, features = ["std", "tracing"] }
fixed-hash = { version = "0.8", default-features = false }
function_name = "0.3"
git2 = "0.18"
git2 = "0.19"
hex = { version = "0.4", default-features = false, features = ["alloc"] }
ibig = { version = "0.3", default-features = false, features = ["num-traits"] }
impl-serde = { version = "0.4", default-features = false }
Expand All @@ -50,12 +50,12 @@ near-primitives = "0.20"
near-primitives-core = "0.20"
near-sdk = "5"
near-vm-runner = { version = "0.20", features = ["wasmtime_vm", "wasmer2_vm"] }
near-workspaces = "0.10"
near-workspaces = "0.11"
num = { version = "0.4", default-features = false, features = ["alloc"] }
postgres = "0.19"
primitive-types = { version = "0.12", default-features = false, features = ["rlp", "serde_no_std"] }
rand = "0.8"
reqwest = "0.11"
reqwest = "0.12"
ripemd = { version = "0.1", default-features = false }
rlp = { version = "0.5", default-features = false }
rocksdb = { version = "0.21", default-features = false }
Expand All @@ -67,7 +67,7 @@ strum = { version = "0.26", features = ["derive"] }
tempfile = "3"
tokio = { version = "1", default-features = false, features = ["macros"] }
test-case = "3.1"
walrus = "0.20"
walrus = "0.21"
wee_alloc = { version = "0.4", default-features = false }

[workspace]
Expand Down
4 changes: 2 additions & 2 deletions engine-tests/src/tests/repro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ fn repro_8ru7VEA() {
block_timestamp: 1_648_829_935_343_349_589,
input_path: "src/tests/res/input_8ru7VEA.hex",
evm_gas_used: 1_732_181,
near_gas_used: 205,
near_gas_used: 204,
});
}

Expand Down Expand Up @@ -106,7 +106,7 @@ fn repro_D98vwmi() {
block_timestamp: 1_651_753_443_421_003_245,
input_path: "src/tests/res/input_D98vwmi.hex",
evm_gas_used: 1_035_348,
near_gas_used: 168,
near_gas_used: 167,
});
}

Expand Down
2 changes: 1 addition & 1 deletion engine-tests/src/tests/sanity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ fn test_solidity_pure_bench() {
);
let near_gas = profile.all_gas();
assert!(
near_gas > 1500 * 1_000_000_000_000,
near_gas > 1400 * 1_000_000_000_000,
"Expected 1500 NEAR Tgas to be used, but only consumed {}",
near_gas / 1_000_000_000_000,
);
Expand Down
2 changes: 1 addition & 1 deletion engine-tests/src/tests/standalone/tracing.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::doc_lazy_continuation)]
// For the future: #![allow(clippy::doc_lazy_continuation)]
use aurora_engine_sdk::env::Env;
use aurora_engine_types::types::{Address, Wei};
use aurora_engine_types::{H256, U256};
Expand Down
2 changes: 1 addition & 1 deletion engine-tests/src/tests/uniswap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn test_uniswap_input_multihop() {

let (_amount_out, _evm_gas, profile) = context.exact_input(&tokens, INPUT_AMOUNT.into());

assert_eq!(110, profile.all_gas() / 1_000_000_000_000);
assert_eq!(107, profile.all_gas() / 1_000_000_000_000);
}

#[test]
Expand Down
26 changes: 15 additions & 11 deletions engine/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc_error_handler))]
#![cfg_attr(
all(feature = "log", target_arch = "wasm32"),
feature(panic_info_message)
)]
#![deny(clippy::pedantic, clippy::nursery)]
#![allow(
clippy::missing_errors_doc,
Expand Down Expand Up @@ -50,18 +54,18 @@ pub unsafe fn on_panic(info: &::core::panic::PanicInfo) -> ! {
{
use prelude::ToString;

let msg = info.message();
let msg = if let Some(log) = info.location() {
prelude::format!("{} [{}]", msg, log)
} else {
msg.to_string()
};
prelude::sdk::panic_utf8(msg.as_bytes());
}
#[cfg(not(feature = "log"))]
{
::core::arch::wasm32::unreachable();
if let Some(msg) = info.message() {
let msg = if let Some(log) = info.location() {
prelude::format!("{} [{}]", msg, log)
} else {
msg.to_string()
};
prelude::sdk::panic_utf8(msg.as_bytes());
} else if let Some(log) = info.location() {
prelude::sdk::panic_utf8(log.to_string().as_bytes());
}
}
::core::arch::wasm32::unreachable();
}

#[cfg(target_arch = "wasm32")]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-07-15"
channel = "nightly-2024-05-02"
targets = ["wasm32-unknown-unknown"]

0 comments on commit 4d0ec75

Please sign in to comment.