@@ -208,7 +208,7 @@ func TestGetMetrics(t *testing.T) {
208
208
assert .Equal (t , & types.Metrics {
209
209
HitsFsCache : 1 ,
210
210
ElementsMemoryCache : 1 ,
211
- SizeMemoryCache : 3428923 ,
211
+ SizeMemoryCache : 3432787 ,
212
212
}, metrics )
213
213
214
214
// Instantiate 2
@@ -223,7 +223,7 @@ func TestGetMetrics(t *testing.T) {
223
223
HitsMemoryCache : 1 ,
224
224
HitsFsCache : 1 ,
225
225
ElementsMemoryCache : 1 ,
226
- SizeMemoryCache : 3428923 ,
226
+ SizeMemoryCache : 3432787 ,
227
227
}, metrics )
228
228
229
229
// Pin
@@ -238,8 +238,8 @@ func TestGetMetrics(t *testing.T) {
238
238
HitsFsCache : 1 ,
239
239
ElementsPinnedMemoryCache : 1 ,
240
240
ElementsMemoryCache : 1 ,
241
- SizePinnedMemoryCache : 3428923 ,
242
- SizeMemoryCache : 3428923 ,
241
+ SizePinnedMemoryCache : 3432787 ,
242
+ SizeMemoryCache : 3432787 ,
243
243
}, metrics )
244
244
245
245
// Instantiate 3
@@ -256,8 +256,8 @@ func TestGetMetrics(t *testing.T) {
256
256
HitsFsCache : 1 ,
257
257
ElementsPinnedMemoryCache : 1 ,
258
258
ElementsMemoryCache : 1 ,
259
- SizePinnedMemoryCache : 3428923 ,
260
- SizeMemoryCache : 3428923 ,
259
+ SizePinnedMemoryCache : 3432787 ,
260
+ SizeMemoryCache : 3432787 ,
261
261
}, metrics )
262
262
263
263
// Unpin
@@ -274,7 +274,7 @@ func TestGetMetrics(t *testing.T) {
274
274
ElementsPinnedMemoryCache : 0 ,
275
275
ElementsMemoryCache : 1 ,
276
276
SizePinnedMemoryCache : 0 ,
277
- SizeMemoryCache : 3428923 ,
277
+ SizeMemoryCache : 3432787 ,
278
278
}, metrics )
279
279
280
280
// Instantiate 4
@@ -292,7 +292,7 @@ func TestGetMetrics(t *testing.T) {
292
292
ElementsPinnedMemoryCache : 0 ,
293
293
ElementsMemoryCache : 1 ,
294
294
SizePinnedMemoryCache : 0 ,
295
- SizeMemoryCache : 3428923 ,
295
+ SizeMemoryCache : 3432787 ,
296
296
}, metrics )
297
297
}
298
298
@@ -319,7 +319,7 @@ func TestInstantiate(t *testing.T) {
319
319
res , cost , err := Instantiate (cache , checksum , env , info , msg , & igasMeter , store , api , & querier , TESTING_GAS_LIMIT , TESTING_PRINT_DEBUG )
320
320
require .NoError (t , err )
321
321
requireOkResponse (t , res , 0 )
322
- assert .Equal (t , uint64 (0x92d1 ), cost )
322
+ assert .Equal (t , uint64 (0x8e99 ), cost )
323
323
324
324
var result types.ContractResult
325
325
err = json .Unmarshal (res , & result )
@@ -350,7 +350,7 @@ func TestExecute(t *testing.T) {
350
350
diff := time .Now ().Sub (start )
351
351
require .NoError (t , err )
352
352
requireOkResponse (t , res , 0 )
353
- assert .Equal (t , uint64 (0x92d1 ), cost )
353
+ assert .Equal (t , uint64 (0x8e99 ), cost )
354
354
t .Logf ("Time (%d gas): %s\n " , cost , diff )
355
355
356
356
// execute with the same store
@@ -363,7 +363,7 @@ func TestExecute(t *testing.T) {
363
363
res , cost , err = Execute (cache , checksum , env , info , []byte (`{"release":{}}` ), & igasMeter2 , store , api , & querier , TESTING_GAS_LIMIT , TESTING_PRINT_DEBUG )
364
364
diff = time .Now ().Sub (start )
365
365
require .NoError (t , err )
366
- assert .Equal (t , uint64 (0xf364 ), cost )
366
+ assert .Equal (t , uint64 (0xef2c ), cost )
367
367
t .Logf ("Time (%d gas): %s\n " , cost , diff )
368
368
369
369
// make sure it read the balance properly and we got 250 atoms
@@ -405,7 +405,7 @@ func TestExecuteCpuLoop(t *testing.T) {
405
405
diff := time .Now ().Sub (start )
406
406
require .NoError (t , err )
407
407
requireOkResponse (t , res , 0 )
408
- assert .Equal (t , uint64 (0x92d1 ), cost )
408
+ assert .Equal (t , uint64 (0x8e99 ), cost )
409
409
t .Logf ("Time (%d gas): %s\n " , cost , diff )
410
410
411
411
// execute a cpu loop
@@ -556,7 +556,7 @@ func TestMultipleInstances(t *testing.T) {
556
556
require .NoError (t , err )
557
557
requireOkResponse (t , res , 0 )
558
558
// we now count wasm gas charges and db writes
559
- assert .Equal (t , uint64 (0x91b0 ), cost )
559
+ assert .Equal (t , uint64 (0x8d78 ), cost )
560
560
561
561
// instance2 controlled by mary
562
562
gasMeter2 := NewMockGasMeter (TESTING_GAS_LIMIT )
@@ -567,14 +567,14 @@ func TestMultipleInstances(t *testing.T) {
567
567
res , cost , err = Instantiate (cache , checksum , env , info , msg , & igasMeter2 , store2 , api , & querier , TESTING_GAS_LIMIT , TESTING_PRINT_DEBUG )
568
568
require .NoError (t , err )
569
569
requireOkResponse (t , res , 0 )
570
- assert .Equal (t , uint64 (0x9255 ), cost )
570
+ assert .Equal (t , uint64 (0x8e1d ), cost )
571
571
572
572
// fail to execute store1 with mary
573
- resp := exec (t , cache , checksum , "mary" , store1 , api , querier , 0x7e26 )
573
+ resp := exec (t , cache , checksum , "mary" , store1 , api , querier , 0x79ee )
574
574
require .Equal (t , "Unauthorized" , resp .Err )
575
575
576
576
// succeed to execute store1 with fred
577
- resp = exec (t , cache , checksum , "fred" , store1 , api , querier , 0xf2f0 )
577
+ resp = exec (t , cache , checksum , "fred" , store1 , api , querier , 0xeeb8 )
578
578
require .Equal (t , "" , resp .Err )
579
579
require .Equal (t , 1 , len (resp .Ok .Messages ))
580
580
attributes := resp .Ok .Attributes
@@ -583,7 +583,7 @@ func TestMultipleInstances(t *testing.T) {
583
583
require .Equal (t , "bob" , attributes [1 ].Value )
584
584
585
585
// succeed to execute store2 with mary
586
- resp = exec (t , cache , checksum , "mary" , store2 , api , querier , 0xf32a )
586
+ resp = exec (t , cache , checksum , "mary" , store2 , api , querier , 0xeef2 )
587
587
require .Equal (t , "" , resp .Err )
588
588
require .Equal (t , 1 , len (resp .Ok .Messages ))
589
589
attributes = resp .Ok .Attributes
0 commit comments