sui
sui copied to clipboard
[transactional tests] Switch to using AuthorityState
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
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 |
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 singleAuthorityState
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)
And its about a 5x slowdown for the tests (15s to about 70s on my machine)
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?