1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 19:24:14 +08:00

4869 Commits

Author SHA1 Message Date
rht
dd99a70a7d Add readonly api to gateway
Based on https://github.com/ipfs/go-ipfs/pull/1389

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-15 17:08:59 +07:00
4433c30ef2 Merge pull request #1575 from ipfs/blockservice-no-err
blockservice.New doesnt need to return an error
2015-08-15 06:47:23 +02:00
7789077dbd Merge pull request #1076 from zorun/fix-listen-ipv6
Default config: listen on IPv6 for the swarm address
2015-08-15 06:41:26 +02:00
f209763357 blockservice.New doesnt need to return an error
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-14 16:25:51 -07:00
da75e92d5b Merge pull request #1570 from rht/config-null
Config: allow to set maps on null value
2015-08-14 04:08:45 +02:00
c1380f122b Merge pull request #1571 from ipfs/fix/refs-json
dont put newlines in refs json output
2015-08-14 04:08:30 +02:00
8d6fa2ede7 dont put newlines in refs json output
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-13 11:08:10 -07:00
rht
c0a0cde986 Config: allow to set maps on null value
Also, now, if ipfs config foo.bar has value of anything that is not map (0, "0", 0.1),
then ipfs config foo.bar.baz now returns an error instead of a panic

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-13 19:42:32 +07:00
afbdedb469 config set: test setting with null & not-defined parent
This adds a failing for the case described in #1561

License: MIT
Signed-off-by: Stephan Seidt <evilhackerdude@gmail.com>
2015-08-13 19:41:41 +07:00
rht
35ab1e347b Notify when daemon is ready
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-13 09:51:52 +07:00
64102a5810 use correct context for dht notifs
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-12 16:08:57 -07:00
ace06b47d1 Merge pull request #1565 from ipfs/add-patch
cmds/add: use dagutils.Editor, like patch
2015-08-12 15:34:41 +02:00
978c9fa16f cmds/add: use dagutils.Editor, like patch
This changes the pin behavior. It uses the filenames given through
the api, and allows files to be streamed faltly (not a hierarchy),
which is easier for other things (like vinyl in node-ipfs-api land).
Files can also be entirely out of order, and the garbage intermediate
directories will not be pinned (gc-ed later).

The changes also mean the output of add has changed slightly-- it
no longer shows the local path added, but rather the dag path
relative to the added roots. This is a small difference, but changes
tests.

The dagutils.Editor creates a lot of chaff (intermediate objects)
along the way. Wonder how we might minimize the writes to the
datastore...

This commit also removes the "NilRepo()" part of the --only-hash
mode. We need to store at least in an in-mem repo/datastore because
otherwise the dagutils.Editor breaks.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-12 08:24:06 +02:00
e8d6f79062 Merge pull request #1545 from ipfs/feat/real-rabin
Feat/real rabin
2015-08-11 08:14:56 -07:00
ed4274c9b7 implement a basic DAG diffing algorithm
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-10 17:47:08 -07:00
4d287bce51 randomly getting a bad data layout shouldnt fail the tests
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-10 14:44:06 -07:00
39a23392c1 use rabin fingerprinting for a chunker
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

implement rabin fingerprinting as a chunker for ipfs

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

vendor correctly

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

refactor chunking interface a little

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

work chunking interface changes up into importer

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

move chunker type parsing into its own file in chunk

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-08 15:33:10 -07:00
d1366cde1b Merge pull request #1552 from ipfs/fix-tar-reader
get: fix halt bug + improvements
2015-08-05 10:57:51 +02:00
f105ce439f get: fix bug + improvements
up until now there has been a very annoying bug with get, we would
get halting behavior. I'm not 100% sure this commit fixes it,
but it should. It certainly fixes others found in the process of
digging into the get / tar extractor code. (wish we could repro
the bug reliably enough to make a test case).

This is a much cleaner tar writer. the ad-hoc, error-prone synch
for the tar reader is gone (with i believe was incorrect). it is
replaced with a simple pipe and bufio. The tar logic is now in
tar.Writer, which writes unixfs dag nodes into a tar archive (no
need for synch here). And get's reader is constructed with DagArchive
which sets up the pipe + bufio.

NOTE: this commit also changes this behavior of `get`:
When retrieving a single file, if the file exists, get would fail.
this emulated the behavior of wget by default, which (without opts)
does not overwrite if the file is there. This change makes get
fail if the file is available locally. This seems more intuitive to
me as expected from a unix tool-- though perhaps it should be
discussed more before adopting.

Everything seems to work fine, and i have not been able to reproduce
the get halt bug.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:50:33 +02:00
741cf7e793 sharness/t009-get: fix space/tabs
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:47:58 +02:00
f460984594 thirdparty/tar: clearer var names for recursion
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:47:07 +02:00
b858928662 unixfs/tar: cleaned up reader code
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-05 09:46:58 +02:00
6944c73312 Merge pull request #1547 from makevoid/patch-1
Update link to ipfs installation guide
2015-08-05 09:44:15 +02:00
6f943d7c81 Merge pull request #1553 from ipfs/fix-providing-speed
bitswap/provide: improved rate limiting
2015-08-05 09:36:05 +02:00
6e705e1ef0 bitswap/provide: improved rate limiting
this PR greatly speeds up providing and add.

(1) Instead of idling workers, we move to a ratelimiter-based worker.
We put this max at 512, so that means _up to_ 512 goroutines. This
is very small load on the node, as each worker is providing to the
dht, which means mostly waiting. It DOES put a large load on the DHT.
but i want to try this out for a while and see if it's a problem.
We can decide later if it is a problem for the network (nothing
stops anyone from re-compiling, but the defaults of course matter).

(2) We add a buffer size for provideKeys, which means that we block
the add process much less. this is a very cheap buffer, as it only
stores keys (it may be even cheaper with a lock + ring buffer
instead of a channel...). This makes add blazing fast-- it was being
rate limited by providing. Add should not be ratelimited by providing
(much, if any) as the user wants to just store the stuff in the local
node's repo. This buffer is initially set to 4096, which means:

  4096 * keysize (~258 bytes + go overhead) ~ 1-1.5MB

this buffer only last a few sec to mins, and is an ok thing to do
for the sake of very fast adds. (this could be a configurable
paramter, certainly for low-mem footprint use cases). At the moment
this is not much, compared to block sizes.

(3) We make the providing EventBegin() + Done(), so that we can
track how long a provide takes, and we can remove workers as they
finish in bsdash and similar tools.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-04 20:07:25 +02:00
b30d9d4db5 Merge pull request #1548 from prusnak/remove-p224
remove elliptic.P224 usage
2015-08-04 18:31:43 +02:00
d3efdcf0c3 remove elliptic.P224 usage
Fedora/RedHat distros comply with US patent law and remove this curve,
which makes it impossible to run ipfs with distro provided Golang.

License: MIT
Signed-off-by: Pavol Rusnak <stick@gk2.sk>
2015-08-03 16:41:10 +02:00
8b6ec6600e Update link to ipfs installation guide
in Readme.md

License: MIT
Signed-off-by: Francesco (makevoid) <makevoid@gmail.com>
2015-08-03 00:08:34 +01:00
ec51450d07 go-ipfs version 0.3.7 release
This patch update fixes a problem we introduced in 0.3.6 and did not
catch: the webui failed to work with out-of-the-box CORS configs.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
v0.3.7
2015-08-02 16:00:34 +02:00
4a8c938c7a release checklist
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 15:54:12 +02:00
b19dd47f14 Merge pull request #1544 from ipfs/fix/allowed-origins
fix allowed origins to make webui work again
2015-08-02 08:30:01 +02:00
3ee83a7c5e fix cors: defaults should take the port of the listener
need to do it this way to avoid VERY confusing situations where
the user would change the API port (to another port, or maybe even
to :0). this way things dont break on the user, and by default,
users only need to change the API address and things should still
"just work"

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 08:16:51 +02:00
3f1cbe2f43 corehttp: add net.Listener to ServeOption
ServeOptions take the node and muxer, they should get the listener
too as sometimes they need to operate on the listener address.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-02 08:16:51 +02:00
d50def3f5c go-ipfs version 0.3.6 (config version bump)
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
v0.3.6
2015-07-30 10:57:04 -07:00
244c957488 updated install instructions
- links to ipfs.io
- links to gobuilder
- better instructions

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-30 09:01:49 -07:00
b730f1eb6f Merge pull request #1542 from muneeb-ali/patch-1
Update README.md re $GOPATH/bin
2015-07-30 08:48:31 -07:00
a70db393c6 Update README.md 2015-07-30 10:58:47 -04:00
abae99214d go-ipfs version 0.3.6
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-30 07:58:12 -07:00
8a75c755d4 Merge pull request #1539 from ipfs/log-api-route
fix log tail command
2015-07-29 15:22:49 -07:00
90d1b8eb97 Merge pull request #1540 from ipfs/fix/read-closed-body
should fix issue where 'read on closed body' error was leaking down
2015-07-29 15:20:15 -07:00
082c147bbe should fix issue where 'read on closed body' error was leaking down
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-29 13:26:39 -07:00
b10e26a429 cancel contexts when client disconnects
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-29 11:02:10 -07:00
64960110f6 clean up unused pacakges
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-29 11:01:44 -07:00
4bbd9b2da2 fix log tail command
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-29 11:01:44 -07:00
8ed08ab0fc Merge pull request #1536 from ipfs/fix-add-w
ipfs add -w directories (and FUSE fixes)
2015-07-29 04:18:23 -07:00
5f59556ff9 add -w comprehensive tests
made many more tests for ipfs add -w

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-29 04:08:08 -07:00
431d6a5a14 added random-files tool for testing
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-29 03:18:24 -07:00
4a7c1cf802 add -w improvement: wrap multiple files in one dir
> ipfs add a b c
  added Qmbvkmk9LFsGneteXk3G7YLqtLVME566ho6ibaQZZVHaC9 a
  added QmR9pC5uCF3UExca8RSrCVL8eKv7nHMpATzbEQkAHpXmVM b
  added QmetGxZTgo8tYAKQH1KLsY13MxqeVHbxYVmvzBzJAKU6Z7 c
  added QmXg3WHLcjnz4ejeYF6FKVBkb4m1oKjQmF5fEWL9M1uQF3

  > ipfs ls QmXg3WHLcjnz4ejeYF6FKVBkb4m1oKjQmF5fEWL9M1uQF3
  Qmbvkmk9LFsGneteXk3G7YLqtLVME566ho6ibaQZZVHaC9 10 a
  QmR9pC5uCF3UExca8RSrCVL8eKv7nHMpATzbEQkAHpXmVM 10 b
  QmetGxZTgo8tYAKQH1KLsY13MxqeVHbxYVmvzBzJAKU6Z7 10 c

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-29 03:07:39 -07:00
6e6badf105 add -w: fix to work correctly with dirs.
this commit changes the behavior of ipfs add -w:

- it makes it able to work with ipfs add -r <dir>
- instead of hacking around the add, we simply just add a wrapper
  directory around the whole result of the add. this means that
  ipfs add -w calls will output _two_ lines, but this is actually
  more correct than outputting one line, as two objects were added.
  this _may_ break scripts out there which expect the output to
  look a certain way. we should consider whether the old output is
  more _useful_ (even if less in-line with the model.)

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-29 02:30:08 -07:00
578fd02ce3 fuse unmount fixes
unmounting wasn't happening, mostly because of a recent bug in
goprocess.SetTeardown. This commit bumps up some messages to
log.Warnings, as users may want to see them, and makes sure to
Unmount when a node shuts down.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-29 01:36:50 -07:00