## Description
This is a PR that supersedes #13387 . It is applied only to `latest` and
`suivm` given the latest changes that brought `TemporaryStore` and
`GasCharger` into the execution layer.
Re-enabled some gas tests and changed some gas constants to be more in
line with a proper usage.
We still have one big value that seems inevitable (though maybe code
could be organized better).
Removed some redundant code and some cleanup as highlighted by @lxfind,
thanks!
@lxfind @sblackshear please read below...
We made changes to the conservation checks. Specifically we broke them
into 2 parts and re-enabled some tests that were commented because of
OOG logic. We now have 2 conservation check functions: a simple one and
the expensive one. The expensive one is the same, the simple one has
been lifted into its own function and changed to take into account the
OOG scenario. The new logic seems sound to me. It basically claims that
if no storage charges/rebates are performed (as defined in the
`GasSummary`) the total input and output rebate (gas cost) has to be the
same.
That passes all tests including those that run OOG in all scenarios
(computation, all storage, storage after OOG).
I am going to run that code on a fullnode syncing for a while and see
what happens.
Also I'd be fine to put the new logic under protocol config version if
we thought that was a better thing. Please advice.
I wanted to make more changes to the testing framework but I am not sure
anymore, I may open an issue for that to discuss. The idea was to expand
the `TestAuthorityBuilder` API (like adding the "concept" of
insert_genesis_object) and removing the excess of functions that build
an authority, as seen in `authority_test.rs`. Also "genesis added
objects" have this annoying missing storage rebate which makes guessing
(or dry_run requests) for transaction charges very difficult (the value
changes after first execution as the storage rebate goes from 0 to the
correct one)
However I am not sure any longer that it is a true cleanup and I have to
look/think into that more. If anybody got feelings please comment
## Test Plan
Existing tests and re-enabled some OOG important tests
---
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)
- [ ] protocol change
- [ ] 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