Commit Graph

49 Commits

Author SHA1 Message Date
Juan Batiz-Benet
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
Jeromy
f1267d0624 change ipns resolve/publish to store raw keys, not b58 encoded 2015-01-28 19:36:30 +00:00
Juan Batiz-Benet
09a2e1f64c testutil: obvious names for seeded key pairs 2015-01-05 04:55:02 -08:00
Juan Batiz-Benet
1fa14335b9 core: rearranged initialization a bit 2015-01-04 00:47:27 -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
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
0172e4f2bb style(testutil) rename testutil.Peer -> testutil.Identity
cc @jbenet
2014-12-24 09:59:24 -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
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
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
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
Simon Kirkby
284f4a2c47 Validity time not checked properly
name publishing was failing of bad format.
2014-12-04 20:39:35 +08:00
Jeromy
f45d575a96 address comments from PR 2014-11-16 02:45:20 -08:00
Jeromy
cd4e23bc2e some comments 2014-11-16 02:45:20 -08:00
Jeromy
58b66f0ff7 make vendor 2014-11-16 02:45:19 -08:00
Jeromy
f21ec1923a verify ipns records 2014-11-16 02:45:19 -08:00
Jeromy
01451c214e fix routing resolver 2014-11-16 02:45:19 -08:00
Jeromy
1cf7a1824a validator functions and ipns completion 2014-11-16 02:45:19 -08:00
Jeromy
33985c530e switch DHT entries over to be records, test currently fail 2014-11-16 02:45:19 -08:00
Jeromy
c3d04570c0 a few more comments 2014-11-03 03:53:16 +00:00
Brian Tiger Chow
cea398b8a7 fix(all) log.Debug -> log.Debugf 2014-10-30 06:35:29 -07:00
Brian Tiger Chow
edbaa3f664 fix(namesys) use the error that already exists 2014-10-28 15:41:49 -07:00
Brian Tiger Chow
0bfadea036 fix(namesys, merkledag) use static error 2014-10-28 15:40:26 -07:00
Brian Tiger Chow
c534daef86 refactor(namesys) use one-off error 2014-10-28 15:27:00 -07:00
Brian Tiger Chow
c4ea239291 fix(namesys/pb) rename proto package -> namesys_pb 2014-10-22 15:54:18 -07:00
Brian Tiger Chow
488515c207 refactor(namesys) move proto to internal pb package 2014-10-22 15:54:16 -07:00
Juan Batiz-Benet
f7c1ed39e0 renamed datastore.go -> go-datastore 2014-10-21 15:10:58 -07:00
Juan Batiz-Benet
9ca87fbb93 peer.Peer is now an interface
![](http://m.memegen.com/77n7dk.jpg)
2014-10-20 03:26:46 -07:00
Juan Batiz-Benet
a53813c8fa fixed resolver test 2014-10-09 03:50:52 -07:00
Juan Batiz-Benet
2fa43ce46c ipfs name cmd improvements
- cleaned up cmd help
- ipfs name publish [<name>] <ref>
- ipfs name resolve [<name>]
- publish validates <ref>
- both validate n args
2014-10-09 03:39:47 -07:00
Juan Batiz-Benet
2944360f5c New NameSystem interface
type NameSystem interface {
      Resolver
      Publisher
    }

should say it all.

cc @whyrusleeping
2014-10-08 04:14:52 -07:00
Juan Batiz-Benet
f3ae0e8e1b u.Hash - error
the u.Hash error can be safely ignored (panic) because multihash
only fails from the selection of hash function. If the fn + length
are valid, it won't error.

cc @whyrusleeping
2014-10-06 02:26:52 -07:00
Juan Batiz-Benet
d7d3af3faf vendoring protobuf + go-is-domain 2014-10-05 15:15:49 -07:00
Juan Batiz-Benet
0c8ae7674e loggers: set level 2014-10-04 03:53:21 -07:00
Juan Batiz-Benet
7e1cd59259 initialize loggers at ERROR 2014-10-04 03:36:30 -07:00
Juan Batiz-Benet
73b2058f8f DNSResolver: use isd.IsDomain
this commit dedicated to @whyrusleeping
2014-10-03 18:08:27 -07:00
Juan Batiz-Benet
ba510cbd6d IpnsPublicher -> Publisher interface 2014-10-01 01:36:21 -07:00
Juan Batiz-Benet
f085d594aa vendoring ipns things 2014-10-01 00:44:22 -07:00
Jeromy
ed2fbd0512 new files and directories appear to work properly 2014-10-01 00:41:30 -07:00
Jeromy
6080944af9 writing files inside ipns works now! also implemented resolve cli command 2014-10-01 00:41:29 -07:00
Jeromy
375a38c5f7 add basic publish command, needs polish 2014-10-01 00:39:57 -07:00
Jeromy
a65e8600a3 catch ipns branch up to master and make all things compile 2014-10-01 00:37:53 -07:00
Jeromy
1a3886597d Address concerns from PR 2014-10-01 00:33:00 -07:00
Jeromy
d1f011244f address comments from the PR #45 2014-10-01 00:33:00 -07:00
Jeromy
2aa2b8c6c7 add routing resolver test 2014-10-01 00:26:59 -07:00
Jeromy
4c0f18cbbd implement ipns publisher code 2014-10-01 00:26:59 -07:00
Jeromy
235a767492 implement namesys resolvers (thanks to bren2010 for dns and proquint) 2014-10-01 00:16:05 -07:00