Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor blockstores #5484

Merged
merged 11 commits into from
Mar 1, 2021
Merged

refactor blockstores #5484

merged 11 commits into from
Mar 1, 2021

Conversation

raulk
Copy link
Member

@raulk raulk commented Jan 29, 2021

  • Place all blockstores into a single flattened package. Subpackages are only created for blockstores that depend on third-party components (e.g. badger).
  • Make the blockstore.Blockstore interface the union of the basic IPFS blockstore + Viewer, for cleanness and to remove type assertions. This interface will be enhanced soon with a Sync() method: 5057.
  • Introduce a blockstore.Adapt(BasicBlockstore) method to adapt a basic IPFS blockstore into a Lotus blockstore.
  • Rename blockstores for consistency.
  • Add godocs to all blockstores. Still TODO.

Once we merge this, we'll be in a better position to add support for the Sync() method (#5057), and to continue extending the blockstore with specialised operations for better efficiency.


Partly addresses #5455.

@raulk
Copy link
Member Author

raulk commented Jan 29, 2021

This depends on #5425.

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just 2 minor nits

api/api_common.go Outdated Show resolved Hide resolved
blockstore/blockstore.go Show resolved Hide resolved
@raulk
Copy link
Member Author

raulk commented Feb 28, 2021

@magik6k should be ready to put on a boat. @vyzo and I are preparing a bunch of PRs for the splitstore on top of this.

@magik6k magik6k changed the base branch from master to next March 1, 2021 17:47
@magik6k magik6k merged commit 5764269 into next Mar 1, 2021
@magik6k magik6k deleted the refactor/lib/blockstore branch March 1, 2021 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants