Juan Batiz-Benet
140cd1fd1b
remove debugerrors
...
We now consider debugerrors harmful: we've run into cases where
debugerror.Wrap() hid valuable error information (err == io.EOF?).
I've removed them from the main code, but left them in some tests.
Go errors are lacking, but unfortunately, this isn't the solution.
It is possible that debugerros.New or debugerrors.Errorf should
remain still (i.e. only remove debugerrors.Wrap) but we don't use
these errors often enough to keep.
2015-04-20 00:35:35 -07:00
Jeromy
e186e740de
move log messages out of warning level
2015-04-13 19:48:55 -07:00
Juan Batiz-Benet
d749930dfb
dht-handlers-log-keys
2015-04-02 03:02:23 -07:00
Jeromy
bb1b0d50e0
Address comments from PR
2015-03-31 18:17:58 -07:00
Jeromy
97aeda9ae8
cache public keys and use better method for fetching
2015-03-31 18:17:58 -07:00
Jeromy Johnson
5e3f9f3574
Merge pull request #986 from ipfs/feat/dht-bw-usage
...
reduce dht bandwidth consumption
2015-03-31 18:15:18 -07:00
Ho-Sheng Hsiao
bf22aeec0a
Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
...
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
Jeromy
a437240989
reduce dht bandwidth consumption
...
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-03-30 07:54:17 -07:00
Juan Batiz-Benet
60b18d3ad1
dht: tone down dht bootstrap
...
move to a less aggressive period. 5m instead of 20s
2015-03-19 04:02:00 -07:00
Jeromy
7ad8dd8523
ignore bootstrap failures in namesys initialization
2015-03-17 21:57:57 -07:00
Juan Batiz-Benet
1d5b903611
added cancel func calls previously ignored
2015-03-07 09:31:46 -08:00
Henry
435e8188a3
don't ignore returned cancelFunc()
2015-03-07 14:47:07 +01:00
Juan Batiz-Benet
c2bbca0596
query: fix race condition: redux
...
this time just move to goprocess
2015-03-07 04:08:26 -08:00
Juan Batiz-Benet
7a03d677ff
query: fixed race condition
2015-03-07 02:44:20 -08:00
Jeromy
523e603e59
error -> debug
2015-02-26 22:05:51 -08:00
Jeromy
7fb63d7e43
move signing options into a validation checker struct
2015-02-26 22:05:03 -08:00
Jeromy
049b5ad945
make signing dht put records optional
2015-02-26 22:05:03 -08:00
Jeromy
3b2bd9bf6a
make the providers manager respect contexts
2015-02-26 18:02:23 -08:00
Juan Batiz-Benet
88dea5771d
Merge pull request #819 from jbenet/x_net_context_leeroy
...
update context imports to golang.org/x/net
2015-02-25 03:17:28 -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
4899d9349c
error -> debug
2015-02-23 21:09:16 -08:00
Jeromy
7e40503020
dont potentially kill our memory
2015-02-23 21:09:16 -08:00
Jeromy
7c0c3c4511
add put and get dht commands to cli
2015-02-23 21:09:16 -08:00
Juan Batiz-Benet
cc8ed14e7a
bootstrap: update bootstrapping process.
...
Note: the dht-specific part of the bootstrap function
was only there to make sure to call `dht.Update(ctx, npeer)`.
This already happens on all new connections made by the
network, as the dht is signed up for notifications.
2015-02-15 04:41:16 -08:00
Brian Tiger Chow
9dd12922b3
refactor(routing) expose Bootstrap() error on routing interface
2015-02-15 04:41:16 -08:00
Jeromy
066ebda687
a few more cleanup changes to handlers
2015-02-13 08:29:10 +00:00
Jeromy
241e34267c
this might solve all our problems
2015-02-13 08:08:30 +00:00
Juan Batiz-Benet
d8a5bd0549
dht/query: make sure to cancel all contexts.
...
We are leaking peer queues:
http://gateway.ipfs.io/ipfs/QmQxVA48CzVwwNYExUiFe56VrUBn8u368ZfchnCLoc7fSC/moriarty
2015-02-03 12:19:17 -08: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
Juan Batiz-Benet
18ceb73efc
dht: use our most recent Addrs
2015-02-02 21:04:13 -08:00
Brian Tiger Chow
2968221603
log(dht/pb) include key in dht message loggable
2015-02-01 22:08:49 -08:00
Brian Tiger Chow
35a5fa6f6f
feat(dht/message) add PeerRoutingInfo
2015-02-01 21:54:19 -08:00
Juan Batiz-Benet
a2e3ea6236
dht/notif: bugfix in hanging connects
...
http://gifs.gifbin.com/012011/1295375531_cat-jump-fail.gif
2015-02-01 04:29:32 -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
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
Juan Batiz-Benet
45e4352c9c
dropped down log.Errors
2015-01-26 19:13:44 -08:00
Jeromy
739b19115b
correct notifications for findProviders
2015-01-25 01:41:06 +00:00
Juan Batiz-Benet
6c6dcfce2b
Merge pull request #640 from jbenet/races
...
more races 2015-01-24
2015-01-24 10:49:42 -08:00
Juan Batiz-Benet
66503701ac
dht: TestConnectCollision skip in Travis
...
+ longer timeout
2015-01-24 10:34:28 -08:00
Juan Batiz-Benet
8037235c6d
disable dht TestPeriodicBootstrap on CI
2015-01-24 10:30:15 -08:00
Juan Batiz-Benet
00d7b498ef
routing/dht: adjust routing table on peer conn/disc
2015-01-24 09:13:44 -08:00
Brian Tiger Chow
6fedf259eb
remove prefix logger
2015-01-24 00:30:56 -08:00
Jeromy
d68efad06c
respect verbose option a bit, and show query events for other commands
2015-01-24 05:32:50 +00:00
Jeromy
56a5e72760
implement dht findprovs and add error output to dht query
2015-01-24 03:56:46 +00:00
Juan Batiz-Benet
e65afaf198
dont rate limit query during dials
2015-01-24 03:56:46 +00:00
Jeromy
528eb5a55a
use a notification type strategy for the query events
2015-01-24 03:56:45 +00:00
Jeromy
ec5276c29c
really ugly impl of 'ipfs dht query' command
2015-01-24 03:56:45 +00: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