Giter VIP home page Giter VIP logo

kubo's Introduction


Kubo logo
Kubo: IPFS Implementation in GO

The first implementation of IPFS.

Official Part of IPFS Project Discourse Forum Matrix ci GitHub release godoc reference


What is Kubo?

Kubo was the first IPFS implementation and is the most widely used one today. Implementing the Interplanetary Filesystem - the Web3 standard for content-addressing, interoperable with HTTP. Thus powered by IPLD's data models and the libp2p for network communication. Kubo is written in Go.

Featureset

Other implementations

See List

What is IPFS?

IPFS is a global, versioned, peer-to-peer filesystem. It combines good ideas from previous systems such as Git, BitTorrent, Kademlia, SFS, and the Web. It is like a single BitTorrent swarm, exchanging git objects. IPFS provides an interface as simple as the HTTP web, but with permanence built-in. You can also mount the world at /ipfs.

For more info see: https://docs.ipfs.tech/concepts/what-is-ipfs/

Before opening an issue, consider using one of the following locations to ensure you are opening your thread in the right place:

YouTube Channel Subscribers Follow @IPFS on Twitter

Next milestones

Milestones on GitHub

Table of Contents

Security Issues

Please follow SECURITY.md.

Minimal System Requirements

IPFS can run on most Linux, macOS, and Windows systems. We recommend running it on a machine with at least 4 GB of RAM and 2 CPU cores (kubo is highly parallel). On systems with less memory, it may not be completely stable, and you run on your own risk.

Install

The canonical download instructions for IPFS are over at: https://docs.ipfs.tech/install/. It is highly recommended you follow those instructions if you are not interested in working on IPFS development.

Docker

Official images are published at https://hub.docker.com/r/ipfs/kubo/:

Docker Image Version (latest semver)

  • 🟢 Releases
  • 🟠 We also provide experimental developer builds
    • master-latest always points at the HEAD of the master branch
    • master-YYYY-DD-MM-GITSHA points at a specific commit from the master branch
    • These tags are used by developers for internal testing, not intended for end users or production use.
$ docker pull ipfs/kubo:latest
$ docker run --rm -it --net=host ipfs/kubo:latest

To customize your node, pass necessary config via -e or by mounting scripts in the /container-init.d.

Learn more at https://docs.ipfs.tech/install/run-ipfs-inside-docker/

Official prebuilt binaries

The official binaries are published at https://dist.ipfs.tech#kubo:

dist.ipfs.tech Downloads

From there:

  • Click the blue "Download Kubo" on the right side of the page.
  • Open/extract the archive.
  • Move kubo (ipfs) to your path (install.sh can do it for you).

If you are unable to access dist.ipfs.tech, you can also download kubo (go-ipfs) from:

Updating

Using ipfs-update

IPFS has an updating tool that can be accessed through ipfs update. The tool is not installed alongside IPFS in order to keep that logic independent of the main codebase. To install ipfs-update tool, download it here.

Downloading builds using IPFS

List the available versions of Kubo (go-ipfs) implementation:

$ ipfs cat /ipns/dist.ipfs.tech/kubo/versions

Then, to view available builds for a version from the previous command ($VERSION):

$ ipfs ls /ipns/dist.ipfs.tech/kubo/$VERSION

To download a given build of a version:

$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_darwin-386.tar.gz    # darwin 32-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_darwin-amd64.tar.gz  # darwin 64-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_freebsd-amd64.tar.gz # freebsd 64-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_linux-386.tar.gz     # linux 32-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_linux-amd64.tar.gz   # linux 64-bit build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_linux-arm.tar.gz     # linux arm build
$ ipfs get /ipns/dist.ipfs.tech/kubo/$VERSION/kubo_$VERSION_windows-amd64.zip    # windows 64-bit build

Unofficial Linux packages

Packaging status

Arch Linux

kubo via Community Repo

# pacman -S kubo

kubo-git via AUR

With the purely functional package manager Nix you can install kubo (go-ipfs) like this:

$ nix-env -i kubo

You can also install the Package by using its attribute name, which is also kubo.

Solus

Package for Solus

$ sudo eopkg install kubo

You can also install it through the Solus software center.

openSUSE

Community Package for go-ipfs

Guix

Community Package for go-ipfs is no out-of-date.

Snap

No longer supported, see rationale in kubo#8688.

