1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 11:52:21 +08:00

80 Commits

Author SHA1 Message Date
16f56e1c9b init: lower default rsa key size to 2048 for now
I think we should lower the default rsa key size to 2048 for now -- until we have a proper focus on securing everything. It's always a pain for new users to get hung on 4096 rsa key gen, when we have not even made sure we're using the keys perfectly correctly yet. (And 2048 is still considered secure)
2015-04-21 01:18:52 -07:00
e1f8dfa25a Check to see if the daemon is currently running
If the daemon is running we do not want to proceed with an
an initialization.

Return a client error telling the user to kill the daemon
before proceeding with the command.
2015-04-20 17:21:13 -07:00
140cd1fd1b remove debugerrors
We now consider debugerrors harmful: we've run into cases where
debugerror.Wrap() hid valuable error information (err == io.EOF?).
I've removed them from the main code, but left them in some tests.
Go errors are lacking, but unfortunately, this isn't the solution.

It is possible that debugerros.New or debugerrors.Errorf should
remain still (i.e. only remove debugerrors.Wrap) but we don't use
these errors often enough to keep.
2015-04-20 00:35:35 -07:00
0a6b880bee fix for #1008 and other pinning fixes
This commit adds a new set of sharness tests for pinning, and addresses
bugs that were pointed out by said tests.

test/sharness: added more pinning tests

Pinning is currently broken. See issue #1051. This commit introduces
a few more pinning tests. These are by no means exhaustive, but
definitely surface the present problems going on. I believe these
tests are correct, but not sure. Pushing them as failing so that
pinning is fixed in this PR.

make pinning and merkledag.Get take contexts

improve 'add' commands usage of pinning

FIXUP: fix 'pin lists look good'

ipfs-pin-stat simple script to help check pinning

This is a simple shell script to help check pinning.

We ought to strive towards making adding commands this easy.
The http api is great and powerful, but our setup right now
gets in the way. Perhaps we can clean up that area.

updated t0081-repo-pinning

- fixed a couple bugs with the tests
- made it a bit clearer (still a lot going on)
- the remaining tests are correct and highlight a problem with
  pinning. Namely, that recursive pinning is buggy. At least:
  towards the end of the test, $HASH_DIR4 and $HASH_FILE4 should
  be pinned indirectly, but they're not. And thus get gc-ed out.
  There may be other problems too.

cc @whyrusleeping

fix grep params for context deadline check

fix bugs in pin and pin tests

check for block local before checking recursive pin
2015-04-19 23:40:25 -07:00
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
c100b1be04 move keyspace init function into namesys 2015-03-17 16:19:39 -07:00
fdd1cd8dc0 Remove fsrepo.At, make Open a constructor function
Nobody calls At without immediately calling Open.

