1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 01:52:26 +08:00

5300 Commits

Author SHA1 Message Date
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
da0d48e6c5 Add locking interface to blockstore
The addition of a locking interface to the blockstore allows us to
perform atomic operations on the underlying datastore without having to
worry about different operations happening in the background, such as
garbage collection.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
de50b21562 using multistream muxer
* ID service stream
* make the relay service use msmux
* fix nc tests

Note from jbenet: Maybe we should remove the old protocol/muxer
and see what breaks. It shouldn't be used by anything now.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2016-01-12 08:21:13 -08:00
4f34e0ec13 buffer msgio
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
c48f456bdf remove msgio double wrap
There was doublewrapping with an unneeded msgio. given that we
use a stream muxer now, msgio is only needed by secureConn -- to
signal the boundaries of an encrypted / mac-ed ciphertext.

Side note: i think including the varint length in the clear is
actually a bad idea that can be exploited by an attacker. it should
be encrypted, too. (TODO)

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
aafebc58af dagmodifier test: Add TODO note about how bad luck can cause test failure
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
b24de97b04 dagmodifier: Don't lose pin if old and new key happen to be equal
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
7a66a7dc9f pin: Do not accidentally delete indirect pins on Flush
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
896601f6cb bump fsrepo version to 3
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
72753e5460 pin: Future-proof against refcount marshaled size changes
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
e5b8ee4819 pin: Rewrite to store pins in IPFS objects
WARNING: No migration performed! That needs to come in a separate
commit, perhaps amended into this one.

This is the minimal rewrite, only changing the storage from
JSON(+extra keys) in Datastore to IPFS objects. All of the pinning
state is still loaded in memory, and written from scratch on Flush. To
do more would require API changes, e.g. adding error returns.

Set/Multiset is not cleanly separated into a library, yet, as it's API
is expected to change radically.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
531f0579a4 sharness: Don't assume we know all things that can create garbage
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>

sharness: Don't assume we know all things that can create garbage

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:21:13 -08:00
fb589a81e9 Typo
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
96e45c7457 Use uint64 for indirect pin refcounts
Platform-dependent behavior is not nice, and negative refcounts are
not very useful.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
fecfb76cdf pin: Remove double bookkeeping of refcount keys
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
d6a61529ca pin: Remove dead code
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -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
c4d2988c11 blocks/set: Remove now-unused NewDBWrapperSet
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
6c0e42b87d pin: Remove code shadowing pins as datastore keys
These secondary copies were never actually queried, and didn't contain
the indirect refcounts so they couldn't become the authoritative
source anyway as is. New goal is to move pinning into IPFS objects.

A migration will be needed to remove the old data from the datastore.
This can happen at any time after this commit.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
d586a3a05a pin: unexport NewIndirectPin, it's not useful and not used elsewhere
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
5b96d4d6b8 sharness: fusermount -u is the documented way to unmount FUSE on Linux
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
a3de9bf3a0 sharness: Use sed in a cross-platform safe way
OS X sed is documented as "-i SUFFIX", GNU sed as "-iSUFFIX". The one
consistent case seems to be "-iSUFFIX", where suffix cannot empty (or
OS X will parse the next argument as the suffix).

This used to leave around files named `refsout=` on Linux, and was
just confusing.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
c0ec377269 pin: Guard against callers causing refcount underflow
This used to lead to large refcount numbers, causing Flush to create a
lot of IPFS objects, and merkledag to consume tens of gigabytes of
RAM.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:17:17 -08:00
694abdeea3 update version
License: MIT
Signed-off-by: David Dias <daviddias.p@gmail.com>
2016-01-12 08:17:17 -08:00
7070b4d878 Merge pull request #2188 from Dignifiedquire/feat/webui-update
feat: Update to the latest version of the webui
v0.3.11
2016-01-12 17:10:24 +01:00
ab61ef2024 feat: Update to the latest version of the webui
License: MIT
Signed-off-by: Friedel Ziegelmayer <dignfiedquire@gmail.com>
2016-01-12 16:41:58 +01:00
b7d35e3af5 IPFS Versions 0.3.11 release
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 06:35:24 -08:00
dc4f5afaac Merge pull request #2064 from ipfs/ipfs-volume
Docker image volume fix and Sharness tests
2016-01-10 20:55:12 +01:00
3916e73eca force use of ipv4 in test
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-10 11:40:22 -08:00
1fbbd1de15 Add and use a DOCKER prereq
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-10 20:19:23 +01:00
d356ed0d53 sharness: add t0300-docker-image.sh
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-10 20:19:23 +01:00
29ec4c06e4 test/ipfs-test-lib: add docker support
We have to do something special for CircleCI in docker_exec()
because "docker exec" doesn't work on CircleCi:

