Commit Graph

366 Commits

Author SHA1 Message Date
Jeromy
34961a5aef toprovide -> toProvide 2015-03-05 16:37:40 -08:00
Jeromy
bfee4894b4 simplify provideCollector 2015-03-05 16:27:47 -08:00
Jeromy
8937f5fbda implement a worker to consolidate HasBlock provide calls into one to alieviate memory pressure 2015-03-05 15:18:57 -08:00
Juan Batiz-Benet
9d167cd5e8 testfix: dont break 8k goroutine limit under race 2015-03-04 07:34:04 -08:00
Henry
d743801638 godep: changed back to inflect upstream 2015-03-01 13:22:27 +01:00
Henry
6cc6a80039 godeps: maybebtc renamed is account 2015-02-27 14:40:45 +01:00
Jeromy
3c8a391fe4 dont put wantlist getter in exchange interface 2015-02-27 00:12:21 -08:00
Jeromy
98a183d53e fix output formatting on stat 2015-02-27 00:12:21 -08:00
Jeromy
b514478f32 rename wantlist to bitswap, add stat command 2015-02-27 00:12:21 -08:00
Jeromy
559a241566 implement a simple wantlist command to allow the user to view their wantlist 2015-02-27 00:12:21 -08:00
Jeromy
8256b18058 make sure not to orphan any extra goroutines 2015-02-26 23:22:12 -08:00
Jeromy
9c66f65410 make wantlist updates to connected peers happen async, dramatically improves performance between connected nodes 2015-02-26 23:22:12 -08:00
Henry
92d08db7a5 rewrote import paths of go.net/context to use golang.org/x/context
- updated go-ctxgroup and goprocess
ctxgroup: AddChildGroup was changed to AddChild. Used in two files:
- p2p/net/mock/mock_net.go
- routing/dht/dht.go

- updated context from hg repo to git
prev. commit in hg was ad01a6fcc8a19d3a4478c836895ffe883bd2ceab. (context: make parentCancelCtx iterative)
represents commit 84f8955a887232b6308d79c68b8db44f64df455c in git repo

- updated context to master (b6fdb7d8a4ccefede406f8fe0f017fb58265054c)

Aaron Jacobs (2):
net/context: Don't accept a context in the DoSomethingSlow example.
context: Be clear that users must cancel the result of WithCancel.

Andrew Gerrand (1):
go.net: use golang.org/x/... import paths

Bryan C. Mills (1):
net/context: Don't leak goroutines in Done example.

Damien Neil (1):
context: fix removal of cancelled timer contexts from parent

David Symonds (2):
context: Fix WithValue example code.
net: add import comments.

