Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
327 stars 208 forks source link

KREAd: Resource measurement on testnet deployment #8196

Closed aj-agoric closed 1 year ago

aj-agoric commented 1 year ago

What is the Problem Being Solved?

To support Kread as outlined in the Partner Go Live Checklist Task: Deploy with core-eval on a testnet and exercise core functionality in a stress like manner. Measure CPU, memory, & storage utilization. Purpose: Ensure contract will be well behaved before more advanced metering solves come in. Instructions: OpCo engineers to work with Partner to designate a test network & share a monitoring dashboard showing memory, CPU, storage usage, blocktime, etc. on that network. Partner performs a functional stress test and observes metrics with OpCo.

Description of the Design

Security Considerations

Scaling Considerations

Test Plan

Upgrade Considerations

dckc commented 1 year ago

smart wallet upgrade duration on an emerynet node: 10 sec

{"level":"info","module":"x/gov","proposal":11,"result":"passed","title":"Upgrade Smart Wallet to support NFTs","time":"2023-09-12T17:50:49Z","message":"proposal tallied"}
...
2023-09-12T17:50:49.997Z SwingSet: vat: v1: upgradeWalletFactory: config { options: { walletFactoryRef: { bundleID: 'b1-fa06290e58e5df0b5e8e26ebf7926176770bee5d32f42bcaa62bb7773795
5a8d9da2922760e644e26643b36ec3118c3c0d546f2af4faf717fdb6ae1fb36773d0' } } }
...
2023-09-12T17:50:58.269Z SwingSet: kernel: vat v37 upgraded from incarnation 0 to 1 ...
...
2023-09-12T17:50:59.419Z SwingSet: vat: v37: ----- WltFct.5  8 registering asset ToyUSD
2023-09-12T17:50:59.422Z SwingSet: vat: v37: ----- WltFct.5  9 registering asset ATOM
2023-09-12T17:50:59.440Z SwingSet: vat: v1: upgradeWalletFactory: done

^ from /state/app.log on validator-0

ivanlei commented 1 year ago

All looks good in emerynet perf testing.

dckc commented 10 months ago

@gibson042 , @warner and co just presented some data on cost of kread operations:

time:

type count mean median 90pct
kread-buy-character 8 3.813 3.792 7.121
kread-mint-character 306 3.601 2.773 6.028
kread-unequip-item 152 2.997 2.105 4.815
kread-equip-item 148 2.981 2.681 4.949
kread-sell-character 29 2.772 2.347 4.607
kread-swap-item 32 2.375 2.247 3.467
kread-buy-item 234 1.972 1.705 3.422

computrons:

type count mean median 90pct
kread-equip-item 148 114,669,595 118,971,942 155,795,766
kread-buy-character 8 104,768,710 99,188,598 128,861,361
kread-sell-character 29 101,248,003 102,916,069 115,794,844
kread-swap-item 32 98,365,466 115,422,774 147,806,824
kread-unequip-item 152 92,244,881 96,551,094 117,598,501
kread-mint-character 306 85,400,236 84,532,117 116,957,560

@ivanlei noted that the time cost was noted before the kread launch