Unofficial Windows packages

Chocolatey

No longer supported, see rationale in kubo#9341.

Scoop

Scoop provides kubo as kubo in its 'extras' bucket.

PS> scoop bucket add extras
PS> scoop install kubo

Unofficial macOS packages

MacPorts

The package ipfs currently points to kubo (go-ipfs) and is being maintained.

$ sudo port install ipfs

In macOS you can use the purely functional package manager Nix:

$ nix-env -i kubo

You can also install the Package by using its attribute name, which is also kubo.

Homebrew

A Homebrew formula ipfs is maintained too.

$ brew install --formula ipfs

Build from Source

GitHub go.mod Go version

kubo's build system requires Go and some standard POSIX build tools:

  • GNU make
  • Git
  • GCC (or some other go compatible C Compiler) (optional)

To build without GCC, build with CGO_ENABLED=0 (e.g., make build CGO_ENABLED=0).

Install Go

GitHub go.mod Go version

If you need to update: Download latest version of Go.

You'll need to add Go's bin directories to your $PATH environment variable e.g., by adding these lines to your /etc/profile (for a system-wide installation) or $HOME/.profile:

export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$GOPATH/bin

(If you run into trouble, see the Go install instructions).

Download and Compile IPFS

$ git clone https://github.com/ipfs/kubo.git

$ cd kubo
$ make install

Alternatively, you can run make build to build the go-ipfs binary (storing it in cmd/ipfs/ipfs) without installing it.

NOTE: If you get an error along the lines of "fatal error: stdlib.h: No such file or directory", you're missing a C compiler. Either re-run make with CGO_ENABLED=0 or install GCC.

Cross Compiling

Compiling for a different platform is as simple as running:

make build GOOS=myTargetOS GOARCH=myTargetArchitecture

Troubleshooting

  • Separate instructions are available for building on Windows.
  • git is required in order for go get to fetch all dependencies.
  • Package managers often contain out-of-date golang packages. Ensure that go version reports at least 1.10. See above for how to install go.
  • If you are interested in development, please install the development dependencies as well.
  • Shell command completions can be generated with one of the ipfs commands completion subcommands. Read docs/command-completion.md to learn more.
  • See the misc folder for how to connect IPFS to systemd or whatever init system your distro uses.

Getting Started

Usage

docs: Command-line quick start docs: Command-line reference

To start using IPFS, you must first initialize IPFS's config files on your system, this is done with ipfs init. See ipfs init --help for information on the optional arguments it takes. After initialization is complete, you can use ipfs mount, ipfs add and any of the other commands to explore!

Some things to try

Basic proof of 'ipfs working' locally:

echo "hello world" > hello
ipfs add hello
# This should output a hash string that looks something like:
# QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
ipfs cat <that hash>

HTTP/RPC clients

For programmatic interaction with Kubo, see our list of HTTP/RPC clients.

Troubleshooting

If you have previously installed IPFS before and you are running into problems getting a newer version to work, try deleting (or backing up somewhere else) your IPFS config directory (~/.ipfs by default) and rerunning ipfs init. This will reinitialize the config file to its defaults and clear out the local datastore of any bad entries.

Please direct general questions and help requests to our forums.

If you believe you've found a bug, check the issues list and, if you don't see your problem there, either come talk to us on Matrix chat, or file an issue of your own!

Packages

See IPFS in GO documentation.

Development

Some places to get you started on the codebase:

Map of Implemented Subsystems

WIP: This is a high-level architecture diagram of the various sub-systems of this specific implementation. To be updated with how they interact. Anyone who has suggestions is welcome to comment here on how we can improve this!

CLI, HTTP-API, Architecture Diagram

Origin

Description: Dotted means "likely going away". The "Legacy" parts are thin wrappers around some commands to translate between the new system and the old system. The grayed-out parts on the "daemon" diagram are there to show that the code is all the same, it's just that we turn some pieces on and some pieces off depending on whether we're running on the client or the server.

Testing

make test

Development Dependencies

If you make changes to the protocol buffers, you will need to install the protoc compiler.

Developer Notes

Find more documentation for developers on docs

Maintainer Info

Contributing

We ❤️ all our contributors; this project wouldn’t be what it is without you! If you want to help out, please see CONTRIBUTING.md.

This repository falls under the IPFS Code of Conduct.

Members of IPFS community provide Kubo support on discussion forum category here.

Need help with IPFS itself? Learn where to get help and support at https://ipfs.tech/help.

License

This project is dual-licensed under Apache 2.0 and MIT terms:

kubo's People

Contributors

ajnavarro avatar aschmahmann avatar chriscool avatar cryptix avatar dependabot-preview[bot] avatar dependabot[bot] avatar galargh avatar gammazero avatar guseggert avatar hacdias avatar hsanjuan avatar jbenet avatar jessicaschilling avatar jorropo avatar kevina avatar kubuxu avatar lidel avatar magik6k avatar mappum avatar marten-seemann avatar michaelmure avatar overbool avatar rht avatar richardlitt avatar rubenkelevra avatar schomatis avatar stebalien avatar tv42 avatar vyzo avatar whyrusleeping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kubo's Issues

Namespace description

@whyrusleeping here's a rough spec of ipns / the namespace:

  • Make an NSResolver interface.
type NSResolver interface {
  Resolve(name string) (string, error)
}
  • Implement DNS, proquint NSResolvers (which @Bren2010 started).
  • Implement a RoutingResolver (the meat of IPNS) which does:
// RoutingName is the de-serialized name structure that is stored (serialized) 
// in the routing system. Basically, a hash + a digital signature. (serialization can be
// protobuf, or a simple binary format)
type RoutingName {
  Hash        u.Key
  Signature []byte
}

// RoutingResolver implements NSResolver for the main IPFS SFS-like naming
type RoutingResolver {
  routing routing.IpfsRouting
  dag      mdag.DAGService
}

func (r *RoutingResolver) Resolve (name string) (string, error) {

  // name should be a multihash. if it isn't, error out here.

  // use the routing system to get the name.
  // /ipns/<name>
  key := u.Key(name) // or whatever
  val, err := r.routing.Get(key)
  if err != nil {
    return "", err
  }

  // name should be a public key retrievable from ipfs
  // /ipfs/<name>
  node, err :=  r.dag.Get(key)
  if err != nil {
    return "", err
  }

  // get PublicKey from node.Data
  pk := PublicKey(node.Data)

  // check sig with pk
  if !pk.Verify(val.Hash, val.Signature) {
    return "", errors.New("Invalid value. Not signed by PrivateKey corresponding to %v", pk)
  }

  // ok sig checks out. this is a valid name.
  return string(val.Hash)
}
  • implement NameService or NameSystem object:
// NameSystem is the object implementing IPNS. It adheres to the `NSResolver` 
// interface, and uses child `NSResolvers`, depending on what the name looks like.
// 
// hashes -> routing, domains -> dns, proquints -> proquint
// we can add `.bit` and `.onion` resolution here in the future
// 
// in non-routing cases, the values returned are hashes to lookup in the routing system.
// (most of the time, if not ALL of the time. still deciding on this). meaning that 
// a dns record: `DNS TXT ipns=<some-hash>` needs to then resolve `<some-hash>`
// via the routing system.
type NameSystem struct {
  routing   RoutingResolver
  dns        DNSResovler
  proquint ProquintResolver
}
  • add mounting of /ipns to ipfs mount cmd (maybe have options for each i.e. -n, --ipns and -f, --ipfs to toggle each on/off)

feat(dht) Implement DHT Diagnostic messages

My goal with the diagnostic messages is to provide a means to gather data about the network, number of nodes, and a map of the connections between them. Having this will allow us to analyze performance bottlenecks and other interesting issues that may arise as we move towards a larger ipfs deployment.

Should have NAT Traversal

Peers behind nats need a way for other peers in the network to connect to them. It would be nice to also have webrtc, but until a go library for that exists, this will have to do.

snappy response

running a command like ipfs ls or ipfs refs locally feels a ~300ms slower than we could get it. is not doing much beyond reading a few files and printing out stuff, leveldb is pretty fast, so not sure what's up.

Change logging

I would like to update all the logging in ipfs (util.DOut, and friends) to instead use go-logging. This will help us out immensely once we start doing larger deloys and things start failing.

Nomenclature for MerkelDAG objects/nodes

This project has a lot of graph-based data structures involved and the word Node is used to refer to completely different concepts in the codebase. To avoid confusion, should we rename the MerkelDAG nodes to Objects and stick to this notation?

Let me know and I will make the refactoring PR.

DHT implementation

dht.go links to https://github.com/jbenet/node-ipfs/blob/master/submodules/ipfs-dht/index.js
which I'm currently porting from JS to Go but there are some quirks on the JS code.

May I ask you what is supposed to be a DHTStream? Currently is not implemented and the closest thing I could find is swarm.Conn.

Also there's issues with peer.ID being a multihash.Multihash which it's underlying type is []byte which can't be used as map keys and you are trying to use it that way, I already informed about this on #8.

You should focus on just one implementation until is finished so other people can port to other languages. Preferably the Go one because it's a static one.

feat(bitswap) ensure one active request per key

Presently, for a key |k|, concurrent calls to bitswap.GetBlock(k) result in multiple requests (get providers then fan out and get blocks).

Need to ensure only one active request per key.

In-progress.

Logging non-fatal async errors

I wish to propose a pattern for logging the non-fatal errors that occur in asynchronous operations.

Context exposes an error logging method:

func (ctx *u.IPFSContext) LogError(err error) {
// may be implemented synchronously
}

The interface extends the golang Context:

type IPFSContext interface {
  context.Context
  LogError(err error)
}

Now async actors can get information back out to parent without modifying control flow or confusing the caller/callee contract!

func asyncWork(ctx u.IPFSContext, in <-chan rawData) {
  for raw := <- in {
    val, err := transform(raw)
    if err != nil {
      ctx.LogError(err)
      continue
    }
    doThingsWith(val)
  }
}

the context creator can listen for errors:

func (ctx *context.IPFSContext) Errs() <-chan error {
  // return a channel of errors
}

The pattern is analogous to the way children listen on Done()

  ctx := context.New(context.Background())
  go asyncWork(ctx, ch)
  for {
    select {
      case err <-ctx.Errs():
        u.DOut(err)
    }
  }

Thoughts? @jbenet @whyrusleeping

Need `dev.md` explaining current state of src

Need dev.md explaining current state of src

One thing I found missing from the current Go source is I didn't find a document explaining the current state of the repository. So to figure out what is working you have to go searching.

I'll get on this asap :)

Implement UDP as a swarm protocol

Having UDP as a protocol for swarm to use will make ipfs MUCH more flexible.

Some considerations will need to be taken for packet loss though, in some cases lost packets are not okay. Implementing a basic packet-wise ACK system might be useful.

Build on Windows?

Hi - as already mentioned in #8 (comment) it appears that the fuse project will not compile on Windows. I get the following error when attempting go get ./...:

  # bazil.org/fuse
  ..\..\..\..\..\bazil.org\fuse\fuse.go:985: undefined: attr
  ..\..\..\..\..\bazil.org\fuse\fuse_kernel.go:314: undefined: attr

This comment at the fuse project from last year seems to indicate that windows is not supported: bazil/fuse#5 (comment)

Windows x64, via cygwin if that is relevant.

Mount Things

  • Check OSXFUSE is installed
  • Make sure to have OSXFUSE >= 2.7 (2.3.4 kernel panics...)
  • Check mountpoint exists
  • "Mount server running -- ^C to exit."
  • when mounted leveldb is locked.
  • ls on root should error (unlistable)

BitSwap Implementation

BitSwap is not currently implemented in the go-ipfs repo. This issue can serve as a contact point for work and discussion around it.

bug(dht) TestLayeredGet, TestFindPeer failing (port binding)

=== RUN TestLayeredGet
Failed to listen on: &{������} [listen tcp 127.0.0.1:5000: bind: address already in use]--- FAIL: TestLayeredGet (0.25 seconds)
    dht_test.go:51: 0: listen tcp 127.0.0.1:5000: bind: address already in use

=== RUN TestFindPeer
Failed to listen on: &{������} [listen tcp 127.0.0.1:5000: bind: address already in use]--- FAIL: TestFindPeer (0.10 seconds)
    dht_test.go:51: 0: listen tcp 127.0.0.1:5000: bind: address already in use

commit: f03afaf
test log: https://s3.amazonaws.com/archive.travis-ci.org/jobs/35251330/log.txt
ci: https://travis-ci.org/jbenet/go-ipfs/jobs/35251330#L208

Update warning

ipfs command should check for updates from github and warn the user. This should be able to be changed in the config. Maybe:

  • update.check ignore Do not check.
  • update.check warn (default) Warn the user on every run of the ipfs command.
  • update.check error Warn the user on every run of the ipfs command, and exit.

(So, changed with ipfs config update.check ignore. )

Improve Code Coverage in testing

It is my opinion that we dont have enough tests. This issue will serve as a discussion for creating new tests and tracking code coverage over time.

treat security concerns seriously

the codebase had this comment:

    // pretend to encrypt key, then store it unencrypted
    skbytes, err := sk.Bytes()
    if err != nil {
        return err
    }
    cfg.Identity.PrivKey = base64.StdEncoding.EncodeToString(skbytes)

Right now we're cutting a lot of corners and doing things not securely yet. But it's important to flag them as such for people who might be just browsing the codebase. If I saw that on a random codebase i'd be alarmed, even knowing the code is changing.

go lint

Some Gophers might be turned off by the code not following golint rules. Most Go projects largely adhere to golint's rules. Maybe try running golint on the code?

The most common thing I saw was docstrings not starting with the name of the definition they are documenting. E.g., use:

// Foo is a...
func Foo() {}

instead of

// fetch the baz...
func Foo() {}

TestHandshake fails occasionally

=== RUN TestHandshake
fatal error: all goroutines are asleep - deadlock!
goroutine 16 [chan receive]:
testing.RunTests(0x69de80, 0x76a710, 0x1, 0x1, 0x1)
    /home/travis/.gvm/gos/go1.3.1/src/pkg/testing/testing.go:505 +0x923
testing.Main(0x69de80, 0x76a710, 0x1, 0x1, 0x7780a0, 0x0, 0x0, 0x7780a0, 0x0, 0x0)
    /home/travis/.gvm/gos/go1.3.1/src/pkg/testing/testing.go:435 +0x84
main.main()
    github.com/jbenet/go-ipfs/identify/_test/_testmain.go:47 +0x9c
goroutine 19 [finalizer wait]:
runtime.park(0x413090, 0x7739f0, 0x7724e9)
    /home/travis/.gvm/gos/go1.3.1/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x7739f0, 0x7724e9)
    /home/travis/.gvm/gos/go1.3.1/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
    /home/travis/.gvm/gos/go1.3.1/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
    /home/travis/.gvm/gos/go1.3.1/src/pkg/runtime/proc.c:1445
goroutine 20 [chan receive]:
github.com/jbenet/go-ipfs/identify.Handshake(0xc208086380, 0xc20802d490, 0xc20802a0d0, 0xc20802a000, 0x30, 0x0, 0x0, 0x0)
    /home/travis/gopath/src/github.com/jbenet/go-ipfs/identify/identify.go:157 +0x159f
github.com/jbenet/go-ipfs/identify.TestHandshake(0xc2080501b0)
    /home/travis/gopath/src/github.com/jbenet/go-ipfs/identify/identify_test.go:50 +0x6f1
testing.tRunner(0xc2080501b0, 0x76a710)
    /home/travis/.gvm/gos/go1.3.1/src/pkg/testing/testing.go:422 +0x8b
created by testing.RunTests
    /home/travis/.gvm/gos/go1.3.1/src/pkg/testing/testing.go:504 +0x8db
goroutine 22 [chan receive]:
github.com/jbenet/go-ipfs/identify.secureInProxy(0xc20802a0d0, 0xc20807e720, 0x64e230, 0x6, 0xc208066870, 0x10, 0x44, 0xc208066880, 0x20, 0x34, ...)
    /home/travis/gopath/src/github.com/jbenet/go-ipfs/identify/identify.go:186 +0x168
created by github.com/jbenet/go-ipfs/identify.Handshake
    /home/travis/gopath/src/github.com/jbenet/go-ipfs/identify/identify.go:151 +0x1402
goroutine 23 [chan receive]:
github.com/jbenet/go-ipfs/identify.secureOutProxy(0xc20802a000, 0xc20807e780, 0x64e230, 0x6, 0xc208066820, 0x10, 0x44, 0xc208066830, 0x20, 0x34, ...)
    /home/travis/gopath/src/github.com/jbenet/go-ipfs/identify/identify.go:221 +0x16b
created by github.com/jbenet/go-ipfs/identify.Handshake
    /home/travis/gopath/src/github.com/jbenet/go-ipfs/identify/identify.go:152 +0x14b9
