You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(l1): move storage heal paths to their own table (#2359)
**Motivation**
During state sync, we store the accounts hashes of the storages we
failed to fetch along with their root path in the store so the storage
healer can then read them and heal them. For this we used the
`SnapState` table, where the whole pending storage paths map was a value
in that table. This used to work fine at a smaller scale, but when this
map gets too big reading and writing from it becomes very expensive and
can disrupt other processes.
This PR moves the pending storage paths to their own table and changes
how we interact with them:
* The storage healer no longer fetches the whole map, but instead reads
a specific amount of storages from it when its queue is not filled.
* The storage healer no longer uses a channel, it instead reads incoming
requests directly from the store
* Fetchers that need to communicate with the storage healer now do so
via adding paths to the store
<!-- Why does this pull request exist? What are its goals? -->
**Description**
* Remove storage heal paths from snap state
* Add new DB table for storage heal paths
* Remove channel from storage healer and instead manage incoming and
outgoing storage heal paths through the store (This also solves the
issues of the rebuilder not being able to input storage heal requests
and the storage healer being kept alive indefinitely upon forced
shutdown)
<!-- A clear and concise general description of the changes this PR
introduces -->
<!-- Link to issues: Resolves#111, Resolves#222 -->
Closes #issue_number
0 commit comments