Commit Graph

409 Commits

Author SHA1 Message Date
Steven Allen
99309df9e1
Merge pull request #7883 from ipfs/chore/pin-ls-all-faster
Do not fetch recursive pins from pinner unnecessarily
2021-03-29 16:04:37 -07:00
gammazero
fb55f09882 Add comment about reading until channel closed 2021-03-29 15:11:38 -07:00
Hector Sanjuan
3db9551f79 Extract the namesys and the keystore submodules
Namesys is a very useful submodule. Given a ValueStore and a Datastore it can
resolve and publish /ipns/ paths.

This functionality does not need to be sequestered inside go-ipfs as it can
and should be used without IPFS, for example, for implementing lightweight
IPNS publishing services or for resolving /ipns/ paths.

"keystore" extraction was necessary, as there is a dependency to it in
namesys. Keystore is also a useful module by itself within the stack.

Fixes #6537
2021-03-12 14:09:36 -05:00
gammazero
07aa00dfa6 Do not fetch recursive pins from pinner unnecessarily
When fetching all pins, the recursive pins are fetched from the pinner two times.  The second fetch is unnecessary and copies all recursive pins into a slice again.

Additionally, the output channel is now buffered.  This allows the goroutine to exit in the case the pinner returns an error and there is no reader for the output channel.  This might be possible if a canceled context causes the caller to abandon waiting to read the output of Ls().
2021-01-27 10:17:53 -08:00
Steven Allen
7a50636f9a fix: return an error when an unknown object type is passed
fixes #7785
2020-11-30 17:59:37 -08:00
Steven Allen
5cd013ed38 update libp2p for stream closure refactor 2020-11-13 13:59:03 -08:00
Hector Sanjuan
7d95359c3e Fix #7624: Do not fetch dag nodes when checking if a pin exists 2020-08-26 09:13:15 +02:00
Petar Maymounkov
e384b5964a IPNS format keys in b36cid 2020-08-04 00:18:29 -04:00
Adin Schmahmann
19d6230cde Merge branch 'release' into master 2020-06-19 20:04:30 -04:00
Steven Allen
5f19f3bbe8 fix: cancel resolve search context
We probably don't need to do this, but it can't hurt.
2020-06-17 19:43:20 -07:00
Steven Allen
cee60700b9 fix: use bitswap sessions for ipfs refs
This isn't perfect (we only use sessions after resolving the root cid) but it's
better than what we have. The real solution is #7198 so we can use sessions
everywhere.

