Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track more network resources in tests #1113

Open
dmkozh opened this issue Oct 11, 2023 · 1 comment
Open

Track more network resources in tests #1113

dmkozh opened this issue Oct 11, 2023 · 1 comment

Comments

@dmkozh
Copy link
Contributor

dmkozh commented Oct 11, 2023

Currently we only allow displaying (and enforcing) budget metering data in the unit tests. We can do better and surface more resources and even optionally enforce these:

  • Ledger reads/writes/RW bytes can be inferred from the storage state. The caveat is that we need to snapshot storage before every contract invocation. Then we can use e2e_invoke env module to get the ledger changes.
  • Events/return value - these can be also extracted from env. The event resets also need to be implemented for this to work properly
  • Rent bumps - we should add a capability to test for entries being bumped, as well as provide a way to examine the overall bump amount using e2e_invoke.
  • Fees - while we can't provide the exact fees, we could try coming up with a ballpark given some sane pre-defined config. This is probably much less useful than the features above, so can be done later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@kalepail @dmkozh and others