Skip to content

Commit

Permalink
!fixup Update observations with rebuilt wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
dmkozh committed Dec 13, 2024
1 parent 5b226bd commit c249cb6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 24 deletions.
17 changes: 17 additions & 0 deletions Cargo.lock

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

40 changes: 20 additions & 20 deletions soroban-sdk/src/tests/invocation_metering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ fn test_invocation_metering_with_storage() {
expect![[r#"
InvocationResources {
instructions: 918961,
mem_bytes: 2325733,
mem_bytes: 2325725,
read_entries: 2,
write_entries: 2,
read_bytes: 928,
read_bytes: 924,
write_bytes: 176,
contract_events_size_bytes: 0,
persistent_rent_ledger_bytes: 425880,
Expand All @@ -41,11 +41,11 @@ fn test_invocation_metering_with_storage() {
// signatures that don't expire for as long as possible.
expect![[r#"
FeeEstimate {
total: 1340707,
total: 1340700,
instructions: 2298,
read_entries: 25000,
write_entries: 20000,
read_bytes: 1619,
read_bytes: 1612,
write_bytes: 2063,
contract_events: 0,
persistent_entry_rent: 12937,
Expand All @@ -60,10 +60,10 @@ fn test_invocation_metering_with_storage() {
expect![[r#"
InvocationResources {
instructions: 455853,
mem_bytes: 1162245,
mem_bytes: 1162241,
read_entries: 2,
write_entries: 1,
read_bytes: 1032,
read_bytes: 1028,
write_bytes: 80,
contract_events_size_bytes: 0,
persistent_rent_ledger_bytes: 327600,
Expand All @@ -74,11 +74,11 @@ fn test_invocation_metering_with_storage() {
.assert_eq(format!("{:#?}", e.get_last_invocation_resources().unwrap()).as_str());
expect![[r#"
FeeEstimate {
total: 45017,
total: 45010,
instructions: 1140,
read_entries: 18750,
write_entries: 10000,
read_bytes: 1800,
read_bytes: 1793,
write_bytes: 938,
contract_events: 0,
persistent_entry_rent: 12389,
Expand All @@ -92,10 +92,10 @@ fn test_invocation_metering_with_storage() {
expect![[r#"
InvocationResources {
instructions: 454080,
mem_bytes: 1161342,
mem_bytes: 1161338,
read_entries: 3,
write_entries: 0,
read_bytes: 1112,
read_bytes: 1108,
write_bytes: 0,
contract_events_size_bytes: 0,
persistent_rent_ledger_bytes: 0,
Expand All @@ -106,11 +106,11 @@ fn test_invocation_metering_with_storage() {
.assert_eq(format!("{:#?}", e.get_last_invocation_resources().unwrap()).as_str());
expect![[r#"
FeeEstimate {
total: 21826,
total: 21819,
instructions: 1136,
read_entries: 18750,
write_entries: 0,
read_bytes: 1940,
read_bytes: 1933,
write_bytes: 0,
contract_events: 0,
persistent_entry_rent: 0,
Expand All @@ -124,10 +124,10 @@ fn test_invocation_metering_with_storage() {
expect![[r#"
InvocationResources {
instructions: 452458,
mem_bytes: 1161562,
mem_bytes: 1161558,
read_entries: 2,
write_entries: 1,
read_bytes: 1112,
read_bytes: 1108,
write_bytes: 0,
contract_events_size_bytes: 0,
persistent_rent_ledger_bytes: 0,
Expand All @@ -138,11 +138,11 @@ fn test_invocation_metering_with_storage() {
.assert_eq(format!("{:#?}", e.get_last_invocation_resources().unwrap()).as_str());
expect![[r#"
FeeEstimate {
total: 31822,
total: 31815,
instructions: 1132,
read_entries: 18750,
write_entries: 10000,
read_bytes: 1940,
read_bytes: 1933,
write_bytes: 0,
contract_events: 0,
persistent_entry_rent: 0,
Expand All @@ -156,10 +156,10 @@ fn test_invocation_metering_with_storage() {
expect![[r#"
InvocationResources {
instructions: 452445,
mem_bytes: 1161206,
mem_bytes: 1161202,
read_entries: 3,
write_entries: 0,
read_bytes: 1032,
read_bytes: 1028,
write_bytes: 0,
contract_events_size_bytes: 0,
persistent_rent_ledger_bytes: 0,
Expand All @@ -170,11 +170,11 @@ fn test_invocation_metering_with_storage() {
.assert_eq(format!("{:#?}", e.get_last_invocation_resources().unwrap()).as_str());
expect![[r#"
FeeEstimate {
total: 21682,
total: 21675,
instructions: 1132,
read_entries: 18750,
write_entries: 0,
read_bytes: 1800,
read_bytes: 1793,
write_bytes: 0,
contract_events: 0,
persistent_entry_rent: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"val": {
"contract_instance": {
"executable": {
"wasm": "0935fd59e7295d19c4ab019af1012fd975d89d87f643bc65516ff59c54bba4a9"
"wasm": "fd41d2f77920ca07b723e05f732a82db4c2f6459eb2be6b40c4f225434569550"
},
"storage": null
}
Expand All @@ -87,7 +87,7 @@
[
{
"contract_code": {
"hash": "0935fd59e7295d19c4ab019af1012fd975d89d87f643bc65516ff59c54bba4a9"
"hash": "fd41d2f77920ca07b723e05f732a82db4c2f6459eb2be6b40c4f225434569550"
}
},
[
Expand All @@ -113,8 +113,8 @@
}
}
},
"hash": "0935fd59e7295d19c4ab019af1012fd975d89d87f643bc65516ff59c54bba4a9",
"code": "0061736d01000000011b0560037e7e7e017e60027e7e017e60027f7e0060017e017e600000021904016c015f0000016c01300001016c01310001016c01320001030605010203030405030100100619037f01418080c0000b7f00418080c0000b7f00418080c0000b073b07066d656d6f727902000370757400040367657400060364656c0007015f00080a5f5f646174615f656e6403010b5f5f686561705f6261736503020ad502056601017f23808080800041206b2202248080808000200241106a200010858080800002402002290310a70d0020022903182100200220011085808080002002290300a70d002000200229030842011080808080001a200241206a24808080800042020f0b00000b2401017f2000200137030820002001a741ff01712202410e47200241ca004771ad3703000b7b02017f017e23808080800041206b2201248080808000200141106a200010858080800002402001290310a70d004202210002402001290318220242011081808080004201520d002001200242011082808080001085808080002001290300a70d01200129030821000b200141206a24808080800020000f0b00000b4801017f23808080800041106b22012480808080002001200010858080800002402001290300a7450d0000000b200129030842011083808080001a200141106a24808080800042020b02000b009f010e636f6e7472616374737065637630000000000000000000000003707574000000000200000000000000036b65790000000011000000000000000376616c000000001100000000000000000000000000000003676574000000000100000000000000036b6579000000001100000001000003e80000001100000000000000000000000364656c000000000100000000000000036b6579000000001100000000001e11636f6e7472616374656e766d6574617630000000000000001600000000007b0e636f6e74726163746d65746176300000000000000005727376657200000000000006312e38312e3000000000000000000008727373646b7665720000003a32322e302e302d72632e3323623762383235356162323764633064383535373062356465656436393766346339303037393636312d64697274790000"
"hash": "fd41d2f77920ca07b723e05f732a82db4c2f6459eb2be6b40c4f225434569550",
"code": "0061736d01000000011b0560037e7e7e017e60027e7e017e60027f7e0060017e017e600000021904016c015f0000016c01300001016c01310001016c01320001030605010203030405030100100619037f01418080c0000b7f00418080c0000b7f00418080c0000b073b07066d656d6f727902000370757400040367657400060364656c0007015f00080a5f5f646174615f656e6403010b5f5f686561705f6261736503020ad502056601017f23808080800041206b2202248080808000200241106a200010858080800002402002290310a70d0020022903182100200220011085808080002002290300a70d002000200229030842011080808080001a200241206a24808080800042020f0b00000b2401017f2000200137030820002001a741ff01712202410e47200241ca004771ad3703000b7b02017f017e23808080800041206b2201248080808000200141106a200010858080800002402001290310a70d004202210002402001290318220242011081808080004201520d002001200242011082808080001085808080002001290300a70d01200129030821000b200141206a24808080800020000f0b00000b4801017f23808080800041106b22012480808080002001200010858080800002402001290300a7450d0000000b200129030842011083808080001a200141106a24808080800042020b02000b009f010e636f6e7472616374737065637630000000000000000000000003707574000000000200000000000000036b65790000000011000000000000000376616c000000001100000000000000000000000000000003676574000000000100000000000000036b6579000000001100000001000003e80000001100000000000000000000000364656c000000000100000000000000036b6579000000001100000000001e11636f6e7472616374656e766d657461763000000000000000160000000000770e636f6e74726163746d65746176300000000000000005727376657200000000000006312e38312e3000000000000000000008727373646b7665720000003532322e302e3223646665383939626331326332323937353531303633653330313531666636353466393762383265382d6469727479000000"
}
},
"ext": "v0"
Expand Down

0 comments on commit c249cb6

Please sign in to comment.