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(core) with repo #479

Closed
wants to merge 5 commits into from
Closed

refactor(core) with repo #479

wants to merge 5 commits into from

Conversation

btc
Copy link
Contributor

@btc btc commented Dec 28, 2014

This PR introduces the repo to the core package. The primary objective is to share more code between the live node and the integration tests (dev/prod parity). A secondary objective is to make routing elegantly pluggable. A non-goal is to facilitate creation ephemeral instances (alternate datastores).

This is not ready for CR. There are some open items:

  • who owns the repo resources? Repo or Node?
  • implement offline RepoConfig
  • pass sharness tests
  • update all NewIpfsNode call-sites
  • use the core constructor in integration tests (epictest)

Brian Tiger Chow added 5 commits December 28, 2014 09:10
needed for Core identity configuration
@jbenet this isn't ready for CR yet, but wanted to show it and open
discussion around a repo migration.
@btc btc added the status/in-progress In progress label Dec 28, 2014
@jbenet
Copy link
Member

jbenet commented Dec 28, 2014

@maybebtc it looks like the abstraction you have in mind is something that includes network, dht, and bitswap. that may be a good abstraction to make, but I think the "Repo" should mean specifically only an ipfs node's data storage repository (no Network). think the same thing as a git repo (all the objects, refs, config, hooks, etc). A node instantiated can operate on a repo (or more!) and add/modify data. I think an IPFS repo should be:

  • a Config (defining the node and many options)
  • a Datastore (for blocks and other data needed to be stored locally)
  • a Blockstore (wrapping the Datastore)

And an FSRepo impl should include a way to initialize it with an os path. (Another impl -- for example -- could be an S3Repo that happens to store everything in S3).

This matters because I plan to entirely rip out the merkledag + repo portions to make simple unixy tools that manipulate ipfs repos without at all touching the rest of ipfs.

@btc
Copy link
Contributor Author

btc commented Jan 11, 2015

merged in #538

@btc btc closed this Jan 11, 2015
@btc btc removed the status/in-progress In progress label Jan 11, 2015
@btc btc deleted the refactor/core-with-repo branch January 21, 2015 01:01
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Oct 23, 2021
* upgraded the protocol id to version 2 (i.e. /kad/2.0.0) and made it so v2 peers running in server mode respond to queries from v1 peers. Note: v2 peers will only send queries using the v2 protocol, will only add v2 peers to their routing tables, and will only tell v1 peers about v2 peers.
* to run a forked network we now use network specific protocol prefixes instead of manually setting protocol IDs. Use the ProtocolPrefix option instead of the Protocols option.
* emit errors during initialization if the user misuses the default protocol prefix by setting parameters inconsistent with the default protocol's network specification
* since the Client option has been deprecated it's been removed from the dht's options. While deprecated it is still available in the dht options package. Setting `Client(false)` now puts the node into ModeAuto.
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