Skip to content

Commit

Permalink
Chore: Update SputnikVM to v0.46.1-aurora (#966)
Browse files Browse the repository at this point in the history
## Description

🚀  Updated SputnikVM (EVM) to `v0.46.1-aurora`

### Gas cost

For some tests gas costs decreased.
  • Loading branch information
mrLSD authored Oct 17, 2024
1 parent 5bd7b6b commit 59e63d1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 23 deletions.
17 changes: 9 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ byte-slice-cast = { version = "1", default-features = false }
criterion = "0.5"
digest = "0.10"
ethabi = { version = "18", default-features = false }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.45.4-aurora", default-features = false }
evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.45.4-aurora", default-features = false, features = ["std"] }
evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.45.4-aurora", default-features = false, features = ["std", "tracing"] }
evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.45.4-aurora", default-features = false, features = ["std", "tracing"] }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.46.1-aurora", default-features = false }
evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.46.1-aurora", default-features = false, features = ["std"] }
evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.46.1-aurora", default-features = false, features = ["std", "tracing"] }
evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.46.1-aurora", default-features = false, features = ["std", "tracing"] }
fixed-hash = { version = "0.8", default-features = false }
function_name = "0.3"
git2 = "0.19"
Expand Down
10 changes: 3 additions & 7 deletions engine-precompiles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ use aurora_engine_sdk::env::Env;
use aurora_engine_sdk::io::IO;
use aurora_engine_sdk::promise::ReadOnlyPromiseHandler;
use aurora_engine_types::{account_id::AccountId, types::Address, vec, BTreeMap, BTreeSet, Box};
use evm::backend::Log;
use evm::executor::{
self,
stack::{PrecompileFailure, PrecompileHandle},
};
use evm::{backend::Log, executor::stack::IsPrecompileResult};
use evm::{Context, ExitError, ExitFatal, ExitSucceed};
use promise_result::PromiseResult;
use xcc::cross_contract_call;
Expand Down Expand Up @@ -156,12 +156,8 @@ impl<'a, I: IO + Copy, E: Env, H: ReadOnlyPromiseHandler> executor::stack::Preco
Some(result.and_then(|output| post_process(output, handle)))
}

fn is_precompile(&self, address: prelude::H160, _remaining_gas: u64) -> IsPrecompileResult {
let is_precompile = self.all_precompiles.contains_key(&Address::new(address));
IsPrecompileResult::Answer {
is_precompile,
extra_cost: 0,
}
fn is_precompile(&self, address: prelude::H160) -> bool {
self.all_precompiles.contains_key(&Address::new(address))
}
}

Expand Down
5 changes: 1 addition & 4 deletions engine-tests/src/tests/repro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ fn repro_FRcorNv() {
block_timestamp: 1_650_960_438_774_745_116,
input_path: "src/tests/res/input_FRcorNv.hex",
evm_gas_used: 1_239_721,
#[cfg(not(feature = "ext-connector"))]
near_gas_used: 168,
#[cfg(feature = "ext-connector")]
near_gas_used: 167,
});
}

Expand All @@ -91,7 +88,7 @@ fn repro_5bEgfRQ() {
block_timestamp: 1_651_073_772_931_594_646,
input_path: "src/tests/res/input_5bEgfRQ.hex",
evm_gas_used: 6_414_105,
near_gas_used: 650,
near_gas_used: 649,
});
}

Expand Down

0 comments on commit 59e63d1

Please sign in to comment.