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

106 Commits

Author SHA1 Message Date
4780c65171 mark other nodes in routing table on test-connect
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-17 17:49:51 -07:00
a19ad97ea5 make ping its own protocol
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-13 19:19:25 -07:00
9ec3c1aac1 clean up unused dht methods
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-13 15:53:58 -07:00
rht
4b086eff5a Remove Notice{,f} logging interface
And substitute the lines using Notice{,f} with Info{,f}

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
rht
ac7edddb94 Run 'gofmt -s -w' on these files 2015-05-19 06:11:15 +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
7fb63d7e43 move signing options into a validation checker struct 2015-02-26 22:05:03 -08:00
049b5ad945 make signing dht put records optional 2015-02-26 22:05:03 -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
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
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
66503701ac dht: TestConnectCollision skip in Travis
+ longer timeout
2015-01-24 10:34:28 -08:00
8037235c6d disable dht TestPeriodicBootstrap on CI 2015-01-24 10:30:15 -08:00
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
dd9c1b6243 core/bootstrap: CR comments 2015-01-23 02:08:30 -08:00
82d38a2692 routing/dht: periodic bootstrapping #572 2015-01-23 02:08:28 -08:00
56ae2fd0a8 routing: record validation into record/
This commit moves the record validation/verification
from dht/ into the new record/ packaage. Validator object
-- which is merely a map of ValidatorFuncs -- with a
VerifyRecord

cc @whyrusleeping
2015-01-19 08:10:37 +00:00
50c8561bdd add peer info after FindPeer RPC
fix ping test
2015-01-10 07:27:49 +00:00
1d9977c850 dht/bootstrap/test: longer timeout, less bias 2015-01-05 07:19:07 -08:00
dfcea4c6f1 bootstrap: not error to not have enough bootstrap peers
use dht bootstrap. there is an edge case where the dht
is tiny (1?) and we have 0 bootstrap peers. we should
probably _inform_ the user, but this may be more a
webui or command thing.
2015-01-05 07:13:51 -08:00
41af4f4ea1 dht test skips 2015-01-05 04:55:02 -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
49cb135ca2 ipfsnet -> swarmnet
swarmnet is a better name for the package, because
it's just a Network implemented with a Swarm.
(ipfsnet will be something slightly different).
2015-01-02 08:46:44 -08:00
4807127def net: move Network implementation to own pkg
I needed the network implementation in its own
package, because I'll be writing several services that
will plug into _it_ that shouldn't be part of the core net
package. and then there were dependency conflicts. yay.
mux + identify are good examples of what i mean.
2015-01-02 08:46:43 -08:00
da04d26779 clean up test setup interface 2015-01-02 08:33:42 +00:00
2ad23f0579 dht: fix TestLayeredGet
The test was occasionally passing because:
- it called `putLocal(key, val)`
- GetValue calls `getLocal(key)` optimistically.

cc @whyrusleeping
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
989d3d4ce5 dht/test skip bootstrap test when short 2014-12-24 05:39:48 -08:00
60c869d401 dht/test: providers test id compare 2014-12-24 04:23:15 -08:00
923c082d66 dht: cleaned up dht_test.
TestProversMany still fails
2014-12-24 03:48:02 -08:00
57510d2fec dht/dht_test: bootstrap synchronously. fares better. 2014-12-24 03:46:45 -08:00
b5cbc8b6fa dht_test: better bootstrapping logging 2014-12-24 03:41:13 -08:00
ef0c25f463 dht bootstrap test: rounds. do nothing
odd behavior: only one dht (the last one) is seeing
changes to its routing table.
2014-12-24 03:24:52 -08:00
ccf6f79aa0 respect don contexteone 2014-12-24 03:24:28 -08:00
f8c523fc3b bootstrap test 2014-12-24 02:20:11 -08:00
04f9805d5d dht_test large providers test 2014-12-24 01:49:55 -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
bc2d35fd4d Lots of fixes. DHT tests pass 2014-12-17 23:25:38 -08:00
41751b4938 Integrated new network into ipfs 2014-12-16 14:47:29 -08:00
e0f11dff24 dht: FindPeersConnectedToPeer 2014-12-08 20:52:46 -08:00
26e7656164 dht tests: dont introduce nil multiaddr
this is the type of assumption we shouldn't violate.
2014-12-08 20:52:45 -08:00
b799ddef58 refactor(dht) remove extraneous return value
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 16:28:22 -08:00
74eb03231d fix(core, peer) helpers to testutil, err handling
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 14:32:52 -08:00
d77c4bb5e0 refactor(peer): create peer through peerstore
for safety!

use mockpeer.WithID methods to create peers in tests

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 02:10:42 -08:00
cb23d5b2ae fix validators and key prefix 2014-11-16 02:45:19 -08:00
ed4a8eb782 chore(tests) add Short() -> SkipNow() to slowest tests
vanilla:
    21.57 real        45.14 user         8.51 sys

short:
    14.40 real        31.13 user         5.56 sys

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-15 02:10:53 -08:00