Commit Graph

2906 Commits

Author SHA1 Message Date
Juan Batiz-Benet
eb50900fff updated multiaddr-net for WrapNetListener 2015-01-19 23:18:51 -08:00
Brian Tiger Chow
7a322c9538 Merge pull request #601 from jbenet/fix/bitswap-decision-engine-freshness
fix(bitswap.decision.Engine) send only the freshest messages
2015-01-19 20:45:36 -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
Juan Batiz-Benet
1cf2bd2936 Merge pull request #584 from jbenet/fix/ipns
fix fuse mounting issues
2015-01-19 00:55:27 -08:00
Juan Batiz-Benet
56ae2fd0a8 routing: record validation into record/
This commit moves the record validation/verification
from dht/ into the new record/ packaage. Validator object
-- which is merely a map of ValidatorFuncs -- with a
VerifyRecord

cc @whyrusleeping
2015-01-19 08:10:37 +00:00
Jeromy
c01452e5ea move dht record code into new package 2015-01-19 08:07:58 +00:00
Jeromy
a5233faeae some comments 2015-01-19 08:06:51 +00:00
Jeromy
feeada0d90 fix fuse mounting issues
this time, without loading the private key on every startup
2015-01-19 08:05:52 +00:00
Brian Tiger Chow
d0e4cdf327 Merge pull request #568 from jbenet/feat/bitswap-decision-pq
feat(bitswap.decision.Engine) use PriorityQueue for Engine.Outbox
2015-01-18 15:15:19 -08:00
Brian Tiger Chow
76bea9be0a move PQ to thirdparty 2015-01-18 15:09:54 -08:00
Brian Tiger Chow
043b57f075 update random 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
c89b5ce824 wip Loggable func 2015-01-18 15:09:38 -08:00
Brian Tiger Chow
c70e717c7f Merge pull request #578 from jbenet/feat/core+repo
feat(core) replace config.Config with repo.Repo
2015-01-18 15:08:57 -08:00
Brian Tiger Chow
797aad9137 refactor(core) extract const 2015-01-18 14:41:43 -08:00
Brian Tiger Chow
b0596cd4ff rename coreio to coreunix 2015-01-18 14:41:43 -08:00
Brian Tiger Chow
a025fc9adf refactor(core) switch style to type assertions
@jbenet cool with this?
2015-01-18 14:41:43 -08:00
Brian Tiger Chow
c1ff2149f1 doc(core) add TODO 2015-01-18 14:41:43 -08:00
Brian Tiger Chow
15a6237ffc fix(core) improve documentation and describe behavior of function 2015-01-18 14:41:43 -08:00
Brian Tiger Chow
19c2c6556f fix(core) don't assume Repo won't be nil 2015-01-18 14:41:43 -08:00
Brian Tiger Chow
de45277883 doc(core, main) 2015-01-18 14:41:43 -08:00
Brian Tiger Chow
1edc5c0a65 refactor(core) Close in teardown
This declarative style is simpler to compose than the imperative wiring
up of objects.

+ pass context to StartOnlineServices as parameter. one by one, trying
to remove dependencies on node state so these initialization steps can
be broken down.
2015-01-18 14:41:43 -08:00
Brian Tiger Chow
deb1bbe74f fix(command/init) rm stale comment 2015-01-18 14:41:43 -08:00
Brian Tiger Chow
1291470bf0 use core_io/Add in commands/init/writeWelcomeFile 2015-01-18 14:41:42 -08:00
Brian Tiger Chow
ffe6f9a949 doc(core_io/Add)
@jbenet wasn't sure about the terminology here. I'm certain what I wrote
is not entirely correct. Feel free to edit.
2015-01-18 14:41:42 -08:00
Brian Tiger Chow
3dd68ba5c5 fix(core_io/Add): by default, use pinner
@whyrusleeping @jbenet does passing this argument effectively instruct
the dagbuilder to pin recursively?
2015-01-18 14:41:42 -08:00
Brian Tiger Chow
4b5ff960c9 feat(core): use repo.Repo in core constructor 2015-01-18 14:41:42 -08:00
Brian Tiger Chow
c9a89458a5 repo/mock: basic impl 2015-01-18 14:41:42 -08:00
Brian Tiger Chow
03486a5109 rm unused proto
cc @jbenet @whyrusleeping
2015-01-18 14:41:42 -08:00
Brian Tiger Chow
aec0b31d44 eventlog: rm noisy low-signal statement 2015-01-18 14:41:42 -08:00
Brian Tiger Chow
fce04f445a hold lock during map access 2015-01-18 14:33:41 -08:00
Brian Tiger Chow
ff3b9d4698 Merge pull request #598 from jbenet/thirdparty
move generic packages to thirdparty (see thirdparty/README.md)
2015-01-18 14:12:08 -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
88d424cbac Merge pull request #599 from jbenet/fix-fuseversion-vendoring
core/mount: make non-darwin archs see fuseversion
2015-01-18 13:05:04 -08:00
Juan Batiz-Benet
132add2ffd core/mount: make non-darwin archs see fuseversion
See the note:

// this file is only here to prevent go src tools (like godep) from
// thinking fuseversion is not a required package by non-darwin archs.
2015-01-18 12:38:18 -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
Juan Batiz-Benet
00b099c71f core/cmds: fix go-fuse-version path 2015-01-17 02:45:17 -08:00
Jeromy
acfc35212e add backoff retry to reprovider 2015-01-17 04:31:50 +00:00
Juan Batiz-Benet
647da1bd51 Merge pull request #582 from jbenet/addr-explosion
addr-explosion mitigated adding
2015-01-16 14:42:18 -08: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
Juan Batiz-Benet
f78d4141a1 Merge pull request #581 from jbenet/net-diag-d3
moved our d3view to own repo
2015-01-16 11:38:24 -08:00
Juan Batiz-Benet
b896eef3bb Moved out d3view
d3view is now in its own repo:
https://github.com/jbenet/ipfs-diag-net-d3-vis

This is so we can iterate on it quickly without having to
needlessly waste CI resources.

The repo also installs it for you:

```sh
git clone github.com/jbenet/ipfs-diag-net-d3-vis d3view
cd d3view
sudo make install
```
2015-01-16 11:30:10 -08:00
Juan Batiz-Benet
cff596d42a diag/net: more powerfil d3 vis 2015-01-16 02:12:24 -08:00
Juan Batiz-Benet
5f81d9638d diag/net: graphme restyling 2015-01-16 02:11:36 -08:00
Jeromy
a6ec12a17d selected changes from CR 2015-01-16 06:17:18 +00:00