-
Notifications
You must be signed in to change notification settings - Fork 180
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
Cleanup Smart contracts around execution parameters #6894
Comments
For the new contract, in addition to the getters for the metering settings, we also need a way to set those from the service account contract, right? |
Yes. Ill add that to the issue. |
Actually, why not just put these parameters in the smart contract instead of storage? That way, they wouldn't be able to be updated by just a regular transaction from the new account and we could restrict it to a resource that is owned by the service account |
The problem with that is that when the FVM would need to read the it would also need to use a script. Which would drastically increase the amount of registers touched. Keep in mind that this is a temporary solution and should go away in less than a year. |
okay, that makes sense. If it is just temporary, then we should probably just make it as simple as possible. Just a smart contract that can query these values, then if we need to change them, we can just sign a transaction with this account that stores them. No need to make it complicated and add a service account multisig in there too. Have you already started on the smart contract? I can make the PR in the core contracts repo if you haven't started yet |
Thank you very much. I had this locally when I was testing:
|
Problem Definition
PR #6891 moves the metering settings from the service account to a separate account.
But we also need to clean up some things:
The new account should have a minimal wrapper contract so that there is a nice way (for users) to read the metering settings. This wrapper contract should be part of the
flow-core-contract
repo and of the bootstrapping. The contract should also provide an admin resource that can change the weights, that would be given to the service account.A change to the
SystemAccountContract
so that it forwards calls to get the weights to the new account, so that any current user code referencing that does not need to change.The bootstrapping should deploy the metering settings (and the contract) to a separate account. (one of the existing ones can be used, but not one that changes on ever block)
Remove the public flow receiver from the new account, because it does not need one.
The text was updated successfully, but these errors were encountered: