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

feat(blocksync): WIP experiments with DAGStore as a Blockstore #1051

Closed
wants to merge 10 commits into from

Conversation

distractedm1nd
Copy link
Collaborator

@distractedm1nd distractedm1nd commented Sep 1, 2022

ahhhh we're CARinggggg

This PR in its current state is purely just for experimentation, and is hack upon hack upon hack just to see what obstacles we may run into during implementation of the new blocksync. I expect to throw this all away once the ADR #1037 is finished (this PR could also possibly influence the ADR, though), and take what we learned from this into it.

If you try to run this pls mkdir /tmp/carexample/ and /tmp/transients/

Current features:

  • DAGStore that implements a BlockStore with a persisted top level index and LRU cache
  • CARBlockStore that acts as a NodeAdder and handles the CAR-level blockstores
  • Every block reconstructed on a full node creates a CARv2
  • Each contained CID is registered on the top level index for retrieval from the blockstore

Biggest issues:

  • Uhhhh im pretty sure light nodes and bridge nodes wouldnt work rn if you tried to run them (it uses a DAGBlockstore for everything) (Artifacts from playing around are everywhere, DI is plain wrong in places)
  • I don't think getting over the top level index is currently functional (I think it fails and goes straight to the exchange)
  • There is no cache on the DAGBlockStore implementation
  • The persisted datastore for the top level index does NOT use go-indexer-core as a backend
  • The naming of the files uses the DAH header hash (which is not unique) instead of the extended header hash
  • I commented out testing.go
  • Tests are not passing
  • Config/Management over file directory (will wait for ADR on this one)
  • Bridge nodes should also use the blockstore, so: make AddShares compatible with it (difficult, because we need root up front)

@distractedm1nd distractedm1nd self-assigned this Sep 2, 2022
@distractedm1nd
Copy link
Collaborator Author

Closing in favor of #1232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant