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

153 Commits

Author SHA1 Message Date
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
171952b795 remove gogo-protobuf from godeps, use gx vendored
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
0e8a6700f9 correct go-log dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:10 -08:00
0e312f5caf initial vendoring of libp2p outside of the repo with gx
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:06 -08:00
4d5af93f43 vendor in new go-datastore
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
8fa53f81e6 slight cleanup
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
1efbc79223 use mfs for adds
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
rht
743f3edcbb strings.Split -> path.SplitList
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2016-01-12 08:22:55 -08:00
5e99be9899 comment multiple dagstore error checking
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
efac042e82 rework editor creation and finalization
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
d8ee7dffc3 improves memory usage of add
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
b12ee40aba implement mark and sweep GC
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

dont GC blocks used by pinner

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

comment GC algo

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

add lock to blockstore to prevent GC from eating wanted blocks

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

improve FetchGraph

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

separate interfaces for blockstore and GCBlockstore

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

reintroduce indirect pinning, add enumerateChildren dag method

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
27f34b4311 renamed {R,}Lock -> {Pin,GC}Lock
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2016-01-12 08:21:13 -08:00
dc3b9ed140 address concerns from PR
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
b9e5cfaa15 merkledag FetchGraph and EnumerateChildren
This commit improves (fixes) the FetchGraph call for recursively
fetching every descendant node of a given merkledag node. This operation
should be the simplest way of ensuring that you have replicated a dag
locally.

This commit also implements a method in the merkledag package called
EnumerateChildren, this method is used to get a set of the keys of every
descendant node of the given node. All keys found are noted in the
passed in KeySet, which may in the future be implemented on disk to
avoid excessive memory consumption.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
c9ce2e724a Simplify Pinner interface by folding ManualPinner into Pinner
Pinner had method GetManual that returned a ManualPinner, so every
Pinner had to implement ManualPinner anyway.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
f41801cbf4 merkledag/merkledag_test: fix t.Fatal in a goroutine
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-12-14 22:31:49 +01:00
94bdce63a7 vendor logging lib update
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-05 15:57:21 -08:00
0d35cc9aea set data and links nil if not present
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-11-02 23:38:36 -08:00
c023d187b5 update code to use new logging changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-10-27 11:04:56 -07:00
8f0623255d replace imports with absolute path instead of using symlink
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-10-03 14:30:50 -07:00
e5a2896c0e extract logging
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-14 17:35:50 -07:00
b3aee2872f move mem-dag construction to its own function, and actually call WriteOutputTo
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-05 04:56:55 +02:00
30d10ce4f4 add-only-hash no longer stores entirety of everything in memory
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-05 04:56:55 +02:00
b52210766f an attempt at making the editor more efficient
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-05 04:56:55 +02:00
rht
de5c0ceff0 Localize the scope of context.WithCancel for every DAG.Get
Instead put it inside of DAG.Get.
The fix is applied only in the case when the context.WithCancel
before a DAG.Get is also used later on in the scope.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 22:38:04 +07:00
rht
30e03b2da6 Replace context.TODO in test files with context.Background
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:55:45 +07:00
rht
d32177cda0 Make sure ctx in commands are derived from req.Context
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
941e0769ed fix master: make vendor
blame: @whyrusleeping on ed4274c9b75b513672fa674884a5df2cdb45276c

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-08-20 18:15:59 +02:00
d07bf89988 Merge pull request #1563 from ipfs/dag-diff
implement a basic DAG diffing algorithm
2015-08-17 04:50:32 +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
ed4274c9b7 implement a basic DAG diffing algorithm
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-10 17:47:08 -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
aa7d946716 a little more test coverage on merkledag
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 21:42:28 -07:00
b32d0ef153 implement 'editor' abstraction
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 15:00:07 -07:00
7c510662ae break merkledag utils into its own package
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-28 15:00:07 -07:00
1c74bc57d7 include hash of resolved object in object stat output
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-21 10:49:45 -07:00
83311212ea Merge pull request #1463 from ipfs/exposepb
expose internal/pb packages.
2015-07-10 11:49:08 -07:00
6e9c72ab37 expose internal/pb packages.
we shouldn't use internal packages.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-10 11:08:49 -07:00
137c0ac4ac use batching transaction interface from datastore
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-09 16:37:30 -07:00
c2b7456b49 fix up some dependencies to avoid circular record deps 2015-06-03 14:27:31 -07:00
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
5d43ebb916 Merge pull request #1274 from ipfs/refactor/importer
change pinning to happen in a callback
2015-05-29 17:06:11 -07:00
dd928a2b1d change pinning to happen in a callback 2015-05-28 08:52:20 -07:00
rht
3547f7ae33 Replace 'var * bytes.Buffer' with '\1 := new(bytes.Buffer)' 2015-05-26 23:18:04 +07:00
rht
ac7edddb94 Run 'gofmt -s -w' on these files 2015-05-19 06:11:15 +07:00
5fff7742f3 godeps: move (go)goprotobuf to github location 2015-04-28 13:42:22 +02:00
0a6b880bee fix for #1008 and other pinning fixes
This commit adds a new set of sharness tests for pinning, and addresses
bugs that were pointed out by said tests.

test/sharness: added more pinning tests

Pinning is currently broken. See issue #1051. This commit introduces
a few more pinning tests. These are by no means exhaustive, but
definitely surface the present problems going on. I believe these
tests are correct, but not sure. Pushing them as failing so that
pinning is fixed in this PR.

make pinning and merkledag.Get take contexts

improve 'add' commands usage of pinning

FIXUP: fix 'pin lists look good'

ipfs-pin-stat simple script to help check pinning

This is a simple shell script to help check pinning.

We ought to strive towards making adding commands this easy.
The http api is great and powerful, but our setup right now
gets in the way. Perhaps we can clean up that area.

updated t0081-repo-pinning

- fixed a couple bugs with the tests
- made it a bit clearer (still a lot going on)
- the remaining tests are correct and highlight a problem with
  pinning. Namely, that recursive pinning is buggy. At least:
  towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
  be pinned indirectly, but they're not. And thus get gc-ed out.
  There may be other problems too.

cc @whyrusleeping

fix grep params for context deadline check

fix bugs in pin and pin tests

check for block local before checking recursive pin
2015-04-19 23:40:25 -07:00
20383472c7 Add additional link manipulation functions
// AddRawLink adds a link to this node
AddRawLink(name string, lnk *Link) error

// Return a copy of the link with given name
GetNodeLink(name string) (*Link, error)
2015-04-15 17:22:52 +02:00
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