Open romac opened 4 years ago
Something else to keep in mind and think hard about when designing the new API/abstraction:
@xla: Generally what I think we see here is that we let the actual domain of block storage creep into our higher level abstractions, which is informed too much by the key/value store semantics and it's physicality. — https://github.com/informalsystems/tendermint-rs/pull/419#discussion_r452765452
Maybe a broader look at the LightStore would include hiding/reducing the dependency on Sled, ie. https://github.com/informalsystems/tendermint-rs/pull/430#discussion_r452745330
We should also keep https://github.com/informalsystems/tendermint-rs/pull/449#issuecomment-659527984 in mind.
The current
LightStore
API is a bit underpowered, and forces us to implement ad-hoc method likeget_non_failed
orlatest_trusted_or_verified
to keep the downstream code clean.It would be nice to have a slightly more powerful, perhaps query-based, API that would remove the need for such ad-hoc methods.
Additionally, the sled-based light store should be guarded under a feature flag, in order to plan for potential other databases or just help downstream dependencies avoid the dependency on sled if they don't need it.