Commit Graph

48 Commits

Author SHA1 Message Date
Steven Allen
dfe7ef4fcf gx: update go-multihash
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-14 13:09:51 -08:00
Steven Allen
70d6629940 gx: update go-cid, go-multibase, base32
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-09-01 17:46:49 -07:00
Jeromy
cccc6a94a3 update go-multihash and bubble up changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-11 19:27:43 -07:00
Łukasz Magiera
8ab93aaeb2 Update go-datastore to 1.2.2, go-cid to 0.7.16
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-07-04 20:18:57 +02:00
Steven Allen
13636bef50 blocks: gx import go-block-format
And updated related dependencies.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-06-29 22:12:14 +02:00
Jeromy
b15470d548
bubble up updates from go-multihash changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-04-20 20:28:04 +02:00
Jeromy
b4eeff2d84 update go-multihash and bubble up deps
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-02-12 12:25:41 -08:00
Jeromy
53d47669da bubble up go-datastore deps
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-28 22:29:38 -08:00
Jeromy
396c629301 update to newer ipld node interface with Copy and better Tree
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-15 18:00:49 -08:00
Richard Littauer
9843e86258 Changed so only explicit ipfs cli commands are lowercased
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-10-27 22:55:13 -07:00
Jeromy
eac13abaec update to new cid and ipld node packages
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-25 09:54:04 -07:00
Jeromy
f4d7369c4a bitswap: protocol extension to handle cids
This change adds the /ipfs/bitswap/1.1.0 protocol. The new protocol
adds a 'payload' field to the protobuf message and deprecates the
existing 'blocks' field. The 'payload' field is an array of pairs of cid
prefixes and block data. The cid prefixes are used to ensure the correct
codecs and hash functions are used to handle the block on the receiving
end.

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-10 08:19:31 -07:00
Jeromy
1f9ec4e3ed update to libp2p 4.0.1 and propogate other changes
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-05 22:12:43 -07:00
Jeromy
c8fe495934 integrate CIDv0
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-09-07 13:32:32 -07:00
Jeromy
e79e1d31e9 remove a ton of unused godeps
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-04-13 11:23:10 -07:00
Jeromy
d7dab3afea Use gx vendored go-ipfs-utils where possible
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
Stephen Whitmore
cf0a85b7a4 Implements Path.PopLastSegment().
This allows a path (/ipfs/foo/bar) to be separated between its head
(/ipfs/foo) and its tail (bar).

License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-01-24 23:29:41 -08:00
Stephen Whitmore
bc49bee623 Implements path.IsJustAKey().
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
2016-01-16 03:10:28 +01:00
rht
743f3edcbb strings.Split -> path.SplitList
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2016-01-12 08:22:55 -08:00
rht
ffd859232d Replace strings.Join(elms, "/") with path.Join(elms)
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2016-01-12 08:22:55 -08:00
Jeromy
ce70743829 fix parsing for paths of format <hash>/path
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-14 12:01:01 -07:00
rht
dfde18e124 Add path validation in Resolver.ResolvePath
Add ErrNoComponents in ParsePath validation & remove redundant path
validation.
Any lines using core.Resolve & Resolver.ResolvePath will have their path
validated.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 02:41:28 +07:00
Jeromy
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
W. Trevor King
3ead2443e5 namesys: Add recursive resolution
This allows direct access to the earlier protocol-specific Resolve
implementations.  The guts of each protocol-specific resolver are in
the internal resolveOnce method, and we've added a new:

  ResolveN(ctx, name, depth)

method to the public interface.  There's also:

  Resolve(ctx, name)

which wraps ResolveN using DefaultDepthLimit.  The extra API endpoint
is intended to reduce the likelyhood of clients accidentally calling
the more dangerous ResolveN with a nonsensically high or infinite
depth.  On IRC on 2015-05-17, Juan said:

15:34 <jbenet> If 90% of uses is the reduced API with no chance to
  screw it up, that's a huge win.
15:34 <wking> Why would those 90% not just set depth=0 or depth=1,
  depending on which they need?
15:34 <jbenet> Because people will start writing `r.Resolve(ctx, name,
  d)` where d is a variable.
15:35 <wking> And then accidentally set that variable to some huge
  number?
15:35 <jbenet> Grom experience, i've seen this happen _dozens_ of
  times. people screw trivial things up.
15:35 <wking> Why won't those same people be using ResolveN?
15:36 <jbenet> Because almost every example they see will tell them to
  use Resolve(), and they will mostly stay away from ResolveN.

The per-prodocol versions also resolve recursively within their
protocol.  For example:

  DNSResolver.Resolve(ctx, "ipfs.io", 0)

will recursively resolve DNS links until the referenced value is no
longer a DNS link.

I also renamed the multi-protocol ipfs NameSystem (defined in
namesys/namesys.go) to 'mpns' (for Multi-Protocol Name System),
because I wasn't clear on whether IPNS applied to the whole system or
just to to the DHT-based system.  The new name is unambiguously
multi-protocol, which is good.  It would be nice to have a distinct
name for the DHT-based link system.

Now that resolver output is always prefixed with a namespace and
unprefixed mpns resolver input is interpreted as /ipfs/,
core/corehttp/ipns_hostname.go can dispense with it's old manual
/ipfs/ injection.

Now that the Resolver interface handles recursion, we don't need the
resolveRecurse helper in core/pathresolver.go.  The pathresolver
cleanup also called for an adjustment to FromSegments to more easily
get slash-prefixed paths.

Now that recursive resolution with the namesys/namesys.go composite
resolver always gets you to an /ipfs/... path, there's no need for the
/ipns/ special case in fuse/ipns/ipns_unix.go.

Now that DNS links can be things other than /ipfs/ or DHT-link
references (e.g. they could be /ipns/<domain-name> references) I've
also loosened the ParsePath logic to only attempt multihash validation
on IPFS paths.  It checks to ensure that other paths have a
known-protocol prefix, but otherwise leaves them alone.

I also changed some key-stringification from .Pretty() to .String()
following the potential deprecation mentioned in util/key.go.
2015-05-20 08:40:05 -07:00
Jeromy
6da12b5398 address comments from CR 2015-04-26 22:32:12 -07:00
Jeromy
c1560befcd fix up core.Resolve a bit 2015-04-26 22:32:12 -07:00
Jeromy
e3255f46e1 address comments from CR 2015-04-26 22:32:12 -07:00
Jeromy
3d80b9d27d refactored ipns records to point to paths
Also changed the ipns dns resolution to use the "dnslink" format
2015-04-26 22:32:12 -07:00
gatesvp
31ff954539 Move IPNS resolutions into the core library
Move IPNS resolutions into the core library via the pathresolver.go
file. Fix the CLI commands to leverage this core component.
2015-04-20 01:04:30 -07:00
Ho-Sheng Hsiao
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
Jeromy
9ddfafb40a address concerns about user interface with new Path type 2015-01-30 19:55:38 +00:00
Jeromy
abb3c9c9c4 implement path type 2015-01-29 17:51:08 +00:00
Juan Batiz-Benet
670e693a31 path: ignore prefix /ipfs/ 2015-01-08 16:52:23 -08:00
Jeromy
4f083d54d6 write a few package doc strings to improve look of godoc 2014-11-08 21:42:36 -08:00
Brian Tiger Chow
cea398b8a7 fix(all) log.Debug -> log.Debugf 2014-10-30 06:35:29 -07:00
Emery Hemingway
056699cebe convert DAGService to an interface 2014-10-25 22:15:19 -04:00
Juan Batiz-Benet
972c0f7b4b u.DOut -> log.Debug
and other logging switches. I kept the u.PErr and u.POut in cli
commands, as those do need to write raw output directly.
2014-10-09 04:50:22 -07:00
Juan Batiz-Benet
0c8ae7674e loggers: set level 2014-10-04 03:53:21 -07:00
Juan Batiz-Benet
7e1cd59259 initialize loggers at ERROR 2014-10-04 03:36:30 -07:00
Juan Batiz-Benet
f085d594aa vendoring ipns things 2014-10-01 00:44:22 -07:00
Jeromy
6080944af9 writing files inside ipns works now! also implemented resolve cli command 2014-10-01 00:41:29 -07:00
Jeromy
c41a9717fe make disconnects and reconnects work a little better 2014-10-01 00:26:59 -07:00
Brian Tiger Chow
7968b45e58 vendor dependencies with godep
dependencies are vendored into Godeps/_workspace and commit versions are
recorded in Godeps.json

update datastore to e89f0511
update go.crypto
2014-09-09 22:39:42 -07:00
Jeromy
691d1b36bb integrate bitswap and blockservice into the core package 2014-08-29 11:34:50 -07:00
Juan Batiz-Benet
f718bd6a92 go lint
link errors left:
- protocol buffers output is not lint-friendly
2014-07-22 02:20:08 -07:00
Juan Batiz-Benet
b5b2e8ae77 using %q 2014-07-21 00:10:29 -07:00
Juan Batiz-Benet
8a07a62643 added path resolution 2014-07-06 00:07:04 -07:00
Juan Batiz-Benet
3b570d3f82 skeleton. 2014-06-26 01:14:26 -07:00