Commit Graph

34 Commits

Author SHA1 Message Date
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
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
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
29bf59dded bootstrap: use ipfsaddr for boostrap peers ⚠️
⚠️ this commit makes your current configs unusable, as the
default bootstrap peers. You may need to edit your config.

Go from:

```js
Bootstrap: [
  {
    "Address": "/ip4/104.131.131.82/tcp/4001",
    "PeerID": "QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
  }
]
```

To:
```js
Bootstrap: [
  "/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
]
```
2015-02-01 05:16:52 -08:00
Juan Batiz-Benet
14eceee35e epictest: fix three-legged-cat
http://gateway.ipfs.io/ipfs/QmfUFkQuqjfQzLNhMLwiibiAxnAaZEJAbYkey9orXJ4aQe/3lcat.jpg
2015-01-29 01:10:01 -08:00
Juan Batiz-Benet
76d9d89aff user friendliness in logs + output 2015-01-26 17:01:00 -08:00
Juan Batiz-Benet
95d58b2a4a core: cleaned up bootstrap process 2015-01-23 05:25:31 -08:00
Juan Batiz-Benet
dd9c1b6243 core/bootstrap: CR comments 2015-01-23 02:08:30 -08:00
Juan Batiz-Benet
d6ce837d72 core/bootstrap: cleaned up bootstrapping
Moved it to its own package to isolate scope.
2015-01-23 02:08:29 -08:00
Juan Batiz-Benet
ec848c486b core: call dht bootstrap 2015-01-23 02:08:28 -08:00
Juan Batiz-Benet
82d38a2692 routing/dht: periodic bootstrapping #572 2015-01-23 02:08:28 -08:00
Brian Tiger Chow
884143bf9c move generic packages to thirdparty (see thirdparty/README.md) 2015-01-18 14:04:45 -08:00
Brian Tiger Chow
5b3164de5c refactor(repo/config) move config under repo 2015-01-13 03:09:30 -08:00
Juan Batiz-Benet
0cb0f27b68 bootstrap: print error when failed 2015-01-12 19:15:02 -08:00
Brian Tiger Chow
2c3fb43350 feat: expose IpfsNode.Bootstrap() method 2015-01-11 01:23:25 -08:00
Juan Batiz-Benet
fbba7c8f39 bootstrap: only dht bootstrap with live conns 2015-01-06 10:10:20 -08:00
Juan Batiz-Benet
517d3e99b8 bootstrap addrs: moved parsing around
this commit:
* moves parsing of bootstrap peers into config
* moves location of bootstrap addrs into core/commands
* refactor `*BootstrapPeer -> BootstrapPeer
2015-01-06 00:25:17 -08:00
Juan Batiz-Benet
6eb32aef35 bootstrap err: info 2015-01-05 09:00:58 -08:00
Juan Batiz-Benet
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
Brian Tiger Chow
30eb8f213f adjust const
to test jenkins

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2015-01-05 06:25:56 -08:00
Brian Tiger Chow
9e4b9714ce feat(core) dht.Bootstrap
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2015-01-05 06:25:25 -08:00
Juan Batiz-Benet
8fb5cf9578 swap net2 -> net 2015-01-02 08:46:46 -08:00
Juan Batiz-Benet
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
Juan Batiz-Benet
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
Juan Batiz-Benet
7952d95bbf added bootstrap logging 2014-12-23 08:48:58 -08:00
Juan Batiz-Benet
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
Juan Batiz-Benet
41751b4938 Integrated new network into ipfs 2014-12-16 14:47:29 -08:00
Juan Batiz-Benet
94f04c7fcc net: add Connectedness var. 2014-12-08 20:52:45 -08:00
Brian Tiger Chow
f8a449953b fix(core) bootstrap panic
@jbenet @mappum

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 18:04:41 -08:00
Brian Tiger Chow
db700839d4 rm logging statement that isn't that useful
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 16:29:33 -08:00
Brian Tiger Chow
df4b54524c refactor(bootstrap) reduce interface
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 16:29:29 -08:00
Brian Tiger Chow
7b5eff5cef feat(bootstrap) consider active cxns and connect to subset
* only bootstrap if the number of active connections falls below a given threshold
* when bootstrapping, connect to a subset of peers

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 16:29:25 -08:00
Brian Tiger Chow
175da4f584 feat(core) supervise bootstrap connections
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 16:29:20 -08:00