Commit Graph

466 Commits

Author SHA1 Message Date
Brian Tiger Chow
4c2eda2123 refactor: remove deprecated function 2015-01-11 01:23:25 -08:00
Brian Tiger Chow
57b3ffa533 feat: new core constructor + config options (Standard, Online, Offline) 2015-01-11 01:23:25 -08:00
Juan Batiz-Benet
456719ede7 Merge pull request #523 from jbenet/feat/ping
Implement ipfs ping
2015-01-10 08:11:03 -08:00
Juan Batiz-Benet
1bd69b19ac core: make sure to call swarm.FilterAddrs
also move network setup into its own self-contained func
2015-01-10 08:07:19 -08:00
Juan Batiz-Benet
538550f8f8 fix osx mounting version checks 2015-01-10 01:07:43 -08:00
Jeromy
0f4f91c2f3 restore ability to ping by ID alone 2015-01-10 08:31:17 +00:00
Jeromy
1561291d61 improve UI of ping 2015-01-10 07:27:49 +00:00
Jeromy
9fc0f86a3a cleanup from PR 2015-01-10 07:27:49 +00:00
Jeromy
50c8561bdd add peer info after FindPeer RPC
fix ping test
2015-01-10 07:27:49 +00:00
Jeromy
566a86f5d4 Address PR comments and add in more user feedback 2015-01-10 07:27:48 +00:00
Jeromy
0794d5b46a a little cleanup 2015-01-10 07:27:48 +00:00
Brian Tiger Chow
069966d55a ping WIP
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Conflicts:
	core/commands/root.go

begin ping command, WIP

finish initial ping implementation
2015-01-10 07:27:45 +00:00
Juan Batiz-Benet
d1bff333a5 refs: log writer error 2015-01-07 13:49:13 -08:00
Juan Batiz-Benet
180b9b32d3 refs: added --format option 2015-01-07 13:42:06 -08:00
Juan Batiz-Benet
f46120b194 refs edges + stream fix 2015-01-07 12:56:14 -08:00
Juan Batiz-Benet
8307572777 ipfs block stat bugfix: cast 2015-01-07 06:26:34 -08:00
Juan Batiz-Benet
6b2795338f ipfs object has learned stat
'ipfs object stat' is a plumbing command to print DAG
node statistics. <key> is a base58 encoded multihash.
It outputs to stdout:

  NumLinks        int number of links in link table
  BlockSize       int size of the raw, encoded data
  LinksSize       int size of the links segment
  DataSize        int size of the data segment
  CumulativeSize  int cumulative size of object and references
2015-01-07 02:31:29 -08:00
Juan Batiz-Benet
07b923d7a4 ipfs block stat cmd 2015-01-07 00:55:27 -08:00
Matt Bell
6236ef7fdb core/commands: Made add command output a channel
core/commands: Don't use pointers for Type field
2015-01-06 15:55:16 -08:00
Matt Bell
abd390b892 core/commands: Made add command show streamed output 2015-01-06 15:53:48 -08:00
Matt Bell
fd40702f73 commands: Changed Marshaler to return a io.Reader instead of a []byte
core/commands: Refactored command marshalers
2015-01-06 15:53:42 -08:00
Juan Batiz-Benet
0395a7af1e ipfs add output not sorted, cmds files sorted
I made the commands lib dir listing sort the contents
so we get the same sequence of files from it repeatably.
2015-01-06 14:02:49 -08:00
Christian Couder
d490a85706 Make sure ipfs add output is sorted by name
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2015-01-06 13:12:22 -08:00
Juan Batiz-Benet
64bf493b54 swarm peers print pid.Pretty 2015-01-06 10:13:49 -08:00
Juan Batiz-Benet
fbba7c8f39 bootstrap: only dht bootstrap with live conns 2015-01-06 10:10:20 -08:00
Juan Batiz-Benet
9e67acf51a bootstrap add --default option 2015-01-06 04:30:06 -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
730793e2f7 cmds/bootstrap: rm --all 2015-01-05 07:59:53 -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
b599e28b88 core/mock: use mock routing
this fixes a failing ipns test which didnt have
a "working" routing system
2015-01-05 00:16:53 -08:00
Juan Batiz-Benet
e21b1f662b fuse mount lifecycle fixes
This commit cleans up how mounting was being done.
It now successfully signals when it is properly mounted
and listen to close signals correctly.
2015-01-04 00:47:27 -08:00
Juan Batiz-Benet
1fa14335b9 core: rearranged initialization a bit 2015-01-04 00:47:27 -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
cc0d7c9b57 crypto -> p2p/crypto
The crypto package moves into p2p. Nothing in it so far is ipfs
specific; everything is p2p-general.
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
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
Juan Batiz-Benet
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
Jeromy
14fc4188be address comments from PR 2015-01-02 07:42:08 +00:00
Jeromy
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
Brian Tiger Chow
07fa9eecbd hotfix(core/mock) set Network field 2014-12-25 15:20:54 -05:00
Brian Tiger Chow
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
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