Commit Graph

167 Commits

Author SHA1 Message Date
Whyrusleeping
e1208b799b
Merge pull request #4649 from ipfs/feat/blockservice-events
blockservice: add BlockedFetched/Added/Removed events
2018-03-22 23:05:12 -07:00
Jakub Sztandera
f1125f0066 add hash security note
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-03-04 01:38:17 +01:00
Jakub Sztandera
bcedd38c9a //hash -> // hash
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-03-04 01:38:17 +01:00
Jakub Sztandera
578cb240d4 Move the temporary packages to thirdparty
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-03-04 01:38:17 +01:00
Jakub Sztandera
c30422d790 Enforce Cid security rules for getting and adding blocks
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2018-03-04 01:38:17 +01:00
Whyrusleeping
b9b1495a7a
Merge pull request #4709 from ipfs/feat/session-exchanges
Add exchange.SessionExchange interface for exchanges that support sessions
2018-02-15 13:58:10 -08:00
Hector Sanjuan
5df160e9e5 Add exchange.SessionExchange interface for exchanges that support sessions.
Blockservice has an explicit dependency on bitswap so it can
call NewSession. It should rely on the exchange interfaces though, not
on specific implementations.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-02-15 21:11:21 +01:00
Hector Sanjuan
758e00bc4c Extract blocks/blockstore package to go-ipfs-blockstore
This extracts the blocks/blockstore package and renames the
blocks/blockstore/util package to /blocks/blockstoreutil
(because util depends on Pin and I don't plan to extract
Pin and its depedencies).

The history of blocks/blockstore has been preserved. It has
been gx'ed and imported. Imports have been rewritten accordingly
and re-ordered.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-02-15 18:03:41 +01:00
Hector Sanjuan
54d87b4ce0 Extract: routing package to github.com/ipfs/go-ipfs-routing
This extracts the routing package to its own repository
(https://github.com/ipfs/go-ipfs-routing). History has
been preserved. The new module has been gx'ed and published.

Imports have been rewritten and re-ordered accordingly.

An internal dependency to go-ipfs/repo has been removed
by substituting it with the go-datastore.Batching interface.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-02-14 18:33:52 +01:00
Hector Sanjuan
c9080f99e8 Import re-ordering
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-02-12 22:51:42 +01:00
Hector Sanjuan
fd04905adb Extract: flags and thirdparty/delay submodules
They have been moved to their own repositories:

* github.com/ipfs/go-ipfs-delay
* github.com/ipfs/go-ipfs-flags

History has been preserved. They have been published
with gx'ed. Imports have been updated and re-ordered
accordingly.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2018-02-12 22:51:03 +01:00
Lars Gierth
038ed8f666 blockservice: add BlockedFetched/Added/Removed events
... and remove a few log lines that don't seem terribly useful.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2018-02-04 04:28:57 +01:00
Steven Allen
b2cbfd299c gx: update go-log
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-31 21:54:22 -08:00
Steven Allen
2379aa0dd1 update comment to note that we're punting on this
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-29 15:06:08 -08:00
Steven Allen
699b2c4bb8 make code-climate happier
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-25 15:43:03 -08:00
Steven Allen
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
Steven Allen
fe8846fcd7 gx: mass update
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2018-01-24 15:58:44 -08:00
Jeromy
e0e856aa93 data storage interfaces
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2018-01-21 12:00:14 -08:00
Steven Allen
dfe7ef4fcf gx: update go-multihash
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-12-14 13:09:51 -08:00
Łukasz Magiera
6401a9191e gx: Update go-datastore to 1.4.0
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-12-02 14:55:26 -08:00
Steven Allen
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
Jeromy
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
Jakub Sztandera
dd7589bdaf
bitswap: add few method comments
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-07-07 20:54:07 +02:00
Jeromy
1ffb44cd46 make NewSession in the blockservice be a function, not a method
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-05 12:31:34 -07:00
Jeromy
579fd46488 track broadcasted wantlist entries
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-05 10:51:51 -07:00
Jeromy
b1247d3323 WIP: wire sessions up through into FetchGraph
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2017-07-05 10:48:28 -07:00
Łukasz Magiera
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
Łukasz Magiera
4b8a9a3f9f Update go-datastore to 1.2.1
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
2017-07-03 20:17:03 +02:00
Steven Allen
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
Steven Allen
bccd4d4e8f blocks: move block format to it's own repo
We need to reference it from outside of this repo.

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
2017-06-29 22:12:14 +02:00
zramsay
c5df8f0796 apply the megacheck tool to improve code quality
License: MIT
Signed-off-by: Zach Ramsay <zach.ramsay@gmail.com>
2017-05-31 16:56:11 -04:00
Jeromy
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
Jakub Sztandera
6546aeade7
fix: multiple govet warnings
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2017-03-24 01:02:50 +01:00
Jeromy
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
Kevin Atkinson
d086dc63ce blockservice: avoid using unnecessary continue statement
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2017-01-11 18:24:11 -05:00
Jeromy
53d47669da bubble up go-datastore deps
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-11-28 22:29:38 -08:00
Jeromy
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
Kevin Atkinson
ffe9d7dae4 Separate out the G.C. Locking from the Blockstore interface.
Factored out of #3257 (Add support for multiple blockstores).

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-11-02 21:56:34 -04:00
Jeromy
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
Jeromy
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
Jeromy Johnson
015d476c4f Merge pull request #3297 from ipfs/feat/bitswap-cid
bitswap: protocol extension to handle cids
2016-10-12 10:13:30 -04:00
Jeromy
affb06d558 run gofmt
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
2016-10-12 07:00:38 -07:00
Jakub Sztandera
7e4b74bf5e Change the test from being Has based to Put based
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-10-11 15:08:01 -04:00
Jakub Sztandera
9854683daa test: check if NewWriteThrough is not calling Has
License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
2016-10-11 15:04:07 -04:00
Kevin Atkinson
1173c003f5 Create a "write through" BlockService.
Create a block service where all writes are guaranteed to go though
to the blockstore.

License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-10-11 14:57:02 -04:00
Kevin Atkinson
dfd5e9aa1e Make BlockService an interface.
License: MIT
Signed-off-by: Kevin Atkinson <k@kevina.org>
2016-10-11 14:50:06 -04:00
Jeromy
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
Jeromy
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
Jeromy
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
George Antoniadis
6859b8ccd8 Extract key and datastore
License: MIT
Signed-off-by: George Antoniadis <george@noodles.gr>
2016-09-09 15:52:25 +01:00