Commit Graph

61 Commits

Author SHA1 Message Date
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
4831ca6d57 refactor(config) use util method
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-25 06:12:35 -08:00
Juan Batiz-Benet
8786602df1 config: nicer error to user 2014-11-20 09:14:48 -08:00
Juan Batiz-Benet
1a5cb300cb config: swarm is list of addrs 2014-11-20 09:14:48 -08:00
Brian Tiger Chow
ef65bb1ce3 revert to debug error
@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 22:36:18 -08:00
Brian Tiger Chow
cf8fb87df1 refactor(errors) debugerror -> errors
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 00:44:18 -08:00
Brian Tiger Chow
3a927cbcec feat(init) init logs upon config initialization
TODO allow user dir override

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)

Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-16 07:01:00 -08:00
Brian Tiger Chow
395f8a6e50 style(errors) import as errors
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-16 07:00:59 -08:00
Brian Tiger Chow
eb5bb1daa8 feat(debugerror)
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

impl errorf

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

return a debug error

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-14 17:04:48 -08:00
Juan Batiz-Benet
fa8fc1aefc cmds2: check for updates 2014-11-14 03:20:46 -08:00
Juan Batiz-Benet
86b08f4e4b cmds2 config outputs nicely 2014-11-14 03:20:01 -08:00
Jeromy
4f083d54d6 write a few package doc strings to improve look of godoc 2014-11-08 21:42:36 -08:00
Juan Batiz-Benet
a9d90852db version bump (checking autoinstall) 2014-11-06 12:14:15 -08:00
Juan Batiz-Benet
c6b74207bc config/init: init Version with CheckPeriod #265 2014-11-04 19:15:25 -08:00
Juan Batiz-Benet
866c2c8915 updates + config: moved location of current version number 2014-11-04 18:58:15 -08:00
Juan Batiz-Benet
6ba45221d6 config/version: Update_ -> AutoUpdate_ 2014-11-04 18:57:03 -08:00
Juan Batiz-Benet
6f7bab389e tour: command 2014-10-26 08:32:08 -07:00
Henry
24e1e6d1e1 config: custom AutoUpdate type for validity 2014-10-22 11:25:30 +02:00
Henry
8f1fd2fcd9 ShouldAutoUpdate function 2014-10-22 11:25:30 +02:00
Henry
ee8bcd5597 added AutoUpdate to config 2014-10-22 11:24:34 +02:00
Juan Batiz-Benet
7652f86c6f fixed a parsing bug on Version.CheckPeriod
And refactored a few names/comments
2014-10-09 20:31:26 -07:00
Peter Borzov
b60f0d582f Limit update checks to once per configurable time period to avoid HTTP request time delay 2014-10-09 19:59:47 -07:00
Peter Borzov
8b90071478 Clean up error/warning messages for consistency 2014-10-09 19:59:32 -07:00
Peter Borzov
9f7dc48201 Add supported Version.Check values as consts 2014-10-09 19:58:51 -07:00
Peter Borzov
4c167a42e2 Rename config.Updates to config.Version 2014-10-09 19:58:51 -07:00
Peter Borzov
c8678666e3 Save ipfs version used to initialize config 2014-10-09 19:57:59 -07:00
Peter Borzov
6f033dd7a1 Initialize Updates.check config setting 2014-10-09 19:57:59 -07:00
Peter Borzov
ecd6f3b00c Add Updates.Check field to Config 2014-10-09 19:57:58 -07:00
Juan Batiz-Benet
ab83c52431 Merge branch 'master' into ipns
Conflicts:
	cmd/ipfs/ipfs.go
2014-10-09 03:46:35 -07:00
Juan Batiz-Benet
abefd93fb8 edited bootstrap cmd
- safer parsing
- multiple inputs
- add: dup detection
- common cfg writing
2014-10-06 02:14:05 -07:00
Juan Batiz-Benet
bc0769e370 ipfs + ipns mounts with flags + config 2014-10-02 03:05:49 -07:00
Juan Batiz-Benet
33dfa6f640 lint 2014-10-02 00:06:50 -07:00
Juan Batiz-Benet
be9c114650 no need for ; here
cc @mildred
2014-09-29 13:32:44 -07:00
Shanti Bouchez-Mongardé
dc1aafbafd Fix error handling 2014-09-29 21:54:35 +02:00
Shanti Bouchez-Mongardé
e200c089fa Correct style. 2014-09-29 21:54:35 +02:00
Shanti Bouchez-Mongardé
7705dfb939 Refactor config file location, add IPFS_CONFIG_DIR
Removed config.Filename and replace it with config.GetConfigFilePath that
takes a configuration directory as argument instead. Makes code simpler.
ipfs.getConfigDir now also return the default configuration dir instead of
an empty string in some cases.
2014-09-29 21:54:35 +02:00
Juan Batiz-Benet
303ebd894d config: changed language from Peers to Bootstrap 2014-09-24 05:31:25 -07:00
Juan Batiz-Benet
193aebc4c0 config: rename addresses
WARNING: change breaks old configs.
@whyrusleeping @perfmode

This commit changes the way addresses are stored in config files.
It lumps Identity.Address and RPCAddress into Addresses. This
commit also fixes several golint issues.
2014-09-24 05:28:35 -07:00
Juan Batiz-Benet
1653304129 adjusted what Address means in config
There are (so far) two sorts of addresses that peers care about:

- peer network addresses, local to listen, saved to bootstrap.
  `config.Identity.Address`

- peer RPC network address, local RPC tcp endpoint
  `config.RPCAddress`

@whyrusleeping @perfmode
2014-09-22 04:06:17 -07:00
Juan Batiz-Benet
d17fcc1780 fix security comment #92 2014-09-22 04:06:16 -07:00
Juan Batiz-Benet
4284e8e960 config: use PeerID in bootstrap config 2014-09-22 04:06:12 -07:00
Brian Tiger Chow
2e512e81c9 test(config) add path assertion 2014-09-12 04:36:07 -07:00
Brian Tiger Chow
a5c0f67c8c fix(config) failing test
also replace *Datastore with Datastore
2014-09-12 04:20:46 -07:00
Matt Bell
f1e088508a config: Made WriteConfigFile create config parent directory if it doesn't exist 2014-09-11 13:06:51 -07:00
Matt Bell
5059654ec4 config: Broke out config directory into its own const 2014-09-11 13:05:59 -07:00
Jeromy
aa5a34a6d1 add init command to generate crypto keys 2014-09-02 12:58:35 -07:00
Jeromy
45fc43c9cf add pub/priv key code to identify, not complete yet 2014-09-01 16:09:03 -07:00
Jeromy
c2cc4b1d70 a little cleanup, ipfs 'works' for basic file adds and cats 2014-08-29 17:22:40 -07:00
Juan Batiz-Benet
c1ae1d2ad4 mkdir .go-ipfs bugfix 2014-08-20 18:26:28 -07:00
Juan Batiz-Benet
dd08e0ed62 config test: write local file 2014-08-07 06:18:20 -07:00