-
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
Move execution parameter to separate account - V0.37 #6891
base: v0.37
Are you sure you want to change the base?
Move execution parameter to separate account - V0.37 #6891
Conversation
// executionParametersAddressTestnet is the address of the Execution Parameters contract on Testnet | ||
executionParametersAddressTestnet = flow.HexToAddress("00000000000") | ||
// executionParametersAddressMainnet is the address of the Execution Parameters contract on Mainnet | ||
executionParametersAddressMainnet = flow.HexToAddress("00000000000") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are they 000s?
if becaseu we haven't created them, then better add a TODO here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we haven't added them yet.
That's not a valid address so its going to break if anyone tries to use it.
I plan to add the testnet address tomorrow, I'll add a todo for the mainnet one
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v0.37 #6891 +/- ##
==========================================
- Coverage 41.51% 41.49% -0.03%
==========================================
Files 2033 2035 +2
Lines 181521 181604 +83
==========================================
- Hits 75360 75354 -6
- Misses 99926 100010 +84
- Partials 6235 6240 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you planning on making a PR to flow-core-contracts to add the other contract or do you need help with that?
@@ -99,6 +103,12 @@ var ( | |||
evmStorageAddressTestnet = flow.HexToAddress("1a54ed2be7552821") | |||
// evmStorageAddressMainnet is the address of the EVM state storage contract on Mainnet | |||
evmStorageAddressMainnet = flow.HexToAddress("d421a63faae318f9") | |||
|
|||
// executionParametersAddressTestnet is the address of the Execution Parameters contract on Testnet | |||
executionParametersAddressTestnet = flow.HexToAddress("a71b77409f5acbc1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you've already created this account and stored the values there on testnet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not see those parameters here - https://www.flowview.app/account/0xa71b77409f5acbc1/public 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read the metering settings from a different account.
Whenever unrelated data would change on the service account, the execution parameters would get evicted from the cache (and since they are a dependency, all programs would also get evicted).
Moving execution parameters to its own dedicated account is a solution for this.
This is a short-medium term solution. The proper solution would be to put the execution parameters into the dynamic protocol state. Which would simplify the programs cache logic and remove the need for the execution parameters to be on a special account.
The newly create account will have the metering settings in storage. They will be copied from the service account with the following transaction:
This is sufficient for FVM to start consuming this data. For users there are additional steps needed, that are described here: #6894
TODO: