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
Brian Tiger Chow
85229be43a
style(bitswap/notifications) make it more obvious
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:21 +00:00
Jeromy
297ff3d4b2
randomize rebroadcast target
2014-12-05 20:53:21 +00:00
Jeromy
19da05701d
remove buffer timing in bitswap in favor of manual batching
2014-12-05 20:53:21 +00:00
Jeromy
e4b2ae3bb2
fix tests halting
2014-12-05 20:53:21 +00:00
Jeromy
0abc72c062
move some variables into strategy
2014-12-05 20:53:21 +00:00
Jeromy
4d1447589c
added a new test for a dhthell scenario that was failing
2014-12-05 20:53:21 +00:00
Brian Tiger Chow
9af9ee6255
misc(bitswap) renaming
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:20 +00:00
Brian Tiger Chow
f8243c36be
simplify
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:20 +00:00
Brian Tiger Chow
e5983cbe7d
some renaming
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:20 +00:00
Brian Tiger Chow
6c2a6669cb
constify to make it clear what _can_ and _can't_ change over time
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:20 +00:00
Brian Tiger Chow
3ee7ff54ba
naming
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:20 +00:00
Brian Tiger Chow
7239036e2d
clarify MessageReceived contract
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:19 +00:00
Brian Tiger Chow
5165fce9d9
use event logger here too?
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:19 +00:00
Brian Tiger Chow
5a4eed4c00
fix(log) ->f
...
@whyrusleeping
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:19 +00:00
Brian Tiger Chow
768cd3682c
fix(bitswap) consistent event names
...
@whyrusleeping @jbenet
since the logger is created with package scope, don't need to specify
the package name in event messages
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:19 +00:00
Brian Tiger Chow
ef831268e0
fix(bitswap) handle error
...
@whyrusleeping
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:19 +00:00
Brian Tiger Chow
77696a47f7
events(bitswap) try the new event logger in the bitswap GetBlock method
...
@jbenet
@whyrusleeping
Let me know if you want to direct the eventlog output to _both_ the file
and stderr. Right now it goes to file. Perhaps this is just a minor bip
in the larger discussion around log levels.
https://github.com/jbenet/go-ipfs/issues/292
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:18 +00:00
Brian Tiger Chow
cfd7d5369b
test(bitswap)
...
@whyrusleeping This appears to be a timing issue. The asynchronous
nature of the new structure provides has the bitswap waiting on the
context a bit more. This isn't a problem at all, but in this test, it
makes the functions return in an inconveniently timely manner.
TODO don't let the test depend on time.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:18 +00:00
Jeromy
5dece164cc
dont panic on empty wantlist
2014-12-05 20:53:18 +00:00
Jeromy
5be35a83f1
beginnings of a bitswap refactor
2014-12-05 20:53:18 +00:00
Juan Batiz-Benet
11508f8f19
Merge pull request #372 from chriscool/add_quiet_flag
...
Implement the -q or --quiet flag to add with minimal output
2014-12-05 15:45:49 -05:00
Juan Batiz-Benet
4795ff3418
Merge pull request #401 from zignig/namesys_fix
...
Validity time not checked properly
2014-12-05 10:39:09 -05:00
Simon Kirkby
284f4a2c47
Validity time not checked properly
...
name publishing was failing of bad format.
2014-12-04 20:39:35 +08:00
Jeromy Johnson
2ec2c85cbb
Merge pull request #396 from jbenet/idcmd-fix
...
Fix ID command lookups of unconnected nodes
2014-12-01 21:41:15 +00:00
Jeromy
b0e915be47
cleanup useless debug statement
2014-12-01 17:08:35 +00:00
Jeromy
28a32915b7
fix for #381
2014-12-01 08:34:07 +00:00
Christian Couder
aca62a420a
Add sharness test for ipfs add --quiet
...
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-11-30 14:32:08 +01:00