Skip to content

Use Datasource interface #620

Description

@tzdybal

Context

Currently database access is abstracted using custom, minimalistic set of interfaces.
There are two concrete cases where we need to use IPFS Datastore interface - header abstraction (see #574) and ConnectionGater (see: #386, #610).

Tasks

  • Decide what is the best solution
    • replace current interface with Datastore in rollmint codebase
    • implement Datastore interface using rollmint code
    • implement rollmint interfaces using Datastore interface
  • Implement selected solution

Requirements

Currently, rollmint use/require following access patterns

  • simple KV access
  • batching
  • prefix-iteration
  • prefix-based "substores"

Notes

  • namespace package looks like alternative to PrefixKV.
  • indexer and txindex use iteration and batching a lot; this code is "copy-pasted and modified" from Tendermint - we tend to minimize changes there

References

IPFS links

rollmint interfaces

https://github.com/celestiaorg/rollmint/blob/8a3780e73569e75c14e942e3ad53373e343ecb3a/store/kv.go#L9-L36

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions