1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-15 07:58:15 +08:00

81 Commits

Author SHA1 Message Date
076fd91e5f Merge pull request #4835 from ipfs/fix/typos
misc: Fix a few typos
2018-04-20 23:35:58 +09:00
b290286dd7 misc: Fix a few typos
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-03-30 09:47:22 +02:00
2ee5cfb90f fix error style
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-03-30 09:43:27 +02:00
93d1a695d4 Feat: Separate "path" from "path/resolver"
Currently the "path" module does two very different things:

* Defines how ipfs paths look like and provides tools to parse/split etc.
* Provides a resolver to resolve paths.

This moves the resolver stuff to `path/resolver` and leaves the
path utilities in `path`.

The result is that now the IPFS `path` package just defines what a path
looks like and becomes a module that can be exported/re-used without problems.
Currently there are circular dependency cycles (resolve_test -> merkledag/utils,
merkledag->path), which the prevent the export of merkledag itself.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-02-16 00:20:30 +01:00
04e43b855b make repo gc call CollectGarbage on datastore
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-02-04 01:16:06 +01:00
b2cbfd299c gx: update go-log
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-31 21:54:22 -08:00
d154b4a990 merkledag: switch to new dag interface
Also:

* Update the blockstore/blockservice methods to match.
* Construct a new temporary offline dag instead of having a
  GetOfflineLinkService method.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-25 15:13:19 -08:00
fe8846fcd7 gx: mass update
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-24 15:58:44 -08:00
dfe7ef4fcf gx: update go-multihash
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-14 13:09:51 -08:00
9a335cee13 fewer allocations on unpin
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-03 19:05:05 -08:00
498ee0dc0b resolve and pin in one step
instead of resolving all the pins first and then pinning, pin after resolving
each pin.

This:

1. Avoids storing all the nodes in memory.
2. Avoids not showing pin progress.

fixes #4122

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-03 19:03:04 -08:00
8e780d2304 don't create a new context per pin
This came from an old commit that used a TODO context. Now that we have a real
context, use that.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-03 19:02:08 -08:00
37f6a1bb86 "repo stat": Make special value to represent NoLimit a constant.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-09-18 19:26:16 -04:00
f156f63eed "repo stat": Don't crash when Datastore.StorageMax is not defined
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-09-18 15:44:07 -04:00
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
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
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
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
e2cd36e88f pinning + pathresolver: fix pinning/unpinning of sharded directories
* Change ResolveToCid to take a Resolver and a NameSystem instead of an ipfs
  Node.
* Make the pin/unpin methods use a Unixfs path resolver.

Closes: #3974

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-06-12 18:12:29 -07:00
0f46a34f59 Add MaxStorage field to output of "repo stat".
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-05-10 23:41:35 -04:00
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
d39d9ed60b gc: address CR comments
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-03-20 14:46:02 -04:00
f338520aa8 gc: add option to stream errors
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-03-06 14:26:14 -05:00
401d156596 gc: refactor: CollectResult
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-03-06 14:26:14 -05:00
96f8c17b0f gc: return Result instead of two channels
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-03-06 14:26:14 -05:00
d7fa05a707 gc: join multiple errors with "; " instead of a newline
otherwise the daemon will only display the first error

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-03-06 14:26:09 -05:00
f1938f3cbd gc: output all errors to a channel
Errors from ColoredSet are now reported as encountered and errors
encountered when deleting blocks are no longer ignored.

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>

gc: report errors from ColoredSet as encountered

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-03-06 14:26:09 -05:00
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
2836c64642 gc: remove unneccessary full repo scan
GetStorageUsage() is super expensive as it involves a full repo scan,
and it's already bad enough that we have do it once.

The call that's being removed here is purely for cosmetical purposes:
printing the number of bytes freed by the GC run. Let's drop it.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-12-13 14:50:01 +01:00
a6ae8e72bf gc: remove wonky timeout
This timeout was:
- unneccessary
- based on a metric that doesn't make sense

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-12-13 14:50:01 +01:00
53d47669da bubble up go-datastore deps
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-28 22:29:38 -08:00
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
67c2a4ec14 make path resolver no longer require whole node for construction
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-25 15:04:44 -07:00
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
48f7e14277 extract node interface
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-14 07:53:48 -07:00
01aee44679 merkledag: change 'Node' to be an interface
Also change existing 'Node' type to 'ProtoNode' and use that most
everywhere for now. As we move forward with the integration we will try
and use the Node interface in more places that we're currently using
ProtoNode.

License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-12 08:16:03 -07:00
015d476c4f Merge pull request #3297 from ipfs/feat/bitswap-cid
bitswap: protocol extension to handle cids
2016-10-12 10:13:30 -04:00
affb06d558 run gofmt
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-12 07:00:38 -07:00
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
282bdc4816 cid: integrate cid into bitswap and blockstores
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-08 12:14:58 -07:00
721df367a2 Don't use a separate LinkService for DAGService.GetLinks()
Instead make LinkService a part of DAGService.  The LinkService is now
simply an interface that DAGService implements.  Also provide a
GetOfflineLinkService() method that the GC uses to get an offline
instance.

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-10-06 11:52:39 -04:00
3899194cb0 Add DAGService.GetLinks() method and use it in the GC and elsewhere.
This method will use the (also new) LinkService if it is available to
retrieving just the links for a MerkleDAG without necessary having to
retrieve the underlying block.

For now the main benefit is that the pinner will not break when a block
becomes invalid due to a change in the backing file.  This is possible
because the metadata for a block (that includes the Links) is stored
separately and thus always available even if the backing file changes.

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-10-06 11:38:41 -04:00
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
6859b8ccd8 Extract key and datastore
License: MIT
Signed-off-by: George Antoniadis <george@noodles.gr>
2016-09-09 15:52:25 +01:00
c8fe495934 integrate CIDv0
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-09-07 13:32:32 -07:00
05b197df2d update deps for libp2p 3.4.0
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-08-25 19:02:55 -07:00
a3bd3bc364 Automatically download and run migrations if needed
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-07-19 06:50:00 -07:00
ce8c8a7a71 Update go-log in whole dependency tree (#2898)
* Update golog in go-ipfs

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-secio for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-crypto for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p-peer for go-log

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Import peersore, it wasn't imported

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update peerstore

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update peer

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update secio

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>

* Update go-libp2p

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-24 09:38:07 -07:00
714f2debea Add Files API root as best-effort pin.
Closes #2697.  Closes #2698.

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-06-20 17:09:56 -04:00
eaccd07505 Update go-log
https://github.com/ipfs/go-log/pull/3

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-06-09 23:37:09 +02:00