First step, a mechanical transformation. Cleanups will follow.
2015-03-13 20:19:03 -07:00
70819671d3 cleaned up 'ipfs init' 2015-03-09 10:22:12 +01:00
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
73234479fa init docs: go generated welcome dir + files
updated sharness hashes
2015-01-31 07:51:30 -08:00
1ea9481a63 move config.Init into config package 2015-01-27 16:23:58 -08:00
76d9d89aff user friendliness in logs + output 2015-01-26 17:01:00 -08:00
98ad33e005 refactor(eventlog) integrate into fsrepo
now, eventlogger works wherever the fsrepo is used
2015-01-24 01:37:03 -08:00
4334f6fda3 Merge pull request #613 from jbenet/progress-bars
Progress Bars
2015-01-23 22:20:34 -08:00
4ee3d39253 cmd/ipfs: Added key size to 'ipfs init' output 2015-01-23 19:14:59 -08:00
7b4de230eb commands: Refactored Command#Run function signature to (req Request, res Response) 2015-01-23 18:29:29 -08:00
feeada0d90 fix fuse mounting issues
this time, without loading the private key on every startup
2015-01-19 08:05:52 +00:00
b0596cd4ff rename coreio to coreunix 2015-01-18 14:41:43 -08:00
deb1bbe74f fix(command/init) rm stale comment 2015-01-18 14:41:43 -08:00
1291470bf0 use core_io/Add in commands/init/writeWelcomeFile 2015-01-18 14:41:42 -08:00
4b5ff960c9 feat(core): use repo.Repo in core constructor 2015-01-18 14:41:42 -08:00
5705ea9859 style(init): -> errRepoExists
@jbenet
2015-01-13 03:09:33 -08:00
97b865ff6f fix(init): simpler initialization logic
@jbenet this removes everything under the path
2015-01-13 03:09:33 -08:00
4aba282379 feat(fsrepo): handle safe Removal 2015-01-13 03:09:33 -08:00
1b700864f9 refactor(repo): all config writes must go through repo 2015-01-13 03:09:31 -08:00
c2877b2045 refactor(init, repo): init logs in fsrepo 2015-01-13 03:09:31 -08:00
c5da1561b9 check datastore directory when opening the repo for use 2015-01-13 03:09:31 -08:00
0d88f70c6e feat(init): remove datastore path override 2015-01-13 03:09:31 -08:00
fa4cfe8da2 refactor(init, fsrepo): go through repo to write to config 2015-01-13 03:09:30 -08:00
a2d1e3395e refactor(init): write config at top level 2015-01-13 03:09:30 -08:00
44f3d95c3b refactor(repo/fsrepo): use repo to check whether config exists 2015-01-13 03:09:30 -08:00
5b3164de5c refactor(repo/config) move config under repo 2015-01-13 03:09:30 -08:00
57b3ffa533 feat: new core constructor + config options (Standard, Online, Offline) 2015-01-11 01:23:25 -08:00
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
64cb32dadd disable utp
utp is BROKEN!! it causes tests to fail.
2015-01-05 00:16:53 -08:00
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
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
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
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
bd685045c8 fix: uranus and saturn IP addresses
Mistake: Saturn referred to the NY node and vice versa.

Correction: Fittingly, Uranus is in NY and _S_aturn is _S_ingapore.

I'll have to reboot the testnet to rectify the changes.

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 23:19:52 -08:00
af01e0a53c add names
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-07 17:45:49 -08:00
7ea2b2d80e feat(bootstrap!) add saturn, neptune, pluto, uranus
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-07 17:07:15 -08:00
90ed148209 fix(eventlog) apply settings upon initialization
This commit applies the logging settings to the logging system upon
initialization `ipfs init` and `ipfs daemon --init`.

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-24 16:05:51 -08:00
a1dcbbad80 init: note about addrs 2014-11-20 09:15:48 -08:00
1a5cb300cb config: swarm is list of addrs 2014-11-20 09:14:48 -08:00
5aaa45db9a transitioned ipfs2 -> ipfs 2014-11-18 06:15:00 -08:00
ad3f3e003f removed old commands files
https://www.youtube.com/watch?v=kyFyAqLtHq8
2014-11-18 06:15:00 -08:00
ab805f3382 add in a default file hash and cleaned up init functiona bit 2014-11-15 17:50:05 -08:00
67bc9cc89d feat(init) display peer id in init command
use case:

Just configured and installed a node.

benefits:

1) reduces friction when setting up a new node

2) reveals useful details about the workings of the system. It's the
user's first encounter with her node's identity. The tour can build on
the user's knowledge.

```
ipfs (maybebtc-november) λ. ipfs init -f
initializing ipfs node at /Users/btc/.go-ipfs
generating key pair
peer identity: QmcRbn41Vc2CvbpLYfN36mAWusErKWvAAHbq92LPra2gFT
```
2014-11-05 10:15:17 -08:00
c6b74207bc config/init: init Version with CheckPeriod #265 2014-11-04 19:15:25 -08:00