Sameer Ajmani (1):
context: fix TestAllocs to account for ints in interfaces
2015-02-25 11:58:19 +01:00
Jeromy
5924f4a3db rename for clarity 2015-02-19 20:07:02 -08:00
Jeromy
d7eb57f48f add worker to bitswap for reproviding new blocks 2015-02-19 20:07:02 -08:00
Jeromy
d8f9f52498 add a test to make sure duplicate subscriptions to the same block dont have weird side effects 2015-02-19 20:07:02 -08:00
Jeromy
a29c0fc751 move blocking calls out of single threaded loops, cancel contexts ASAP 2015-02-19 06:04:39 +00:00
Brian Tiger Chow
0db1a94862 misc: suppress logs to Debug (from Info) 2015-02-14 14:13:53 -08:00
Jeromy
de057f60dd fix a panic caused by context cancelling closing a promise channel 2015-02-12 23:47:11 +00:00
Jeromy
140c70d772 document some packages 2015-02-10 22:59:10 +00:00
Juan Batiz-Benet
58f39687cf logs: removed all log.Errors unhelpful to users
Let's save log.Error for things the user can take action on.
Moved all our diagnostics to log.Debug. We can ideally reduce them
even further.
2015-02-03 01:06:07 -08:00
Juan Batiz-Benet
e908effb4b AddrManager: use addr manager with smarter TTLs
This addr manager should seriously help with the addrsplosion
problem.
2015-02-02 21:04:14 -08:00
Brian Tiger Chow
195c2f3e28 log(bitswap) add message when message received 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
800a3eb940 refactor(bitswap) move workers to bottom of file 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
d9a8cfbd72 feat(bitswap) add deliverBlocks Event 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
4ae02bc022 fix(bitswap) rename PeerToQuery to send wantlist
log(bitswap) remove ambiguous event
2015-02-01 22:08:49 -08:00
Brian Tiger Chow
a1fc5f9cf7 log(bitswap/message) make bsmsg loggable 2015-02-01 22:08:49 -08:00
Brian Tiger Chow
d78b76ddb4 log(bitswap) add bitswap loggable 2015-02-01 22:08:49 -08:00
Juan Batiz-Benet
29178e3c49 fix(bitswap/network/ipfs) ignore self as provider 2015-02-01 22:08:48 -08:00
Brian Tiger Chow
c114b04ae1 feat(bitswap): synchronous close 2015-02-01 21:54:19 -08:00
Juan Batiz-Benet
98f2b0779f p2p/net: notify on listens
Network now signals when it successfully listens on some address
or when an address shuts down. This will be used to establish and
close nat port mappings. It could also be used to notify peers
of address changes.
2015-01-30 20:37:52 -08:00
Brian Tiger Chow
0ec0a6ab87 fix inflection 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
6c2d799cb9 periodically print the number of keys in the wantlist (if any) 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
49f2684c53 expose O(1) len 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
351631a580 pass as param 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
7e90fa95c9 log(bitswap): clean up 2015-01-30 06:57:41 -08:00
Juan Batiz-Benet
feb6d34134 bitswap/net: race fix in peers iteration 2015-01-29 01:16:45 -08:00
Juan Batiz-Benet
64191c1b31 bitswap: removed dubious error check test. 2015-01-29 01:10:01 -08:00
Juan Batiz-Benet
958cc61647 epictest: added test for bitswap wo routing 2015-01-28 23:55:30 -08:00
Brian Tiger Chow
afd3333cab optimization(bitswap) return connected peers as providers 2015-01-28 22:57:33 -08:00
Brian Tiger Chow
faded10870 fix(bitswap): handling of network notification 2015-01-24 11:34:30 -08:00
Brian Tiger Chow
bbc54516bf revert bitswap network notification
@jbenet @whyrusleeping
2015-01-24 11:47:28 -08:00
Juan Batiz-Benet
1054487690 bitswap: respond to peers connecting + disconnecting
With these notifications, bitswap can reclaim all resources
for any outstanding work for a peer.

cc @briantigerchow @whyrusleeping
2015-01-24 09:13:44 -08:00
Brian Tiger Chow
be41444a9e provide simple wrapper methods for AllKeysRange
@jbenet @whyrusleeping

was the 1<<16 intentional? replaced the raw methods with wrappers.
2015-01-24 01:32:28 -08:00
Brian Tiger Chow
6fedf259eb remove prefix logger 2015-01-24 00:30:56 -08:00
Juan Batiz-Benet
4a5f5e2e2b reprovide: wait a minute before reproviding
Many times, a node will start up only to shut down immediately.
In these cases, reproviding is costly to both the node, and the
rest of the network. Also note: the probability of a node being
up another minute increases with uptime.

TODO: maybe this should be 5 * time.Minute
2015-01-23 05:25:32 -08:00
Brian Tiger Chow
bb89e0d8d7 misc(bitswap): shorten comment and rename var 2015-01-21 17:09:40 -08:00
Brian Tiger Chow
2f247f3355 rm logging statements and inline send 2015-01-21 17:09:40 -08:00
Brian Tiger Chow
129d413f0e chore(bitswap): rm todo 2015-01-21 17:09:40 -08:00
Brian Tiger Chow
3d3ac08fcf chore(bitswap): rm debug log (covered by eventlog) 2015-01-21 17:09:39 -08:00