-
Notifications
You must be signed in to change notification settings - Fork 45
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
Include __check_auth contract instance in footprint when recording #1443
Comments
I don't mind adding that, but this only will help if a custom account happens to only use the instance storage. I think it's probably about time to implement the mock signature mechanism that allows for single pass simulation in recording mode. |
The couple custom auth contracts I've written so far happen to only use instance storage. I think given the category of contract instance storage is highly likely for custom auth, but I agree, this issue isn't a solution for the issue @heytdep experienced. I opened this issue because this feels more like a bug to me. The system isn't completely constructing what is logically part of the known/expected footprint. This issue doesn't remove the need to do a second pass on simulation though. |
…#1476) ### What Emulate access to custom account instance and Wasm in recording auth. The change gracefully handles failures (e.g. allows for the instance not being present) in order to not spam diagnostics in unit tests that don't care about the footprint (which makes up for majority of the unit tests). ### Why Better emulate the authorization behavior (in some edge cases this might allow for single-pass simulation of custom accounts). Resolves #1443 ### Known limitations In theory, we could also try calling `__check_auth` on the contract (if possible), but that will likely produce confusing diagnostics for most of the contracts (e.g. signature verification errors).
The env in simulation should include in the footprint contracts that get
__check_auth
called on them.@heytdep shared on Discord (link) a transaction built for testnet and run through simulation once. The transaction involves custom auth. The built footprint did not include the contract instance for the custom auth contract.
Transaction:
Ref:
61eb459b99abbb92f5c566092be8fbf916fc44f149adb6228cb33a66582ad4b3
on testnetCustom auth requires the use of simulation twice, and if simulation was used twice with the above transaction the contract instance would have been identified in the second pass.
However, it seems reasonable that simulation would identify as much of the footprint as possible on each path, and that the contract instance would be included in the footprint in the first pass. There is already enough data available to the simulation that the custom auth contract would need to be included, at least in the read-only, because the env knows the auth will be called and is being simulated.
The text was updated successfully, but these errors were encountered: