Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Rewrite state-cache #9769

@bkchr

Description

@bkchr

The state cache, found here: https://github.com/paritytech/substrate/blob/master/client/db/src/storage_cache.rs is very error prone.
We have already tried to fix it multiple times, but there still exist bugs. Parachains for example are the ones that suffer from these state cache bugs which mainly lead to storage root mismatches.

The idea is to rewrite the state-cache into an overlay model, so that we just cache all the writes/deletes per block. Then, we can use these overlays to build the "state view" when accessing a particular state. Reads also should still be cached.

Metadata

Metadata

Assignees

Labels

I3-bugThe node fails to follow expected behavior.I7-refactorCode needs refactoring.

Type

No type

Projects

Status

done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions