1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 23:42:20 +08:00

130 Commits

Author SHA1 Message Date
739b19115b correct notifications for findProviders 2015-01-25 01:41:06 +00:00
6fedf259eb remove prefix logger 2015-01-24 00:30:56 -08:00
d68efad06c respect verbose option a bit, and show query events for other commands 2015-01-24 05:32:50 +00:00
528eb5a55a use a notification type strategy for the query events 2015-01-24 03:56:45 +00:00
ec5276c29c really ugly impl of 'ipfs dht query' command 2015-01-24 03:56:45 +00:00
5259cf06d6 dht: kick off all the queries wit every node in our rt
s/kademlia calls for makign sure to query all peers we
have in our routing table, not just those closest. this
helps ensure most queries resolve properly.
2015-01-23 02:08:29 -08:00
494ed8fb0d demote dht logs 2015-01-20 23:43:21 -08:00
c01452e5ea move dht record code into new package 2015-01-19 08:07:58 +00:00
feeada0d90 fix fuse mounting issues
this time, without loading the private key on every startup
2015-01-19 08:05:52 +00:00
c057cea649 addr-explosion mitigated adding
mitigated adding our own addresses where received
from peers

see #573
2015-01-16 11:38:46 -08:00
6bfb9d838c remove low signal log messages 2015-01-15 22:01:33 +00:00
3c55902811 rewrite as single line defer logs 2015-01-15 04:45:34 +00:00
bae8b9f4c0 starting to move important events over to EventBegin/Done 2015-01-15 04:17:17 +00:00
566a86f5d4 Address PR comments and add in more user feedback 2015-01-10 07:27:48 +00:00
172801712e dht: even more logging. 2015-01-05 04:55:02 -08:00
17ce192af5 dht: some provider debug logging 2015-01-05 00:16:52 -08:00
8fb5cf9578 swap net2 -> net 2015-01-02 08:46:46 -08:00
e2698a8733 net -> p2p/net
The net package is the next to move. It will be massaged
a bit still to fix the Network / "NetworkBackend" conflict.
2015-01-02 08:46:45 -08:00
89f5cd4c94 introducing p2p pkg
I think it's time to move a lot of the peer-to-peer networking
but-not-ipfs-specific things into its own package: p2p.
This could in the future be split off into its own library.
The first thing to go is the peer.
2015-01-02 08:46:45 -08:00
ef182f11ed routing: use debugerror 2015-01-02 08:36:32 -08:00
b4c6c87422 Improve readability of getClosestPeers method.
Also remove older useless code.
2015-01-02 07:42:09 +00:00
5af5625805 use query for getClosestPeers 2015-01-02 07:42:08 +00:00
46aa22e949 some better logging and cleanup 2015-01-02 07:42:08 +00:00
b4b6fe2214 a couple small fixes 2015-01-02 07:42:08 +00:00
07b064010e rewrite of provides to better select peers to send RPCs to
refactor test peer creation to be deterministic and reliable

a bit of cleanup trying to figure out TestGetFailure

add test to verify deterministic peer creation

switch put RPC over to use getClosestPeers

rm 0xDEADC0DE

fix queries not searching peer if its not actually closer
2015-01-02 07:42:07 +00:00
ca32a83394 wip with DHT
@whyrusleeping @jbenet this is a WIP with the DHT.

wip

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Conflicts:
	epictest/addcat_test.go
	exchange/bitswap/testnet/peernet.go
	exchange/bitswap/testutils.go
	routing/mock/centralized_server.go
	routing/mock/centralized_test.go
	routing/mock/interface.go

fix(routing/mock) fill in function definition
2014-12-24 09:31:19 -05:00
a7eb52a7fa dht: helpful debugging for no closer peers 2014-12-23 09:03:26 -08:00
c84a714b16 peer change: peer.Peer -> peer.ID
this is a major refactor of the entire codebase
it changes the monolithic peer.Peer into using
a peer.ID and a peer.Peerstore.

Other changes:
- removed handshake3.
-	testutil vastly simplified peer
-	secio bugfix + debugging logs
-	testutil: RandKeyPair
-	backpressure bugfix: w.o.w.
-	peer: added hex enc/dec
-	peer: added a PeerInfo struct
  PeerInfo is a small struct used to pass around a peer with
 	a set of addresses and keys. This is not meant to be a
 	complete view of the system, but rather to model updates to
 	the peerstore. It is used by things like the routing system.
-	updated peer/queue + peerset
-	latency metrics
-	testutil: use crand for PeerID gen
 	RandPeerID generates random "valid" peer IDs. it does not
 	NEED to generate keys because it is as if we lost the key
 	right away. fine to read some randomness and hash it. to
 	generate proper keys and an ID, use:
 	  sk, pk, _ := testutil.RandKeyPair()
 	  id, _ := peer.IDFromPublicKey(pk)
 	Also added RandPeerIDFatal helper
- removed old spipe
- updated seccat
- core: cleanup initIdentity
- removed old getFromPeerList
2014-12-23 08:33:32 -08:00
9328fbaf81 clean peerset constructor names 2014-12-17 23:44:46 -08:00
69dd260236 refactor peerSet 2014-12-17 23:44:42 -08:00
cfbe92bc8b rewrite sendWantlistToProviders 2014-12-17 23:44:40 -08:00
41751b4938 Integrated new network into ipfs 2014-12-16 14:47:29 -08:00
8cdf566865 remove multilayered routing table from the DHT (for now) 2014-12-11 06:08:53 +00:00
9e14bcfe2d changes from PR 2014-12-11 05:42:05 +00:00
2d94b78480 rewrite FindProvidersAsync 2014-12-11 05:09:03 +00:00
26a44fcc06 dht: comment for asyncQueryBuffer 2014-12-08 21:55:51 -08:00
e0f11dff24 dht: FindPeersConnectedToPeer 2014-12-08 20:52:46 -08:00
d06bb6d826 dht: update to use net.LocalPeer 2014-12-08 20:52:45 -08:00
c5c0e7e8f3 dht: changed msgs, include multiple addrs + conn type
See https://github.com/jbenet/go-ipfs/issues/153#issuecomment-63350535
2014-12-08 20:52:34 -08:00
a1237733c2 dht: linting 2014-12-08 19:28:05 -08:00
c67286774c silence verbose output
for higher SnR at IPFS_LOGGING=info

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 15:07:33 -08:00
251b916ce9 style: readability
@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:28 -08:00
de374226be fix(dht/routing) make GetProviders respect context
This commit makes GetProviders (sync) respect the request context. It
also amends all of GetProviders' callsites to pass a context in. This
meant changing the signature of the dht's handlerfunc.

I think I'll start referring to the request context as Vito Corleone.

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:27 -08:00
f756088d26 fix(routing/dht) _always_ close chan on exit of FindProvidersAsync
the important change here is that within FindProvidersAsync, the channel
is closed using a `defer`. This ensures the channel is always closed,
regardless of the path taken to exit.

+ misc cleanup

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:27 -08:00
260ace7f81 util keys need to be pointers for loggable 2014-12-05 20:53:33 +00:00
6552163740 add readme for bitswap 2014-12-05 20:53:33 +00:00
e8536db351 make bitswap sub-RPC's timeout (slowly for now) 2014-12-05 20:53:33 +00:00
c2b497e315 switch over to using sendMessage vs sendRequest 2014-12-05 20:53:32 +00:00
33985c530e switch DHT entries over to be records, test currently fail 2014-11-16 02:45:19 -08:00
d4c819e97d log -> logf 2014-11-12 10:39:11 -08:00