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
Brian Tiger Chow
aa4c0d1b90
fix(bitswap): release the lock last
...
The area above the lock was getting big. Moving this up to avoid
mistakes down the road.
2015-01-21 17:09:39 -08:00
Brian Tiger Chow
5985854099
fix: return pointer
...
@whyrusleeping
2015-01-19 03:08:05 -08:00
Brian Tiger Chow
60e288ed4b
fix(bitswap.decision.Engine) enqueue only the freshest messages
...
Before, the engine worker would pop a task and block on send to the
bitswap worker even if the bitswap worker wasn't to receive. Since the
task could have been invalidated during this blocking send, a small
number of stale (already acquired) blocks would be send to partners.
Now, tasks are only popped off of the queue when bitswap is ready to
send them over the wire. This is accomplished by removing the
outboxChanBuffer and implementing a two-phase communication sequence.
2015-01-19 03:07:21 -08:00
Brian Tiger Chow
76bea9be0a
move PQ to thirdparty
2015-01-18 15:09:54 -08:00
Brian Tiger Chow
61e4300d59
feat(PQ)
...
refactor: peerRequestQueue
it's a mistake to make one queue to fit all. Go's lack of algebraic
types turns a generalized queue into a monstrosity of type
checking/casting. Better to have individual queues for individual
purposes.
Conflicts:
exchange/bitswap/decision/bench_test.go
exchange/bitswap/decision/tasks/task_queue.go
fix(bitswap.decision.PRQ): if peers match, always return result of pri comparison
fix(bitswap.decision.Engine): push to the queue before notifying
TOCTOU bug
1. client notifies
2. worker checks (finds nil)
3. worker sleeps
3. client pushes (worker missed the update)
test(PQ): improve documentation and add test
test(bitswap.decision.Engine): handling received messages
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2015-01-18 15:09:54 -08:00
Brian Tiger Chow
0239379303
tests: add bench
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2015-01-18 15:09:54 -08:00
Brian Tiger Chow
cb1ef6e1e2
feat: add time to taskQueue
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
Conflicts:
exchange/bitswap/decision/taskqueue.go
2015-01-18 15:09:54 -08:00
Brian Tiger Chow
d61ce41516
fix(bitswap/engine): get priority from wantlist
2015-01-18 15:09:54 -08:00
Brian Tiger Chow
6a580e50d3
doc
2015-01-18 15:09:53 -08:00
Brian Tiger Chow
884143bf9c
move generic packages to thirdparty (see thirdparty/README.md)
2015-01-18 14:04:45 -08:00
Juan Batiz-Benet
2963f48f62
Merge pull request #554 from jbenet/feat/reprovide
...
basic reprovider implementation
2015-01-17 03:03:01 -08:00
Jeromy
acfc35212e
add backoff retry to reprovider
2015-01-17 04:31:50 +00:00
Juan Batiz-Benet
c057cea649
addr-explosion mitigated adding
...
mitigated adding our own addresses where received
from peers
see #573
2015-01-16 11:38:46 -08:00
Jeromy
a6ec12a17d
selected changes from CR
2015-01-16 06:17:18 +00:00
Jeromy
3c55902811
rewrite as single line defer logs
2015-01-15 04:45:34 +00:00
Jeromy
bae8b9f4c0
starting to move important events over to EventBegin/Done
2015-01-15 04:17:17 +00:00
Jeromy
a7650b259d
add test for reprovider and slight refactor
2015-01-14 22:14:52 +00:00
Jeromy
3269986e42
basic reprovider implementation
...
make vendor
2015-01-13 22:12:37 -08:00
Jeromy
a09854db97
early out if no entries in wantlist
2015-01-11 08:09:37 +00:00
Juan Batiz-Benet
1ab9588cba
p2p/test: bogus key pair for faster tests
2015-01-05 05:48:15 -08:00