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

9326 Commits

Author SHA1 Message Date
7e8f6c9604 Merge pull request #5164 from alfiedotwtf/master
Grammar fix
2018-06-30 00:17:23 -07:00
f5e7fe28dd mfs: remove DAGService from Root
The `Root` structure now explicitly contains a `Directory` (instead of an
`FSNode` interface), use that `Directory`'s `DAGService` instead of its own
`dserv` variable (which was used only once in `closeChild()`). The `DAGService`
in the `Root` and the `Directory` was the same (passed as an argument in the
`NewRoot` initializer function).

This leaves the `Root` structure with only a `Directory` and a `Republisher` and
allows to better rethink its role and whether if those two structures should be
grouped together (and if that group's name should be `Root`).

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-06-29 12:08:59 -03:00
ba7338543f mfs: remove unused Root variables node and Type
License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-06-29 12:06:06 -03:00
08922d239d mfs: make Root value a Directory
Make `Root` value explicitly a `Directory` structure instead of the `FSNode`
interface (which also allowed the `File` type). This helps to make the code
easier to reason about: the root of an MFS layout is always a directory, not a
(single) file.

Rename `GetValue()` to `GetDirectory()` to also make it more explicit, the
renamed function now returns a `Directory` so there is no need for type
assertions that were previously done on the `FSNode` interface to check that it
was actually a `Directory`.

`NewRoot()` now doesn't allow to create `Root` structures from DAG nodes that
contain UnixFS files.

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-06-29 11:30:53 -03:00
9fd74b3c0a Grammar fix
License: MIT
Signed-off-by: Alfie John <alfie@alfie.wtf>
2018-06-29 11:57:19 +10:00
336520d4ef Merge pull request #5167 from djdv/fix-addr
add: use file name instead of path name
2018-06-28 12:18:12 -07:00
6da92a1f0a Fix wrong added filename
License: MIT
Signed-off-by: Masahiro Saito <camelmasa@gmail.com>
2018-06-28 09:07:23 -04:00
b183da36f7 Merge pull request #5159 from ipfs/release-0.4.16-rc1
Ipfs v0.4.16-rc1
v0.4.16-rc1
2018-06-27 19:37:09 -07:00
5c0dc6a968 test dag reader context cancellation
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-27 17:51:26 -07:00
ff3efb5646 always prefetch at least 5 blocks ahead
This should reduce stuttering when streaming.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-27 17:51:08 -07:00
0344e3e602 better handle context cancellations in the PBDagReader
Good: If a previous read is canceled, we cancel the preloads that the read
triggered.
Bad: Future reads at that point will fail.

This fixes that issue.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-27 17:06:30 -07:00
12719a788f use copy instead of looping
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-27 16:52:57 -07:00
5819868184 Ipfs v0.4.16-rc1
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2018-06-27 12:34:49 -07:00
f5d810932e Merge pull request #5158 from ipfs/gx/update
gx update
2018-06-26 17:54:18 -07:00
780f110aad add test for /p2p addresses
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-26 17:11:40 -07:00
3eba14aa24 gx update
Updates:

* go-kad-dht: Query performance improvements, DHT client fixes, validates
  records on *local* put.
* go-libp2p-swarm/go-libp2p-transport: Timeout improvements.
* go-multiaddr-net: Exposes useful Conn methods (CloseWrite, CloseRead, etc.)
* go-log: fixes possible panic when enabling/disabling events.
* go-multiaddr: fixes possible panic when stringifying malformed multiaddrs,
  adds support for consuming /p2p/ multiaddrs.

fixes #5113
unblocks #4895

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-26 17:11:33 -07:00
ad83b6fa2d Merge pull request #5114 from ipfs/fix/fix-dht-tests
fixup DHT sharness tests
2018-06-26 13:43:08 -07:00
ecf7d157a6 Merge pull request #5116 from ipfs/fix/offline-routing-validate
add record validation to offline routing
2018-06-25 19:15:06 -07:00
384e2c40b2 add a failing test case for calling dht put with a bad key
see #5113

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-25 18:15:33 -07:00
6112150d04 fix dht sharness tests
We can't currently put binary values due to API limitations. This worked before
because the DHT wasn't checking values on local put.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-25 18:15:33 -07:00
352ec3561c add record validation to offline routing
fixes #5115

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-25 18:14:25 -07:00
777d306f6e Merge pull request #5144 from ipfs/fix/5143
explicitly import go-multiaddr-dns in config/bootstrap_peers
2018-06-25 17:55:53 -07:00
be20903673 Merge pull request #5137 from Mr0grog/docs/5136-resource-requirements
Add system requirements to README
2018-06-22 11:14:58 -07:00
cf2be45873 explicitly import go-multiaddr-dns in config/bootstrap_peers
We need it to parse the dnsaddr addresses. While we import it elsewhere, we
should really be importing it every where we need it so that other users can
import our packages directly.

fixes #5143

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-21 14:35:43 -07:00
3cdaea663c feat: Allow specifing how object data is encoded
Adds a --data-encoding flag to `ipfs object get` to let the user
specify base64 encoding for object data.

License: MIT
Signed-off-by: Alex Potsides <alex@achingbrain.net>
2018-06-19 16:37:45 +01:00
215443c495 Add system requirements to README, fixes #5136
License: MIT
Signed-off-by: Rob Brackett <rob@robbrackett.com>
2018-06-18 16:50:58 -07:00
2a9de81e64 Merge pull request #5071 from ipfs/feat/ci/archive-trash-dirs
ci: Archive sharness trash dirs
2018-06-18 02:06:31 +08:00
ebb040aa65 Merge pull request #5125 from ipfs/fix/5099
make republisher test robust against timing issues
2018-06-18 01:59:24 +08:00
b516aa1c31 Merge pull request #5122 from ipfs/kevina/filestore-hookup-fix
Fix how filestore is hooked up.
2018-06-18 01:56:52 +08:00
6627ef88e5 Merge pull request #5124 from ipfs/feat/extract-ipns
extract ipns record logic to go-ipns
2018-06-18 01:56:17 +08:00
dafe495376 extract ipns record logic to go-ipns
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-15 20:10:26 -07:00
a9cb26c6b8 make republisher test robust against timing issues
retry publishing with a longer EOL if the first attempt fails due to a timeout.

fixes #5099

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-15 20:07:50 -07:00
39b76d56db ci: archive sharness trash dirs
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2018-06-15 15:14:25 +02:00
a598a374e6 Fix how filestore is hooked up.
Closes #5121.

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2018-06-15 02:33:01 -04:00
d643c045d2 Merge pull request #5119 from ipfs/ci/disable-mac
disable the MacOS tests in jenkins
2018-06-15 12:59:55 +08:00
fcf74d4cb7 disable the MacOS tests in jenkins
They've never really been enabled but they:

1. Are causing the tests to fail for various reasons (e.g., out of space).
2. Take time.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-14 09:38:01 -07:00
dbaeb84499 Merge pull request #5091 from ipfs/fix/5029
reduce log level when we can't republish
2018-06-13 15:36:45 +08:00
c39067b1f1 Merge pull request #5095 from Mr0grog/docs/5049-readme-for-docs
Add README to docs folder
2018-06-13 15:36:11 +08:00
cdc349790c Merge pull request #5072 from Bren2010/review/core
Fix panic. Don't handle errors with fallthrough.
2018-06-13 15:30:58 +08:00
aedc3217b5 Merge pull request #5107 from ipfs/fix/5102
improve swarm connect/disconnect commands
2018-06-13 15:29:02 +08:00
92f3725fd7 Merge pull request #5069 from ipfs/feat/cat-iptb-logs
cat iptb logs on iptb failure (for debugging CI)
2018-06-13 15:27:12 +08:00
1f3a5fe481 Merge pull request #4991 from ipfs/feat/git-plugin-default
plugin: preload git plugin by default
2018-06-13 15:26:27 +08:00
add70f7911 Merge pull request #5108 from Mr0grog/docs/add-coreapi-overview
Add package overview comments to coreapi
2018-06-13 15:24:44 +08:00
9f9ddd561c Merge pull request #5098 from schomatis/feat/unixfs/fsnode-include-pb
unixfs: integrate `pb.Data` into `FSNode` to avoid duplicating fields
2018-06-13 15:24:24 +08:00
319f006386 Add package overview comments to coreapi
License: MIT
Signed-off-by: Rob Brackett <rob@robbrackett.com>
2018-06-12 15:56:15 -07:00
98a1c44489 test swarm connect/disconnect
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-12 14:50:33 -07:00
78f82e8e79 allow disconnecting from a peer by ID
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-12 14:50:16 -07:00
39febb1910 make ipfs swarm connect /ipfs/QmId work
fixes #5102

Also, allow specifying multiple addresses for a single peer.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-06-12 14:37:29 -07:00
934b8b0ddc unixfs: integrate pb.Data into FSNode
To avoid duplicating fields and making the code easier to follow.

Remove all of `FSNode` previous fields in favor on a single `pb.Data` structure
that is not exported. Accessor methods are added only for the necessary internal
fields. This takes up more memory, `pb.Data` is always created inside `FSNode`
and it stays there instead of just being created and destroyed during the
(un)marshal operations.

The removed fields `Data`, `blocksizes` and `Type` had a direct counterpart in
the embedded `pb.Data` structure, in contrast (only) the `subtotal` field
doesn't have one, it was used as a temporary accumulator to track the
`Filesize`, which is now being kept updated on every modification (to ensure the
entire `FSNode` is always at a valid state), so `subtotal` could just be removed
without the addition of any other field (this temporary accumulator  was
obscuring how `Filesize` was computed).

To keep `Filesize` up to date a method was added (`UpdateFilesize()`) to adjust
its value in the two places where the file size could be modified, when changing
its data (in `SetData()`, accessor method added) and when adding or removing
child nodes (in `AddBlockSize()` and `RemoveBlockSize()`).

A constructor method was added (`NewFSNode()`) to initialize the required
fields, like `Type` which is explicitly set, this deprecates the previous
methodology of just calling `new(FSNode)` and relying in the default value of
`pb.Data_DataType` (`Data_Raw`) to avoid an explicit assignment. Also,
`Filesize` is initialized to avoid being left with a `nil` value before
marshaling empty nodes, which would result in a different hash from previous
versions, to be backwards compatible. Previous versions of `GetBytes()` always
set the `Filesize` value, even though it is reflected as an `optional` field in
the `.proto` file (this may be an inaccurate field rule).

Without the duplicated fields the functions `GetBytes()` and `FSNodeFromBytes()`
are now reduced to simple `Marshal()` and `Unmarshal()` operations respectively.

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
2018-06-11 09:31:33 -03:00
c224ba1dc8 Merge pull request #5093 from ipfs/update/dist
Update dist_root
2018-06-11 12:23:52 +08:00