Brian Tiger Chow
e27de2bfa2
fix(blockservice) respect context in GetBlocks
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
Brian Tiger Chow
bef75d5061
fix(bitswap/testutils) vendor
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
Brian Tiger Chow
fb5779661b
fix(bs/notifications) use SubOnceEach to provide uniqueness guarantee
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
vendor forked pubsub to get SubOnceEach
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
Brian Tiger Chow
19de3041fb
fix(bitswap) build-breaking compilation errors
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
Brian Tiger Chow
aac3c6abbd
fix(blockservice) test
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
Jeromy
07bb901ed5
add a test to blockservice to demonstate GetBlocks failure.
2014-12-05 20:53:29 +00:00
Jeromy
6d217b5311
ensure sending of wantlist to friendly peers
2014-12-05 20:53:29 +00:00
Brian Tiger Chow
9bf1ba6ab5
fix(bs/notifications) prevent duplicates
...
@whyrusleeping now notifications _guarantees_ there won't be any
duplicates
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:29 +00:00
Brian Tiger Chow
20382340f5
test(bs/n) check for duplicates received
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:29 +00:00
Brian Tiger Chow
e393edcc28
Revert "hotfix(dep) duplicates TEMP DONT MERGE TO MASTER"
...
This reverts commit 49004e9743 .
2014-12-05 20:53:29 +00:00
Brian Tiger Chow
044db5bee8
hotfix(dep) duplicates TEMP DONT MERGE TO MASTER
...
before merging, fork and send a PR to tuxy
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:29 +00:00
Brian Tiger Chow
e4c9731643
chore(util) remove forward
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:28 +00:00
Brian Tiger Chow
6a5bc4b879
fix(bs/n) remove unnecessary variable
...
to remove ambiguity
(before it was possible to loop over either topics or keys
by only keeping keys, there's no confusing about what to use for the
loop range
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:28 +00:00
Brian Tiger Chow
134929ac64
misc(bs/n) rm dead code
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:28 +00:00
Brian Tiger Chow
b3d3b1dd30
refactor(bitswap) forwardN no longer needed
...
@whyrusleeping
now, the pubsub channel closes after sending N blocks. we got this
functionality for free from the fix. So, the forwardN wrap is no longer
required! woohoo
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:28 +00:00
Brian Tiger Chow
a5fccaccee
tests(bitswap/notifications) test niladic
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:28 +00:00
Brian Tiger Chow
03324f7765
fix(bitswap/notifications) subscribe to many
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:28 +00:00
Brian Tiger Chow
1fb80330da
docs(bitswap/notifications)
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:27 +00:00
Jeromy
50b00eb90f
use @maybebtc's ForwardBlocks function
2014-12-05 20:53:27 +00:00
Brian Tiger Chow
d5e7fd6707
test(notifications)
...
we expect this to fail. will be fixed in upcoming commit
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:27 +00:00
Jeromy
9120d107c3
a little more correctness on the new bitswap impl
2014-12-05 20:53:27 +00:00
Brian Tiger Chow
a932bfdfab
doc
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:27 +00:00
Brian Tiger Chow
fc820a8110
tests(forward)
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:27 +00:00
Brian Tiger Chow
be2678522e
fix(dep)
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:26 +00:00
Brian Tiger Chow
438ffa1dd7
feat(util) ForwardNBlocks
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:26 +00:00
Jeromy
ed4509923c
tracking down a bug dhthell found, added asserts and better logging.
2014-12-05 20:53:26 +00:00
Jeromy
15d4f82945
some cleanup, and fix minor bug in dagreader from previous commit
2014-12-05 20:53:26 +00:00
Jeromy
d53deebada
wire GetBlocks into blockservice
2014-12-05 20:53:26 +00:00
Brian Tiger Chow
ab201c15bb
test(bitswap) Close (but skip for now)
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:25 +00:00
Brian Tiger Chow
59a32b1d0f
refactor(bitswap) group the deferreds
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:25 +00:00
Jeromy
0ce6071fea
revamp BatchFetch a bit
2014-12-05 20:53:25 +00:00
Brian Tiger Chow
c7c085970e
fix(exchange) allow exchange to be closed
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:25 +00:00
Brian Tiger Chow
4ef780a9c9
fix(bitswap) signal termination to async'ly spawned workers
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:25 +00:00
Brian Tiger Chow
5bd3b178b6
style(bitswap) name -> loop
...
eh?
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:24 +00:00
Brian Tiger Chow
f6cb4ab9a2
feat(bitswap) loop over all provided keys
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:24 +00:00
Brian Tiger Chow
ecf62dbf3a
feat(bitswap) find providers for all keys on wantlist
...
@jbenet @whyrusleeping
this addresses a failure case where
1) bitswap wants blocks A and B
2) partner 1 has A and partner 2 has B
3) We choose a key at random, drawing A.
4) Then, we request A, neglecting to find a provider for B.
Sending the full wantlist is meant to be used as a helpful additional
piece of data, but...
unless our hunch is support by statistical inference at runtime,
it's not safe to assume that a peer will have blocks for related keys.
Routing must be the source of truth.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:24 +00:00
Brian Tiger Chow
7c2053c3c8
fix(bitswap/loop) add to wantlist just once
...
oops
set Add is idempotent but it's a waste of resources
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:24 +00:00
Brian Tiger Chow
d0304def6b
refactor(blockstore, blockservice) use Blockstore and offline.Exchange
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:24 +00:00
Brian Tiger Chow
04a8a6133c
rename exchange
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:24 +00:00
Brian Tiger Chow
eb0bde052e
rename
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:23 +00:00
Brian Tiger Chow
918c8e274e
refactor(blockstore) mv under blocks/
...
@jbenet @whyrusleeping
the pyramids were built one brick at a time
addresses: https://github.com/jbenet/go-ipfs/issues/370
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:23 +00:00
Jeromy
b1b42a5609
change BatchFetch to return indices
2014-12-05 20:53:23 +00:00
Jeromy
99ae432021
start working getBlocks up the call chain
2014-12-05 20:53:23 +00:00
Brian Tiger Chow
5babfb975d
tests(bitswap) share code between the two large tests
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:23 +00:00
Brian Tiger Chow
a5754a5ff4
fix(bitswap) stop the ticker when the run loop exits
...
@whyrusleeping
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:23 +00:00
Brian Tiger Chow
11f2856d31
feat(bitswap) implement GetBlocks
...
@whyrusleeping @jbenet
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:22 +00:00
Brian Tiger Chow
b13a5a940b
refactor(bitswap) move wantlist to loop receive
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:22 +00:00
Brian Tiger Chow
cc92ec3d9c
fix(merkledag) missing arg
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:22 +00:00
Brian Tiger Chow
81a3ba0677
tests(bitswap) share constructor between tests
...
@whyrusleeping i hope this makes it a bit easier to work with tests
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:22 +00:00
Brian Tiger Chow
8f8230823f
feat(bitswap/notifications) Subscribe to multiple keys
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:22 +00:00