Commit Graph

3211 Commits

Author SHA1 Message Date
Juan Batiz-Benet
7b85579d7a core: move online service init block into own func
addresses CR comments
2015-01-31 17:20:34 -08:00
Juan Batiz-Benet
1a3752b81f core: setup peerhost + listen separate steps
We had a problem: we were starting all the services with the network
live, and so would miss early messages. We were noticing bitswap
messages not handled (not in muxer). Many of the subsystems expect
the network to _exist_ when they start up, so we split construction
and starting to listen into two separate steps.
2015-01-30 20:37:53 -08:00
Juan Batiz-Benet
763cc945c0 p2p/host: nat manager
this commit moves management of the nat to its own object.
perhaps this can be general enough to work with any host
(not just BasicHost), but for now keeping here.

the nat manager:
- discovers and sets up the nat asynchronously.
- adds any port mappings necessary if/after nat has been found.
- listens to the network Listen() changes, adding/closing mappings
2015-01-30 20:37:53 -08:00
Juan Batiz-Benet
d7c9ae12ac p2p/nat: make nat mappings closable by client
After this commit, client can close individual mappings (without
closing the whole NAT)
2015-01-30 20:37:53 -08:00
Juan Batiz-Benet
d0432f9e75 dht: removing addrs sanity check
About to allow dht to start without local addresses. this is
so that we can initialize the dht and sign it up to listen
on the muxer, before our node starts accepting incoming connections.
otherwise, we lose some (we're observing this happening already).

I looked through the dht's use of the peerstore, and the check here
doesnt seem to be as important as the panic implies. I believe the
panic was used for debugging weird "dont have any address" conditions
we had earlier.
2015-01-30 20:37:52 -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
75a2975b85 Merge pull request #702 from jbenet/fix/coreUI
address concerns about user interface with new Path type
2015-01-30 14:23:39 -08:00
Jeromy
9ddfafb40a address concerns about user interface with new Path type 2015-01-30 19:55:38 +00:00
Brian Tiger Chow
1c891dbdc1 Merge pull request #636 from jbenet/cleanup-logs
Cleanup logs
2015-01-30 07:20:11 -08:00
Brian Tiger Chow
f1333d6419 bench: offline add 2015-01-30 06:57:42 -08:00
Brian Tiger Chow
3279047074 log(main) show IPFS_DIR/IPFS_PATH at start up
a one-time print out
2015-01-30 06:57:42 -08:00
Brian Tiger Chow
a97234288d rm updates... 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
25b1d34ae0 log(dht): remove lots of query debug logs
the debug log is flooded with pages upon pages of...

we've gotta be more judicious with our use of console logs. i'm sure
there's interesting actionable information in here. let's use the
console logging more like a sniper rifle and less like birdshot.

feel free to revert if there are specific critical statements in this
changeset

03:05:24.096 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
queryPeer(<peer.ID QmSoLp>) QUERY worker for: <peer.ID QmSoLp> - not
found, and no closer peers. prefixlog.go:107
03:05:24.096 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
queryPeer(<peer.ID QmSoLp>) completed prefixlog.go:107
03:05:24.096 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
queryPeer(<peer.ID QmSoLp>) finished prefixlog.go:107
03:05:24.096 DEBUG        dht: dht(<peer.ID QmWGN3>)
FindProviders(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK)
Query(<peer.ID QmSoLn>) 0 provider entries prefixlog.go:107
03:05:24.096 DEBUG        dht: dht(<peer.ID QmWGN3>)
FindProviders(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK)
Query(<peer.ID QmSoLn>) 0 provider entries decoded prefixlog.go:107
03:05:24.096 DEBUG        dht: dht(<peer.ID QmWGN3>)
FindProviders(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK)
Query(<peer.ID QmSoLn>) got closer peers: 0 [] prefixlog.go:107
03:05:24.097 DEBUG        dht: dht(<peer.ID QmWGN3>)
FindProviders(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK)
Query(<peer.ID QmSoLn>) end prefixlog.go:107
03:05:24.097 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
queryPeer(<peer.ID QmSoLn>) query finished prefixlog.go:107
03:05:24.097 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
queryPeer(<peer.ID QmSoLn>) QUERY worker for: <peer.ID QmSoLn> - not
found, and no closer peers. prefixlog.go:107
03:05:24.097 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
queryPeer(<peer.ID QmSoLn>) completed prefixlog.go:107
03:05:24.097 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
queryPeer(<peer.ID QmSoLn>) finished prefixlog.go:107
03:05:24.097 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
all peers ended prefixlog.go:107
03:05:24.097 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
spawnWorkers end prefixlog.go:107
03:05:24.097 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
failure: %s routing: not found prefixlog.go:107
03:05:24.097 DEBUG        dht: dht(<peer.ID
QmWGN3>).Query(QmXvrpUZXCYaCkf1jfaQTJASS91xd47Yih2rnVC5YbFAAK).Run(3)
end prefixlog.go:107
2015-01-30 06:57:41 -08:00
Brian Tiger Chow
d98b05497f log(secio) rm handshake console log (still has event log) 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
0ec0a6ab87 fix inflection 2015-01-30 06:57:41 -08:00
Brian Tiger Chow
ddc5bb89d7 vendor inflection package (MIT) 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
Brian Tiger Chow
76e3fd7101 Merge pull request #699 from jbenet/net-set-listener
p2p/net: network interface Listen func
2015-01-30 06:52:14 -08:00
Juan Batiz-Benet
df0967d6ee p2p/net: network interface Listen func
network interface now allows setting Listeners after the fact.
This is useful to create the network and start listening as
separate steps. And to keep the network up to date on new
addresses the node might have to listen to.
2015-01-30 06:51:29 -08:00
Juan Batiz-Benet
699bf215f9 p2p/net: network interface Listen func
network interface now allows setting Listeners after the fact.
This is useful to create the network and start listening as
separate steps. And to keep the network up to date on new
addresses the node might have to listen to.
2015-01-30 04:13:02 -08:00
Juan Batiz-Benet
23bdeaa972 Merge pull request #697 from jbenet/test/mv-epic-integration
rename epictest -> integrationtest
2015-01-30 01:09:05 -08:00
Brian Tiger Chow
fadedab003 rename epictest -> integrationtest 2015-01-29 22:22:25 -08:00
Juan Batiz-Benet
18f3481d6e Merge pull request #688 from jbenet/bootstrapper/gc-flag
decide whether to perform GC -- with flag
2015-01-29 16:44:04 -08:00
Juan Batiz-Benet
a182a47156 Merge pull request #695 from jbenet/fix/nil-id-mes
fix nil pointer panic on version strings in ID message
2015-01-29 16:40:24 -08:00
Juan Batiz-Benet
33eb14709e Merge pull request #694 from jbenet/fuse-seek
fuse/ipfs: seeking
2015-01-29 16:22:41 -08:00
Juan Batiz-Benet
a8bfa947d8 fuse/ipns: use Read() not ReadAll() 2015-01-29 16:12:45 -08:00
Juan Batiz-Benet
c05b4f06f0 fuse/ipfs: remove ReadAll 2015-01-29 16:12:45 -08:00
Juan Batiz-Benet
fcf7f0e7c1 fuse/ipfs: seeking
This commit changed the "ReadAll" to do proper read requests.
Seeking in fuse mounted fs now works. Note: this is why opening a
mounted video didnt work... we just didnt look at this code in
months.
2015-01-29 16:12:45 -08:00
Jeromy
97e99ca167 fix nil pointer panic on version strings in ID message 2015-01-29 23:07:32 +00:00
Jeromy Johnson
3c34ab8e0c Merge pull request #685 from jbenet/feat/path
implement path type
2015-01-29 11:20:07 -08:00
Jeromy
abb3c9c9c4 implement path type 2015-01-29 17:51:08 +00:00
Brian Tiger Chow
bbc8091085 provide flag to determine whether to perform GC 2015-01-29 02:29:02 -08:00
Juan Batiz-Benet
32a68c6f97 Merge pull request #686 from jbenet/exchange-with-connected
return connected peers as providers
2015-01-29 01:51:21 -08:00
Juan Batiz-Benet
1ce3ecf846 swarm: TestSimultOpenMany has problems in CI.
dialing 4000 connections somehow keeps choking both travis and
jenkins. dialing this down to 500
2015-01-29 01:25:54 -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
14eceee35e epictest: fix three-legged-cat
http://gateway.ipfs.io/ipfs/QmfUFkQuqjfQzLNhMLwiibiAxnAaZEJAbYkey9orXJ4aQe/3lcat.jpg
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
Juan Batiz-Benet
17e542a559 Merge pull request #675 from jbenet/diag-helptext
add more help text for ipfs diag net
2015-01-28 17:14:35 -08:00
Juan Batiz-Benet
2a29413c5e Merge pull request #674 from jbenet/gateway
Gateway Changes
2015-01-28 17:12:19 -08:00
Juan Batiz-Benet
8ed1b14034 sharness: rename conflicting test 2015-01-28 17:02:04 -08:00
Juan Batiz-Benet
c36e8dd04c gateway: reordered headers to avoid error
cc @mappum
2015-01-28 16:55:00 -08:00
Matt Bell
21575ba535 test/sharness: Fixed gateway test formatting 2015-01-28 16:52:46 -08:00
Matt Bell
cea68afa2e core/corehttp: Handle Etag for caching 2015-01-28 16:50:16 -08:00
Matt Bell
fb986fd822 core/corehttp: Added cache headers to gatewayy requests 2015-01-28 16:48:07 -08:00
Matt Bell
2028d37076 test/sharness: Added basic gateway tests 2015-01-28 16:46:00 -08:00