(cherry picked from commit 62f61c588d)
2020-06-02 17:36:30 -07:00
Steven Allen
0cdde03824
Merge pull request #7389 from ipfs/fix/refs-sessions
fix: use bitswap sessions for ipfs refs
2020-06-02 11:17:12 -07:00
Steven Allen
c58e3e4c7d fix: remove pubsub discovery hack
Pubsub handles this internally now.
2020-05-29 16:42:10 -07:00
Steven Allen
62f61c588d fix: use bitswap sessions for ipfs refs
This isn't perfect (we only use sessions after resolving the root cid) but it's
better than what we have. The real solution is #7198 so we can use sessions
everywhere.
2020-05-28 17:15:56 -07:00
Michael Muré
6388f5a1c2
pin: honor the context more accurately 2020-05-05 14:19:38 +02:00
Michael Muré
6ef190f5a6 pin: implement pin/ls with only CoreApi 2020-05-04 18:02:50 -07:00
Steven Allen
e55c688fca fix: run tests in "dht server" mode
Otherwise, we'd need to wait a delay on start for nodes to start becoming
servers.
2020-04-09 23:07:27 -07:00
Steven Allen
bb08f7fe56 assign public IP addresses for tests that need them 2020-04-09 21:41:42 -07:00
Steven Allen
b5ad3be060 feat: improve key lookup
* Support peer IDs encoded as CIDs.
* Support looking up the identity key by peer ID.
2020-03-23 15:40:48 -07:00
flowed
07cbba7c40 Fix Typos 2019-12-25 03:12:41 +00:00
Adin Schmahmann
3a0d0e817a support async datastores 2019-12-19 00:59:31 -05:00
Steven Allen
8c5c933559 chore: ignore pubsub deprecation warnings 2019-12-05 13:26:46 -05:00
Michael Muré
c3692a5913 extract the pinner to go-ipfs-pinner and dagutils into go-merkledag 2019-12-02 15:45:44 -05:00
Adin Schmahmann
0906d7f3b1 fix (pinning): pin ls traverses all indirect pins. pin ls pin type precedence change - a direct/recursive pin is now labeled as such even if also indirectly pinned. 2019-12-02 13:53:14 -05:00
Michael Muré
097b684b42
pin: add context and error return to most of the Pinner functions 2019-11-18 18:32:48 +01:00
Hucg
bc8a329a74
Update unixfs.go
use sync.Once instead
2019-11-18 17:26:14 +08:00
hucg
6a171a0b61 fix issue 6760, adding with hash-only, high CPU usage. 2019-11-15 14:58:59 +08:00
Steven Allen
ec748a7b5b
Merge pull request #6747 from ipfs/fix/only-hash-leak
fix(coreapi/add): close the fake repo used when adding with hash-only
2019-11-08 10:30:59 +00:00
hucg
6155fd17c1 fix bug 6748
ipfs add whit only hash, don't need to announce cid to other peer
2019-11-08 15:12:42 +08:00
Steven Allen
e9e32f8ac6 fix(coreapi/add): close the fake repo used when adding with hash-only
fixes #6744
2019-11-04 18:05:35 +00:00
Cole Brown
1bcf51e02d Update go-libp2p, fix tests with weak RSA keys 2019-08-23 14:26:20 -07:00
Steven Allen
2c222741d1 fix: update for merkledag API changes 2019-07-25 19:26:06 -07:00
Steven Allen
41f301a3fd fix: parallel walk in gc & pin ls 2019-07-22 16:43:58 -07:00
Steven Allen
9738d81c0c switch to new merkledag walk functions
EnumerateChildrenAsync has been renamed to WalkParallel to reflect the fact
that:

1. It visits the root.
2. It's parallel, not async.

To mirror this change, EnumerateChildren has also been renamed to Walk and now
behaves the same (except that it's not parallel).
2019-07-16 16:34:21 -07:00
Łukasz Magiera
3f7927f1d8 Update imports to go-filestore 2019-07-15 15:52:34 +02:00
Michael Avila
10de165644
Change to construct provider from go-ipfs-provider 2019-07-03 14:22:55 -07:00
Dirk McCormick
4ead108a80 fix: ensure pin rm takes a lock 2019-06-12 14:59:06 -04:00
Dirk McCormick
bc02a61e7c fix: flush pin on block put 2019-06-12 10:31:39 -04:00
Steven Allen
5d468e23ea chore: deprecate go-ipfs-addr 2019-05-31 23:46:11 -07:00
Raúl Kripalani
e8c2852179 migrate to go-libp2p-core.
closes #6391

License: MIT
Signed-off-by: Raúl Kripalani <raul@protocol.ai>
2019-05-31 23:23:52 -07:00
Michael Avila
6d6ce8fba7
Introduce first strategic provider: do nothing
License: MIT
Signed-off-by: Michael Avila <davidmichaelavila@gmail.com>
2019-05-29 16:20:31 -07:00
Steven Allen
942760b4b7
Merge pull request #6330 from ipfs/fix/obj-put-empty
object put: Allow empty objects
2019-05-14 16:08:18 -07:00
Steven Allen
d005ec42b1 object put: detect unexpected fields
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-05-14 23:37:52 +02:00
Łukasz Magiera
74c4735b66 object put: allow empty objects
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-05-14 18:26:47 +02:00
Steven Allen
5f64b270f8 cmdkit -> cmds
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-05-10 23:00:20 -07:00
Steven Allen
f8c8f383db test(coreapi): use a thread-safe datastore everywhere
fixes https://github.com/libp2p/go-libp2p-kad-dht/issues/321

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2019-05-01 13:54:41 -07:00
Łukasz Magiera
e4cf66008f Move option parsing to BuildCfg; fix imports
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-04-17 16:56:27 -07:00
Łukasz Magiera
7046626ecc Move pathresolve
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-04-17 16:56:27 -07:00
Łukasz Magiera
d35dac70f0 Cleanup core package
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-04-17 16:56:27 -07:00
Łukasz Magiera
a54b64bede coreiface: updates for path name refactor
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2019-04-17 12:03:37 -07:00