-
Notifications
You must be signed in to change notification settings - Fork 138
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
Improve storage capability migration #3516
Conversation
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit 97368d2 Collapsed results for better readability
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3516 +/- ##
==========================================
- Coverage 80.39% 80.38% -0.01%
==========================================
Files 390 393 +3
Lines 96445 97240 +795
==========================================
+ Hits 77534 78168 +634
- Misses 16172 16334 +162
+ Partials 2739 2738 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
The storage capability migration currently incorrectly issues several controllers for a single storage path, potentially with different types, and then migrates all capabilities targeting the storage path to one of the controllers.
Fix both cases, multiple capabilities targeting the same storage path with different types, and multiple capabilities targeting the same storage path with the same type, by issuing exactly one controller for each storage path/borrow type pair.
For example:
Assume three capabilities, all targeting the same storage path, and having the borrow types
&String
,&Int
, and&Int
again. Currently, three controllers are issued and all capabilities get migrated to the last controller, leaving two controllers unused, and the first capability unborrowable. Instead, issue two controllers, one for each type&String
and&Int
, and migrate the first capability to the controller with the type&String
, and the remaining two capabilities to the controller with the type&Int
.master
branchFiles changed
in the Github PR explorer