Skip to content

Commit

Permalink
Release 2.8.1. (#648)
Browse files Browse the repository at this point in the history
* Feat(tests): Test showing SputnikVM does not experience integer overflow in gas calculation (#641)
* Chore: Update to SputnikVM v0.37.2 (#645)
* Fix(tracing): update to SputnikVM `v0.37.3-aurora` (#646)
* Bump version
* Add release notes
  • Loading branch information
birchmd committed Dec 7, 2022
1 parent 9a7d38b commit 70063c9
Show file tree
Hide file tree
Showing 20 changed files with 444 additions and 51 deletions.
16 changes: 15 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.8.1] 2022-12-07

### Changes

- Performance improvement (approximately 5% reduction in NEAR gas usage) by [@birchmd]. ([#645])

### Fixes

- Tracing bug fix by [@birchmd]. ([#646])

[#645]: https://github.com/aurora-is-near/aurora-engine/pull/645
[#646]: https://github.com/aurora-is-near/aurora-engine/pull/646

## [2.8.0] 2022-11-15

### Added
Expand Down Expand Up @@ -321,7 +334,8 @@ struct SubmitResult {

## [1.0.0] - 2021-05-12

[Unreleased]: https://github.com/aurora-is-near/aurora-engine/compare/2.8.0...develop
[Unreleased]: https://github.com/aurora-is-near/aurora-engine/compare/2.8.1...develop
[2.8.1]: https://github.com/aurora-is-near/aurora-engine/compare/2.8.0...2.8.1
[2.8.0]: https://github.com/aurora-is-near/aurora-engine/compare/2.7.0...2.8.0
[2.7.0]: https://github.com/aurora-is-near/aurora-engine/compare/2.6.1...2.7.0
[2.6.1]: https://github.com/aurora-is-near/aurora-engine/compare/2.6.0...2.6.1
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.0
2.8.1
2 changes: 1 addition & 1 deletion engine-precompiles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ aurora-engine-types = { path = "../engine-types", default-features = false }
aurora-engine-sdk = { path = "../engine-sdk", default-features = false }
borsh = { version = "0.9.3", default-features = false }
bn = { version = "0.5.11", package = "zeropool-bn", default-features = false }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false }
libsecp256k1 = { version = "0.7.0", default-features = false, features = ["static-context", "hmac"] }
num = { version = "0.4.0", default-features = false, features = ["alloc"] }
ripemd = { version = "0.1.1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion engine-standalone-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ aurora-engine-sdk = { path = "../engine-sdk", default-features = false, features
aurora-engine-transactions = { path = "../engine-transactions", default-features = false, features = ["std"] }
aurora-engine-precompiles = { path = "../engine-precompiles", default-features = false, features = ["std"] }
borsh = { version = "0.9.3" }
evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false }
evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false }
hex = "0.4.3"
rocksdb = { version = "0.19.0", default-features = false }
postgres = "0.19.2"
Expand Down
8 changes: 4 additions & 4 deletions engine-standalone-tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ crate-type = ["lib"]

[dependencies]
aurora-engine-types = { path = "../engine-types", default-features = false, features = ["std"] }
evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std"] }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std", "tracing"] }
evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std", "tracing"] }
evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std", "tracing"] }
evm-core = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std"] }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std", "tracing"] }
evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std", "tracing"] }
evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std", "tracing"] }
hex = { version = "0.4", default-features = false, features = ["std"] }
serde = { version = "1", features = ["derive"], optional = true }

Expand Down
26 changes: 13 additions & 13 deletions engine-standalone-tracing/src/types/call_tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ use aurora_engine_types::{types::Address, U256};

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct CallFrame {
call_type: CallType,
from: Address,
to: Option<Address>,
value: U256,
gas: u64,
gas_used: u64,
input: Vec<u8>,
output: Vec<u8>,
error: Option<String>,
calls: Vec<CallFrame>,
pub call_type: CallType,
pub from: Address,
pub to: Option<Address>,
pub value: U256,
pub gas: u64,
pub gas_used: u64,
pub input: Vec<u8>,
pub output: Vec<u8>,
pub error: Option<String>,
pub calls: Vec<CallFrame>,
}

#[derive(Debug, Default, Clone, PartialEq, Eq)]
pub struct CallTracer {
call_stack: Vec<CallFrame>,
pub call_stack: Vec<CallFrame>,
}

impl CallTracer {
Expand Down Expand Up @@ -163,10 +163,10 @@ impl evm::tracing::EventListener for CallTracer {
} => {
let call_type = if is_static {
CallType::StaticCall
} else if transfer.is_none() {
CallType::DelegateCall
} else if code_address == context.address {
CallType::Call
} else if transfer.is_none() {
CallType::DelegateCall
} else {
CallType::CallCode
};
Expand Down
6 changes: 3 additions & 3 deletions engine-test-doubles/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ autobenches = false
[dependencies]
aurora-engine-types = { path = "../engine-types", default-features = false, features = ["std"] }
aurora-engine-sdk = { path = "../engine-sdk" }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std", "tracing"] }
evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std", "tracing"] }
evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std", "tracing"] }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std", "tracing"] }
evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std", "tracing"] }
evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std", "tracing"] }

[dev-dependencies]
8 changes: 4 additions & 4 deletions engine-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ aurora-engine-sdk = { path = "../engine-sdk", default-features = false, features
aurora-engine-precompiles = { path = "../engine-precompiles", default-features = false, features = ["std"] }
aurora-engine-transactions = { path = "../engine-transactions", default-features = false, features = ["std"] }
engine-standalone-storage = { path = "../engine-standalone-storage" }
engine-standalone-tracing = { path = "../engine-standalone-tracing" }
engine-standalone-tracing = { path = "../engine-standalone-tracing", default-features = false, features = ["impl-serde"] }
borsh = { version = "0.9.3", default-features = false }
sha3 = { version = "0.10.2", default-features = false }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std", "tracing"] }
evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std", "tracing"] }
evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.1-aurora", default-features = false, features = ["std", "tracing"] }
evm = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std", "tracing"] }
evm-runtime = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std", "tracing"] }
evm-gasometer = { git = "https://github.com/aurora-is-near/sputnikvm.git", tag = "v0.37.3-aurora", default-features = false, features = ["std", "tracing"] }
rlp = { version = "0.5.0", default-features = false }
base64 = "0.13.0"
bstr = "1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion engine-tests/src/test_utils/standalone/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ impl StandaloneRunner {
self.storage_dir.close().unwrap();
}

fn template_tx_msg(
pub(crate) fn template_tx_msg(
storage: &mut Storage,
env: &env::Fixed,
transaction_position: u16,
Expand Down
2 changes: 1 addition & 1 deletion engine-tests/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ mod standalone;
mod standard_precompiles;
mod state_migration;
pub(crate) mod uniswap;
mod xcc;
pub(crate) mod xcc;
6 changes: 3 additions & 3 deletions engine-tests/src/tests/one_inch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn test_1inch_liquidity_protocol() {
},
);
assert!(result.gas_used >= 302_000); // more than 302k EVM gas used
assert_gas_bound(profile.all_gas(), 24);
assert_gas_bound(profile.all_gas(), 23);

// Same here
helper.runner.context.block_timestamp += 10_000_000 * 1_000_000_000;
Expand All @@ -73,7 +73,7 @@ fn test_1inch_liquidity_protocol() {
},
);
assert!(result.gas_used >= 210_000); // more than 210k EVM gas used
assert_gas_bound(profile.all_gas(), 25);
assert_gas_bound(profile.all_gas(), 24);

let (result, profile) = helper.pool_withdraw(
&pool,
Expand All @@ -84,7 +84,7 @@ fn test_1inch_liquidity_protocol() {
},
);
assert!(result.gas_used >= 150_000); // more than 150k EVM gas used
assert_gas_bound(profile.all_gas(), 21);
assert_gas_bound(profile.all_gas(), 20);
}

#[test]
Expand Down
12 changes: 6 additions & 6 deletions engine-tests/src/tests/repro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn repro_GdASJ3KESs() {
block_timestamp: 1645717564644206730,
input_path: "src/tests/res/input_GdASJ3KESs.hex",
evm_gas_used: 706713,
near_gas_used: 131,
near_gas_used: 122,
});
}

Expand All @@ -52,7 +52,7 @@ fn repro_8ru7VEA() {
block_timestamp: 1648829935343349589,
input_path: "src/tests/res/input_8ru7VEA.hex",
evm_gas_used: 1732181,
near_gas_used: 239,
near_gas_used: 223,
});
}

Expand All @@ -72,7 +72,7 @@ fn repro_FRcorNv() {
block_timestamp: 1650960438774745116,
input_path: "src/tests/res/input_FRcorNv.hex",
evm_gas_used: 1239721,
near_gas_used: 194,
near_gas_used: 181,
});
}

Expand All @@ -89,7 +89,7 @@ fn repro_5bEgfRQ() {
block_timestamp: 1651073772931594646,
input_path: "src/tests/res/input_5bEgfRQ.hex",
evm_gas_used: 6_414_105,
near_gas_used: 701,
near_gas_used: 657,
});
}

Expand All @@ -107,7 +107,7 @@ fn repro_D98vwmi() {
block_timestamp: 1651753443421003245,
input_path: "src/tests/res/input_D98vwmi.hex",
evm_gas_used: 1_035_348,
near_gas_used: 195,
near_gas_used: 182,
});
}

Expand All @@ -126,7 +126,7 @@ fn repro_Emufid2() {
block_timestamp: 1662118048636713538,
input_path: "src/tests/res/input_Emufid2.hex",
evm_gas_used: 1_156_364,
near_gas_used: 330,
near_gas_used: 306,
});
}

Expand Down
Loading

0 comments on commit 70063c9

Please sign in to comment.