-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add migration to add a key to all service accounts #6096
Add migration to add a key to all service accounts #6096
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/atree-inlining-cadence-v1.0 #6096 +/- ##
=======================================================================
+ Coverage 41.64% 43.71% +2.06%
=======================================================================
Files 1974 1771 -203
Lines 139562 121059 -18503
=======================================================================
- Hits 58125 52924 -5201
+ Misses 75411 62688 -12723
+ Partials 6026 5447 -579
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.
Nice! I left a couple of comments.
migrators.NewAddKeyMigration( | ||
opts.ChainID, | ||
key, | ||
), |
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.
Do we want to move new migration AddKeyMigration
before AccountUsageMigration
since it adds public key to accounts?
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.
Looks good! Maybe generate a report
chainID := flow.Emulator | ||
sc := systemcontracts.SystemContractsForChain(chainID) | ||
|
||
serviceRegisters := registersByAccount.AccountRegisters(string(sc.FlowServiceAccount.Address.Bytes())) |
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.
Maybe factor the repeated sc.FlowServiceAccount.Address
into a variable
710bd3d
to
14e2bc4
Compare
Caution
Do Not Merge
This is an extra migration that adds a public key to all service accounts. The intended usage is for testing the migration of mainnet. This allows us to run transactions on the test migrated mainnet network to setup networking addresses and epoch related state.