Implement remote storage
Closed this issue · 2 comments
sideninja commented
Implement a storage that uses the archive node to get the registers.
https://github.com/onflow/flow-archive
Implementing the store interface defined here
flow-emulator/storage/store.go
Line 123 in 8ec65fa
We can reuse most of the default store implementation but swap out the LedgerByHeight to return the storage snapshot provided by archive node.
The first step is to implement this for one-off transactions only, the second step would be to keep changes local and then fork the network state by first trying to see if we have local changes for a read and if not read from remote.
bluesign commented
Btw if we will fork in the future, it would be nice to also fork protocol state. Something like ForkedStore(blockHeight, oldStore, newStore)
sideninja commented
Yeah, I agree. Planning to play with this idea a bit this week.