1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 11:12:21 +08:00

73 Commits

Author SHA1 Message Date
d7dab3afea Use gx vendored go-ipfs-utils where possible
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
171952b795 remove gogo-protobuf from godeps, use gx vendored
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-02-12 17:21:40 -08:00
2263539c1c do that last thing again
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-31 15:37:39 -08:00
c0101c0c4b update libp2p dep
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-31 10:19:50 -08:00
3d0aa592ec go-keyspace dep from libp2p added
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:08 -08:00
0e312f5caf initial vendoring of libp2p outside of the repo with gx
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-30 09:34:06 -08:00
4d5af93f43 vendor in new go-datastore
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2016-01-12 08:22:55 -08:00
b34d41e01e fix publish fail on prexisting bad record
dont error out if prexisting record is bad, just grab its sequence number
and continue on with the publish.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-10-02 14:59:31 -07:00
235a9ec5fc Fix dht queries
Queries previously would sometimes only query three (alpha value) peers
before halting the operation. This PR changes the number of peers
grabbed from the routing table to start a query to K.

Dht nodes would also not respond with enough peers, as per the kademlia
paper, this has been changed to from 4 to 'K'.

The query mechanism itself also was flawed in that it would pull all the
peers it had yet to query out of the queue and 'start' the query for
them. The concurrency rate limiting was done inside the 'queryPeer'
method after the goroutine was spawned. This did not allow for peers
receiver from query replies to be properly queried in order of distance.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-29 09:47:47 -07:00
cfcc3d6a1b ipns record selection via sequence numbers
This commit adds a sequence number to the IpnsEntry protobuf
that is used to determine which among a set of entries for the same key
is the 'most correct'.

GetValues has been added to the routing interface to retrieve a set of
records from the dht, for the caller to select from.

GetValue (singular) will call GetValues, select the 'best' record, and
then update that record to peers we received outdated records from.
This will help keep the dht consistent.

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-09-29 09:47:41 -07:00
rht
78b6cc5f2d Replace Critical{,f} with Error{,f}
Except when there is an explicit os.Exit(1) after the Critical line,
then replace with Fatal{,f}.
golang's log and logrus already call os.Exit(1) by default with Fatal.

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-06-18 10:03:57 +07:00
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
5fff7742f3 godeps: move (go)goprotobuf to github location 2015-04-28 13:42:22 +02:00
e186e740de move log messages out of warning level 2015-04-13 19:48:55 -07:00
d749930dfb dht-handlers-log-keys 2015-04-02 03:02:23 -07:00
5e3f9f3574 Merge pull request #986 from ipfs/feat/dht-bw-usage
reduce dht bandwidth consumption
2015-03-31 18:15:18 -07:00
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
a437240989 reduce dht bandwidth consumption
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-03-30 07:54:17 -07:00
3b2bd9bf6a make the providers manager respect contexts 2015-02-26 18:02:23 -08:00
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
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
7c0c3c4511 add put and get dht commands to cli 2015-02-23 21:09:16 -08:00
066ebda687 a few more cleanup changes to handlers 2015-02-13 08:29:10 +00:00
241e34267c this might solve all our problems 2015-02-13 08:08:30 +00:00
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
45e4352c9c dropped down log.Errors 2015-01-26 19:13:44 -08: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
7c9431ba23 add events for handlers 2015-01-15 17:47:36 +00:00
9c6228d18f bitswap and dht: lots of debugging logs 2015-01-05 00:16:53 -08:00
17ce192af5 dht: some provider debug logging 2015-01-05 00:16:52 -08:00
3b6350331f dht: debug dont cast Key as peer.ID 2015-01-05 00:16:52 -08:00
8fb5cf9578 swap net2 -> net 2015-01-02 08:46:46 -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
46aa22e949 some better logging and cleanup 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
7d7e051101 dht bootstrap err check fix + logging 2014-12-24 02:10:52 -08:00
2c95cb5413 dht: bit nicer logging 2014-12-23 08:46:30 -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
41751b4938 Integrated new network into ipfs 2014-12-16 14:47:29 -08:00
2d94b78480 rewrite FindProvidersAsync 2014-12-11 05:09:03 +00:00
e0f11dff24 dht: FindPeersConnectedToPeer 2014-12-08 20:52:46 -08:00
ff1e672d5a dht/pb: changed PeersToPBPeers to set ConnectionType
Uses an inet.Dialer
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
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
0982597e35 make vendor 2014-11-16 02:45:19 -08:00
cb23d5b2ae fix validators and key prefix 2014-11-16 02:45:19 -08:00
33985c530e switch DHT entries over to be records, test currently fail 2014-11-16 02:45:19 -08:00
be5d01b6a6 more doc comments 2014-11-08 22:44:37 -08:00
d79ebe68d2 dht ctxcloserify 2014-10-25 21:33:59 -07:00
d92db12460 lots of logging 2014-10-26 00:45:40 +00:00