Closed fxamacker closed 2 months ago
Attention: Patch coverage is 75.15924%
with 39 lines
in your changes are missing coverage. Please review.
Project coverage is 66.48%. Comparing base (
dc825c2
) to head (d5cb164
).:exclamation: Current head d5cb164 differs from pull request most recent head a887780. Consider uploading reports for the commit a887780 to get more accurate results
Files | Patch % | Lines |
---|---|---|
storage.go | 75.15% | 27 Missing and 12 partials :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Updates #386
Problem
In testnet, broken references seem to have resulted from a bug that was fixed 2 years ago by https://github.com/onflow/cadence/pull/1565.
A broken reference is a
StorageID
referencing a non-existent register. So far, only 10 registers in testnet (none on mainnet) were found to contain broken references.Solution
This PR adds a feature to enable migration programs in onflow/flow-go to fix broken references in maps.
FixLoadedBrokenReferences()
traverses loaded slabs and replaces broken map (if any) with empty map having the same StorageID and also removes all slabs in the old map.Limitations:
IMPORTANT: This should not be used to silently fix unknown problems. It should only be used by migration programs to fix known problems which were determined to be appropriate to fix in this manner.
TODO:
main
branchFiles changed
in the Github PR explorer