Commit Graph

394 Commits

Author SHA1 Message Date
Brian Tiger Chow
9dd12922b3 refactor(routing) expose Bootstrap() error on routing interface 2015-02-15 04:41:16 -08:00
Brian Tiger Chow
1dfcce9f5a fix(grc) move Bootstrap method onto routing interface 2015-02-15 04:41:16 -08:00
Brian Tiger Chow
2298cf66cf test GetPutRecord
validate doesn't work. the peer's public key is not present in the
peerstore.
2015-02-15 04:41:16 -08:00
Brian Tiger Chow
64a431dd32 ensure we only accept AddProvider records if the peer is the sender 2015-02-15 04:41:15 -08:00
Brian Tiger Chow
6b900d209b remove todo
this functionality is here as an optimization
2015-02-15 04:41:15 -08:00
Brian Tiger Chow
19eb35137b refactor(routing) rename grandcentral to supernode
thanks @mappum

remove .go-ipfs
2015-02-15 04:41:10 -08:00
Brian Tiger Chow
c730e19b5f rm TODO (there's still one for verifying records) 2015-02-14 14:13:56 -08:00
Brian Tiger Chow
71392dfd28 remove TODO
@jbenet when returning values for records, when would it make sense to
also return providers for the records?
2015-02-14 14:13:56 -08:00
Brian Tiger Chow
cfe3a637e4 log(gcr/s) remove local peer in message-received event 2015-02-14 14:13:56 -08:00
Brian Tiger Chow
7ab01d4318 misc(gcr/s) rm TODO 2015-02-14 14:13:56 -08:00
Brian Tiger Chow
0676a9b10b fix(gcr/s) defer log event 2015-02-14 14:13:56 -08:00
Brian Tiger Chow
ba119fb1f7 doc(gcr/c) comment methods 2015-02-14 14:13:56 -08:00
Brian Tiger Chow
5caa179d69 refactor(gcr/s) extract provider key 2015-02-14 14:13:56 -08:00
Brian Tiger Chow
ebd08f8194 refactor(gcr/s) move declaration 2015-02-14 14:13:56 -08:00
Brian Tiger Chow
450f21a545 fix(gcr/s) de-duplicate routing records 2015-02-14 14:13:55 -08:00
Brian Tiger Chow
e2a3c4d19a refactor(gcr/s) re-use code from get 2015-02-14 14:13:55 -08:00
Brian Tiger Chow
31eb4cac08 misc(gcr/s) rm unused param 2015-02-14 14:13:55 -08:00
Brian Tiger Chow
ab81d7cbd1 misc(gcr/s) add doc 2015-02-14 14:13:55 -08:00
Brian Tiger Chow
d1df4095ea fix: don't check routingbackend for value 2015-02-14 14:13:55 -08:00
Brian Tiger Chow
ca268b789e misc(gcr/s) rm TODO 2015-02-14 14:13:55 -08:00
Brian Tiger Chow
8940b8d4b8 fix(gcr/s) rename datastore to routing backend 2015-02-14 14:13:55 -08:00
Brian Tiger Chow
eb8db2ec79 log(gcr/s,c) add addtional eventlogs 2015-02-14 14:13:55 -08:00
Brian Tiger Chow
4a9ae80791 fix(gcr/c) print a loud error when clients receive routing messages, but don't panic
This is an unhandled case. Right now, we close the stream without
reading. Should clients be able to satisfy routing requests?

@jbenet @whyrusleeping
2015-02-14 14:13:54 -08:00
Brian Tiger Chow
d5331e7dc7 feat(gcr/s) add eventlogs 2015-02-14 14:13:54 -08:00
Brian Tiger Chow
9e5b3b7773 refactor(gcr/c) pass host.Host into GCR client 2015-02-14 14:13:54 -08:00
Brian Tiger Chow
ea9ea79459 feat(gcr/c) randomize order of remotes 2015-02-14 14:13:54 -08:00
Brian Tiger Chow
46bbd11e6b fix(gcr/s,c) register stream handlers 2015-02-14 14:13:54 -08:00
Brian Tiger Chow
d80e9aba7a feat(gcr/c) add support for multiple servers 2015-02-14 14:13:54 -08:00
Brian Tiger Chow
f8f4dc8e8d misc(gcr/c) rm TODO 2015-02-14 14:13:54 -08:00
Brian Tiger Chow
0721a58934 fix(gcr/s) proto marshaling bugs 2015-02-14 14:13:54 -08:00
Brian Tiger Chow
a88621aeb1 refac(gcr/s,c) remove network/dialer
remove dialer from GCR client
2015-02-14 14:13:53 -08:00
Brian Tiger Chow
c989646791 refac(gcr/s,c) use PeerRoutingInfo 2015-02-14 14:13:53 -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
e92a33f442 routing/kbucket: cleaner "public" interface for bucket 2015-02-05 06:22:44 -08:00
Juan Batiz-Benet
be2be853c7 kbucket: fix data race 2015-02-05 04:53:23 -08: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
Brian Tiger Chow
577baaf621 feat(routing.grandcentral): skeleton
fixes breakages:
  - peer.Peer -> peer.ID
  - peer.X -> peer.PeerInfo
  - netmsg -> p2p streams
2015-01-27 02:32:06 -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