Commit Graph

421 Commits

Author SHA1 Message Date
Brian Tiger Chow
27dc9594ba refactor(bitswap) bitswap.Network now abstracts ipfs.Network + ipfs.Routing
@jbenet @whyrusleeping

the next commit will change bitswap.Network.FindProviders to only deal
with IDs
2014-12-23 09:19:21 -08:00
Juan Batiz-Benet
64a4abcd6c listen addresses: add Interface addresses
network.ListenAddresses() are general.
Interface addresses are specific.
2014-12-23 09:01:54 -08:00
Juan Batiz-Benet
7952d95bbf added bootstrap logging 2014-12-23 08:48:58 -08:00
Juan Batiz-Benet
a10fb7aa4b core: set local listening addresses 2014-12-23 08:44:59 -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
b039ebceb6 core: arrangement change in struct 2014-12-16 14:47:29 -08:00
Markus Amalthea Magnuson
dbefedbb2e Fix typo.
”configurationx” -> ”configuration”
2014-12-14 20:55:29 +01:00
Brian Tiger Chow
3ecdec985f refactor(mockrouting) misc
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-13 05:30:33 -08:00
Brian Tiger Chow
8e0c8a7a7e refactor(mdag, bserv, bs) mocks, etc.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-13 05:17:16 -08:00
Brian Tiger Chow
c2c95d1105 start threading context through the system
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-09 07:11:48 -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
Brian Tiger Chow
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
Brian Tiger Chow
6c419e6af4 style(core) signature
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 15:07:33 -08:00
Brian Tiger Chow
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
Brian Tiger Chow
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
Brian Tiger Chow
73a89e161d refactor(peerstore) s/Get/FindOrCreate
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 02:10:42 -08:00
Brian Tiger Chow
3f63e50c54 fix(peer): use error-checking multiaddr method
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 01:10:25 -08:00
Juan Batiz-Benet
59c1ab2fc3 Merge pull request #406 from jbenet/new-msgio
updated msgio
2014-12-06 16:20:51 -08:00
Juan Batiz-Benet
5c64ee90e0 cmds: remove info logging 2014-12-06 10:27:12 -05:00
Brian Tiger Chow
9895af2dff feat(core) using WriteCached, cache Puts for exchange and blockservice
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 23:31:01 -08:00
Brian Tiger Chow
670d0244b4 feat(bitswap) make offline exchange query datastore
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 23:31:01 -08:00
Brian Tiger Chow
697453dfc2 fix(cmd/bootstrap) s/remove/rm
@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:28 -08:00
Matt Bell
c91805d7bd core/commands: Fixed build on Windows 2014-12-05 20:56:26 -08:00
Brian Tiger Chow
4882904c3e fix: s/bootstrap rm/boostrap remove
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:26 -08:00
Brian Tiger Chow
3bdb36614e fix(cmd/id) determine offline-ness with !node.OnlineMode()
It's better to have one mechanism for determining whether we're offline
and to improve the SnR of this mechanism over time. We presently have
too many arbitrary heuristics for determining whether we're running in
offline mode. TRTTD is to use polymorphism to eliminate these
conditional checks. (instantiate the node with offline versions of
routing, network, etc.) It'll clean up the core constructor, make it
easier to create ephemeral nodes, and eliminate a class of errors.

@whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:26 -08:00
Brian Tiger Chow
65c6bd07bf feat(core/commands): expose commands to allow for the development of high-level interface
+ style: sort command list

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:26 -08:00
Jeromy
f0a4fdad59 some bitswap cleanup 2014-12-05 20:53:32 +00:00
Jeromy
4cc1780705 fix issues in merkledag 2014-12-05 20:53:31 +00:00
Brian Tiger Chow
d0304def6b refactor(blockstore, blockservice) use Blockstore and offline.Exchange
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:24 +00:00
Brian Tiger Chow
918c8e274e refactor(blockstore) mv under blocks/
@jbenet @whyrusleeping

the pyramids were built one brick at a time

addresses: https://github.com/jbenet/go-ipfs/issues/370

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:23 +00:00
Brian Tiger Chow
81a3ba0677 tests(bitswap) share constructor between tests
@whyrusleeping i hope this makes it a bit easier to work with tests

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:22 +00:00
Juan Batiz-Benet
11508f8f19 Merge pull request #372 from chriscool/add_quiet_flag
Implement the -q or --quiet flag to add with minimal output
2014-12-05 15:45:49 -05:00
Jeromy
b0e915be47 cleanup useless debug statement 2014-12-01 17:08:35 +00:00
Jeromy
28a32915b7 fix for #381 2014-12-01 08:34:07 +00:00
Christian Couder
5bfdc2e2b7 Add --quiet option to ipfs add
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-11-30 14:23:08 +01:00
Brian Tiger Chow
f3b71cfbfd log(core) Event: bootstrap
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-25 06:16:40 -08:00
Brian Tiger Chow
2497c93897 log(core) bootstrapping error -> critical
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-25 06:12:35 -08:00
Juan Batiz-Benet
1a5cb300cb config: swarm is list of addrs 2014-11-20 09:14:48 -08:00
Matt Bell
ab16237bc7 core/commands: Added no-op Mount implementation for Windows 2014-11-19 05:29:48 -08:00
Matt Bell
5461d76957 core/commands: Better syntax for 'pin ls' option value handling 2014-11-19 03:23:21 -08:00
Matt Bell
928f20b4bd core/commands: pin ls: Default type to 'direct' 2014-11-19 01:44:51 -08:00
Matt Bell
9de01007d0 core/commands: pin ls: Accept 'type' option to specify type of pinned keys to list 2014-11-19 00:53:57 -08:00
Matt Bell
4c1a5f6816 core/commands: Restored 'pin'/'refs' option names 2014-11-19 00:36:30 -08:00
Matt Bell
87853f2bde core/commands: Made 'add' use OptionRecursivePath 2014-11-19 00:36:03 -08:00