1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 09:59:13 +08:00

4471 Commits

Author SHA1 Message Date
988b158dc7 Merge pull request #1276 from ipfs/debug/perm-fail
trying to debug permissions failure
2015-05-22 12:02:07 +02:00
648526d8f0 make bitswap commands error out properly offline 2015-05-21 22:41:44 -07:00
eff73ccce7 error -> notice, bitswap 2015-05-21 21:24:42 -07:00
cc905539ae trying to debug permissions failure 2015-05-21 17:24:38 -07:00
8b94abd199 Merge pull request #1275 from ipfs/fix/resolution
fix offline full path resolution bug
2015-05-21 15:19:05 -07:00
60ac59139c fix offline full path resolution bug 2015-05-21 14:45:30 -07:00
5853eac344 Merge pull request #1218 from ipfs/refactor/bitswap
large refactor of bitswap, implement wantmanager to manage wantlist
2015-05-21 15:47:14 -04:00
ce0d2f46d6 defer tock.Stop() 2015-05-21 03:08:32 -04:00
2f934e8c58 warning -> notice 2015-05-21 03:08:32 -04:00
b71a0aced0 clarify synhronization constructs 2015-05-21 03:08:32 -04:00
c273a3bd4f better bitswap logging 2015-05-21 03:08:32 -04:00
2882c793e2 add a distribution test with the rebroadcast delay disabled 2015-05-21 03:08:32 -04:00
2eac921e1d fixup the bitswap readme 2015-05-21 03:08:32 -04:00
829b88420e explicitly set bitswap message fullness 2015-05-21 03:08:31 -04:00
594c7786c3 turn rebroadcast back on 2015-05-21 03:08:31 -04:00
6ab4bfea95 turn tests down a bit and better context passing 2015-05-21 03:08:31 -04:00
65f815a27b move taskdone inside lock boundaries 2015-05-21 03:08:31 -04:00
32da687774 fix race bugs 2015-05-21 03:08:31 -04:00
6bf33ad62f WIP: super awesome bitswap cleanup fixtime 2015-05-21 03:08:31 -04:00
ef967ceeef contextify peermanager 2015-05-21 03:08:31 -04:00
8443b99c1d update comments and reintroduce test 2015-05-21 03:08:31 -04:00
a159e6825c implement peermanager to control outgoing messages
Also more refactoring of bitswap in general, including some perf
improvements and eventlog removal.

clean up, and buffer channels

move some things around

correctly buffer work messages

more cleanup, and improve test perf

remove unneccessary test

revert changes to bitswap message, they werent necessary
2015-05-21 03:08:30 -04:00
f0276dc39d Merge pull request #1271 from ipfs/fix/shutdown-err
silence error log on shutdown
2015-05-21 02:53:32 -04:00
8df8737f6a removed requirement of path package 2015-05-21 08:51:18 +02:00
373260d373 Fix: dnslink domain resolving was broken; Add: no caching for those
fixes #1234
fixes #1267
2015-05-21 08:44:17 +02:00
bd30866c1b silence error log on shutdown 2015-05-20 23:29:19 -07:00
ba82328dd9 Merge pull request #1270 from ipfs/fix/daemon-shutdown
do http server properly so daemon can shut down
2015-05-21 02:16:10 -04:00
f6fadc4c91 do http server properly so daemon can shut down 2015-05-20 22:42:54 -07:00
1f8230c98f Merge pull request #1263 from ipfs/stdin-parsing-optional-arg
Stdin parsing optional arg
2015-05-21 01:30:54 -04:00
5c94a68abb travis: dont run 1.3 for now
travis is very slow atm, so we're not running 1.3 builds for
a while.
2015-05-21 00:00:23 -04:00
12d38569a8 Merge pull request #1262 from ipfs/remove-inflect
remove inflect package
2015-05-20 23:59:30 -04:00
9b4b2c6879 Merge pull request #1235 from Luzifer/fix/dnslink-issues
Fix: Using the `dnslink` feature led to infinite redirects
2015-05-20 23:59:01 -04:00
d51f28e895 Merge pull request #1254 from ipfs/fix/refs-fail
fix silent refs failure
2015-05-20 23:25:02 -04:00
1c35377f9c Merge pull request #1256 from ipfs/fix/init
clean up and fix init permissions handling
2015-05-20 21:31:00 -04:00
23681727e0 parse: fix parsing optional arg with stdin
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-21 00:30:08 +02:00
225b58e31a remove inflect package 2015-05-20 15:09:20 -07:00
be3b7e13e3 parse_test: test command with optional arg
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-20 22:47:14 +02:00
8d6bfec890 parse: improve stdin fix
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-05-20 21:28:41 +02:00
1b3797474f Fix: Using the dnslink feature led to infinite redirects
fixes #1233
2015-05-20 19:42:28 +02:00
002cf5128e fix silent refs failure 2015-05-20 09:46:22 -07:00
8ea502f1b3 clean up and fix init permissions handling 2015-05-20 09:46:09 -07:00
01e1e71221 Merge pull request #1208 from wking/dns-resolver
Rework mutable namespace resolution to handle recursion
2015-05-20 12:42:18 -04:00
ce015d241b namesys/namesys_test: Excercise mpns.ResolveN
Shifting the generic testResolution helper from the protocol-specific
dns_test.go to the generic namesys_test.go.
2015-05-20 08:40:44 -07:00
c9fceeb19b namesys/dns_test: Add DNS resolution tests with a mock resolver 2015-05-20 08:40:44 -07:00
1e6594d087 namesys/dns: Pluggable lookupTXT field
So we can attach a mock lookup function for testing.
2015-05-20 08:40:44 -07:00
e4447b3c96 core/commands/publish: Fix published message
Previously we had a confusing situation, with:

* single-arg doc: published name <name> to <value>
* double-arg doc: published name <value> to <name>
* implementation: Published name <name> to <value>

Now we have the uniform:

  Published to <name>: <value>

With the following goals:

1. It's clear that we're writing <value> to <name>'s IPNS slot in the
   DHT.
2. We preserve the order of arguments from the command-line
   invocation:

     $ ipfs name publish <name> <value>
     Published to <name>: <value>
2015-05-20 08:40:44 -07:00
416d454b42 core/commands: Make 'ipfs name resolve' IPNS-only
And add a generic 'ipfs resolve' to handle cross-protocol name
resolution.
2015-05-20 08:40:44 -07:00
e643f72c86 core/commands/dns: Add 'ipfs dns ...' for resolving DNS references
This lets users resolve (recursively or not) DNS links without pulling
in the other protocols.  That makes an easier, more isolated target
for alternative implemenations, since they don't need to understand
IPNS, proquint, etc. to handle these resolutions.
2015-05-20 08:40:44 -07:00
c2ff02850b core/commands/resolve: Add a -r / --recursive option
For explicitly enabling recursive behaviour (it was previously always
enabled).  That allows folks who are interested in understanding
layered indirection to step through the chain one link at a time.
2015-05-20 08:40:42 -07:00
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