https://circleci.com/docs/docker#docker-exec

We indeed get "Unsupported: Exec is not supported by the lxc
driver" with CircleCi, when using "docker exec".

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-10 20:19:23 +01:00
1c403c0380 CircleCI: add docker service
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-10 20:19:23 +01:00
06a5135e5e Travis-CI: add docker service
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2016-01-10 20:19:23 +01:00
a226704b2d change Dockerfile order to create VOLUME under user ipfs
License: MIT
Signed-off-by: Christian Kniep <christian@qnib.org>
2016-01-10 20:19:23 +01:00
453d30ae9b Merge pull request #2159 from ipfs/feature/shutdown
Added a shutdown note to daemon description
2016-01-10 20:11:32 +01:00
ae01a23181 Merge pull request #2157 from ipfs/feature/object-data-quotes
Added quotes around command in long desc
2016-01-10 20:10:56 +01:00
c414029063 Merge pull request #2176 from yuvallanger/fix-typo
Fix typo.
2016-01-08 11:40:18 +01:00
7fb8fecea0 Fix typo.
License: MIT
Signed-off-by: Yuval Langer <yuval.langer@gmail.com>
2016-01-08 07:57:52 +02:00
dec4a72da1 Added a shutdown note to daemon dsec
Cf https://github.com/ipfs/support/issues/5

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-01-07 13:12:54 -05:00
4a5ad2e26a Merge pull request #2163 from ReadmeCritic/master
Update README URLs based on HTTP redirects
2016-01-05 19:27:57 +01:00
3f7d11f598 Merge pull request #2116 from Kubuxu/fix/#2059
namesys: Make paths with multiple segemnts work. Fixes #2059
2016-01-05 18:55:09 +01:00
bcfb3d7224 Included more namesys tests.
Fixed some issues with trailing slashes.

License: MIT
Signed-off-by: Jakub (Kubuxu) Sztandera <kubuxu@gmail.com>
2016-01-05 18:13:43 +01:00
8457e08e68 Update README URLs based on HTTP redirects
License: MIT 
Signed-off-by: d. khamsing <dkhamsing8@gmail.com>
2016-01-05 09:06:51 -08:00
85774b89d3 namesys: Make paths with multiple segemnts work. Fixes #2059
Also fixes non-recursive resolve erring instead showing one step.

 The patch of core/commands/resolve.go could be done better but I don't
 know how to get access to ErrResolveRecursion.

 It allows for dnslinks into sub-segments. So for example hosting
 multiple blogs
 on just domains from one pubkey.

 Fixes #2059

 Add tests and fix case when dnslinks references dnslink

License: MIT
Signed-off-by: Jakub (Kubuxu) Sztandera <kubuxu@gmail.com>
2016-01-05 13:46:33 +01:00
fd69205eac Added quotes around command in long desc
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
2016-01-04 16:13:06 -05:00
4ba3a754ae Merge pull request #2147 from ipfs/reenable-ipns-test
reenable ipns sharness test now that iptb is fixed
v0.3.11-rc1
2016-01-02 12:39:33 +01:00
742663919c Merge pull request #2144 from ipfs/fix/quick-start
fix typos in quick start doc
2016-01-02 04:53:24 +01:00
ba33de36e3 reenable ipns sharness test now that iptb is fixed
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-01 19:38:18 -08:00
543f527bca fix typos in quick start doc
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-01 18:15:29 -08:00