FAIL    github.com/jbenet/go-ipfs/identify  0.112s

global config `-c` flag

the config flag should work globally, but it seems it doesn't:

% ipfs init -c="."
flag provided but not defined: -c
Usage: ipfs init

Initialize ipfs local configuration


Options:
  -b=4096: number of bits for keypair
  -f=false: force overwrite of existing config
  -p="": passphrase for encrypting keys

(on net / 128b6bb)

Ipns Filesystem Semantics

Hey, Just creating a discussion space for figuring out how the filesystem interface for ipns is going to feel!

Push test coverage reports to IPFS; proxy and serve over HTTP

The Golang toolchain allows you to generate nifty html test coverage reports. Proposal:

  1. Push to go-ipfs origin
  2. CI server runs tests
  3. CI server generates html coverage reports
  4. CI server pushes the html coverage reports to an IPFS node. Node publishes the files.
  5. Developer http://www.ipfs-dev.io/coverage/
  6. On a VPS, HTTP server proxies request to local IPFS node. Node queries swarm and returns results.
  7. Coverage reports are displayed in the browser.

The benefits are three-fold:

  1. improve test coverage -> improve software quality
  2. Dogfood an interesting use-case for IPFS as a web datastore. -> improve toolchain, api
  3. Be able to detect problems in the network early and often (on every commit!) -> improve network reliability

feat(importer) Implement Rabin Fingerprinting

Our current file chunking scheme is just splitting on blocks of a certain size. This is bad for a variety of reasons. @jbenet and I think it will be best to use rabin fingerprinting as our default method for file chunking. The downside is that, other than a brief description on wikipedia, there isnt much to go on for the algorithm itself, so its gonna be a bit of fun figuring this out.

"Weird" code conventions

Things like this are weird for code reviewing.

// Copied from core/core.go

import (
    "fmt"
    ds "github.com/jbenet/datastore.go"
    blocks "github.com/jbenet/go-ipfs/blocks"
    config "github.com/jbenet/go-ipfs/config"
    merkledag "github.com/jbenet/go-ipfs/merkledag"
    path "github.com/jbenet/go-ipfs/path"
    peer "github.com/jbenet/go-ipfs/peer"
)

Most of those named imports are useless (same name as package name) and unsorted.

gofmt will deal with import sorting, separating std from local package and other (non-std) packages would be the best way to go (it doesn't violate any code conventions and it's better for readers/reviewers).

import (
    "fmt"

    "github.com/jbenet/go-ipfs/blocks"
    "github.com/jbenet/go-ipfs/config"
    "github.com/jbenet/go-ipfs/merkledag"
    "github.com/jbenet/go-ipfs/path"
    "github.com/jbenet/go-ipfs/peer"

    ds "github.com/jbenet/datastore.go"
)

Why are you using Datastore library for local storage?

I browsed the source code and all the local storage stubs refer to the datastore library github.com/jbenet/datastore.go. The README and the references describe it as an abstraction layer that would allow to bind it to any database format there is.

And then there is a link to level_db as one of the 'datastore' types in config/config.go:db.

I am really not sure if that abstraction layer is needed at this stage. Specific implementation of the local storage is not that important for minimum viable version. More than that, git, that other very successful DAG-on-top-of-data blobs design, implements and stores objects in a very opinionated way and seems to be successful in spite of it.

Is using that datastore library an intentional design decision? Can we just use something like github.com/syndtr/goleveldb at this stage?

Loving the project and the design, keep up the amazing work!

`go fmt` and other things

I want to make sure all code pushed is run through go fmt. We probably want:

  • a git pre commit hook
  • a github integration that checks PRs (go fmt, go test)

This post (http://peter.bourgon.org/go-in-production/) also recommends:

on Save: go fmt (or goimports)
on Build: go vet, golint, and maybe go test
on Deploy: go test -tags=integration

Arch Linux User Package

Hi,

I've created a package for the Arch User Repository. If you'd like, I can fork and write some instructions on the README. It is available here: https://aur.archlinux.org/packages/go-ipfs-git/

The package git clones from this exact repo and go gets the dependencies as per the README file. I hope this helps users try out IPFS more easily.

wget https://aur.archlinux.org/packages/go/go-ipfs-git/go-ipfs-git.tar.gz
tar -xvf go-ipfs-git.tar.gz
cd go-ipfs-git
makepkg -i

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.