feat: adapt token txe tests to use the new model
Everything here should use the new flow.
Note this is still not polished / finalized as you will notice some inconsistencies / jank within some call interfaces but should be quite indicative of how tests will look like with the new txe call api. There is also some weirdness to debug with completing partial notes but I will do all of the above when I am back from ooo.
We eliminate all cases of env.impersonate and call_interface.call(&mut env) except for when we use env.assert_x_call_fails. I will handle this case in a downstream PR.
Rudimentary benchmarks as below:
Setup: Mainframe @ ~0000 UTC, avg of 3 attempts, rounded up to the nearest second, one terminal with txe running (restarted and cleared output every run), other running the txe tests specifying each suite defined by the column 'key'. Note that these are super non-scientific but generally shows we're in a similar ballpark of performance (we are not sacrificing too much by making the execution model match).
| test suite | before | after |
|---|---|---|
| access_control | 11s | 12s |
| transfer_to_private | 21s | 21s |
| transfer_to_public | 31s | 30s |
[!WARNING] This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite. Learn more
-
#14326
👈 (View in Graphite)
-
#14366
: 1 other dependent PR (#14889
) -
#14235
-
next
This stack of pull requests is managed by Graphite. Learn more about stacking.