sui icon indicating copy to clipboard operation
sui copied to clipboard

[transactional tests] Switch to using AuthorityState

Open tnowacki opened this issue 1 year ago • 1 comments

Description

TODO:

  • Support unmetered somehow
  • Support consensus-commit-prologue and system transactions
  • Support protocol-config setting

Test Plan

How did you test the new or updated feature?


If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.

Type of Change (Check all that apply)

  • [ ] user-visible impact
  • [ ] breaking change for a client SDKs
  • [ ] breaking change for FNs (FN binary must upgrade)
  • [ ] breaking change for validators or node operators (must upgrade binaries)
  • [ ] breaking change for on-chain data layout
  • [ ] necessitate either a data wipe or data migration

Release notes

tnowacki avatar Apr 29 '23 21:04 tnowacki

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
offline-signer-helper ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 14, 2023 2:26am
sui-kiosk ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 14, 2023 2:26am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
explorer ⬜️ Ignored (Inspect) Jun 14, 2023 2:26am
explorer-storybook ⬜️ Ignored (Inspect) Jun 14, 2023 2:26am
sui-wallet-kit ⬜️ Ignored (Inspect) Jun 14, 2023 2:26am
wallet-adapter ⬜️ Ignored (Inspect) Jun 14, 2023 2:26am

vercel[bot] avatar Apr 29 '23 21:04 vercel[bot]

Re: performance, how much slower are we talking? I'm guessing that this is down to repeatedly spinning up and tearing down an authority and everything for each test. That is not going to be cheap, and if that's the case, simtest also won't help, unfortunately. Can we create a single AuthorityState and re-use it across multiple tests?

Otherwise looks good modulo some nits.

I think the perf is from creating all of the authority states, yeah. And I'm not sure of a way around it given how protocol config is working right now. (since different tests can have different config versions)

tnowacki avatar Jun 14 '23 00:06 tnowacki

And its about a 5x slowdown for the tests (15s to about 70s on my machine)

tnowacki avatar Jun 14 '23 00:06 tnowacki

15s to 70s is not the worst thing in the world... re: protocol config versions, you could probably do it either by sharding by protocol config version? Not sure how easy it would be to pre-process tests to know which protocol config version they should go in? You could probably create some kind of shared structure that spins up authority states with the right protocol config on demand?

amnn avatar Jun 14 '23 13:06 amnn