Calculate a storage root and proof of some changes without permanently altering the underlying backend #14110
Replies: 3 comments 1 reply
-
That would be awesome to get this :) |
Beta Was this translation helpful? Give feedback.
-
All the things, besides generating a proof, already work. We always generate the new storage root from the Overlay. This also doesn't try to write anything to the db. |
Beta Was this translation helpful? Give feedback.
-
I presume some existing substrate cli commands can also use this. We have a Once we integrate
Although, in neither of these two cases we need proof, so this is a slightly different scenario.
Interesting. I presume since generating the root using an "Overlay + ReadOnlyBackend" is possible, in principle, generating proof from it should also be possible, because both of them just require the entire data to be merklized. Some pointers on where to look into for this would be useful. |
Beta Was this translation helpful? Give feedback.
-
Kian had this idea while we were discussing #14076.
Obviously when using a disk-backed DB in the try-runtime-cli we don't want to alter the underlying DB. This means that all changes must remain in the
OverlayedChanges
, never being flushed to the backend. Unfortunately this is that we cannot generate the trie root or any proofs.It may be a useful abstraction to be able to
This would be quite involved and probably not high enough priority to work on in the near future, but we wanted to kick off discussion now.
Some things to think about:
Beta Was this translation helpful? Give feedback.
All reactions