Skip to content

Commit 878c1ae

Browse files
committed
Rebuild cyberpunk test contract
1 parent 5011a41 commit 878c1ae

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

packages/vm/benches/main.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const MEMORY_CACHE_SIZE: Size = Size::mebi(200);
3030
const INSTANTIATION_THREADS: usize = 128;
3131
const CONTRACTS: u64 = 10;
3232

33+
const DEFAULT_CAPABILITIES: &str = "cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3,iterator,staking";
3334
static CONTRACT: &[u8] = include_bytes!("../testdata/hackatom.wasm");
3435
static CYBERPUNK: &[u8] = include_bytes!("../testdata/cyberpunk.wasm");
3536

@@ -129,7 +130,7 @@ fn bench_cache(c: &mut Criterion) {
129130

130131
let options = CacheOptions::new(
131132
TempDir::new().unwrap().into_path(),
132-
capabilities_from_csv("iterator,staking"),
133+
capabilities_from_csv(DEFAULT_CAPABILITIES),
133134
MEMORY_CACHE_SIZE,
134135
DEFAULT_MEMORY_LIMIT,
135136
);
@@ -182,7 +183,7 @@ fn bench_cache(c: &mut Criterion) {
182183
group.bench_function("instantiate from fs", |b| {
183184
let non_memcache = CacheOptions::new(
184185
TempDir::new().unwrap().into_path(),
185-
capabilities_from_csv("iterator,staking"),
186+
capabilities_from_csv(DEFAULT_CAPABILITIES),
186187
Size::new(0),
187188
DEFAULT_MEMORY_LIMIT,
188189
);
@@ -204,7 +205,7 @@ fn bench_cache(c: &mut Criterion) {
204205
group.bench_function("instantiate from fs unchecked", |b| {
205206
let non_memcache = CacheOptions::new(
206207
TempDir::new().unwrap().into_path(),
207-
capabilities_from_csv("iterator,staking"),
208+
capabilities_from_csv(DEFAULT_CAPABILITIES),
208209
Size::new(0),
209210
DEFAULT_MEMORY_LIMIT,
210211
);
@@ -267,11 +268,11 @@ fn bench_cache(c: &mut Criterion) {
267268
group.finish();
268269
}
269270

270-
pub fn bench_instance_threads(c: &mut Criterion) {
271+
fn bench_instance_threads(c: &mut Criterion) {
271272
c.bench_function("multi-threaded get_instance", |b| {
272273
let options = CacheOptions::new(
273274
TempDir::new().unwrap().into_path(),
274-
capabilities_from_csv("iterator,staking"),
275+
capabilities_from_csv(DEFAULT_CAPABILITIES),
275276
MEMORY_CACHE_SIZE,
276277
DEFAULT_MEMORY_LIMIT,
277278
);

packages/vm/src/calls.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,10 @@ mod tests {
692692
call_execute::<_, _, _, Empty>(&mut instance, &mock_env(), &info, msg).unwrap_err();
693693
match err {
694694
VmError::RuntimeErr { msg, .. } => {
695-
assert!(msg.contains(
696-
"RuntimeError: Aborted: panicked at 'This page intentionally faulted'"
697-
))
695+
assert!(
696+
msg.contains("RuntimeError: Aborted: panicked at src/contract.rs:"),
697+
"Unexpected error msg: {msg}"
698+
)
698699
}
699700
err => panic!("Unexpected error: {err:?}"),
700701
}

packages/vm/src/compatibility.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ mod tests {
277277
static CONTRACT_RUST_170: &[u8] = include_bytes!("../testdata/cyberpunk_rust170.wasm");
278278

279279
fn default_capabilities() -> HashSet<String> {
280-
capabilities_from_csv("cosmwasm_1_1,cosmwasm_1_2,iterator,staking,stargate")
280+
capabilities_from_csv("cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3,iterator,staking,stargate")
281281
}
282282

283283
#[test]

packages/vm/testdata/cyberpunk.wasm

77.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)