1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-11-02 03:55:50 +08:00

132 Commits

Author SHA1 Message Date
64a4abcd6c listen addresses: add Interface addresses
network.ListenAddresses() are general.
Interface addresses are specific.
2014-12-23 09:01:54 -08:00
a10fb7aa4b core: set local listening addresses 2014-12-23 08:44:59 -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
41751b4938 Integrated new network into ipfs 2014-12-16 14:47:29 -08:00
b039ebceb6 core: arrangement change in struct 2014-12-16 14:47:29 -08:00
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
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
df4b54524c refactor(bootstrap) reduce interface
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 16:29:29 -08:00
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
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
6c419e6af4 style(core) signature
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-08 15:07:33 -08:00
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
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
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
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
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
f0a4fdad59 some bitswap cleanup 2014-12-05 20:53:32 +00:00
4cc1780705 fix issues in merkledag 2014-12-05 20:53:31 +00:00
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
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
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
f3b71cfbfd log(core) Event: bootstrap
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-25 06:16:40 -08:00
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
1a5cb300cb config: swarm is list of addrs 2014-11-20 09:14:48 -08:00
f47b4f1799 Merge pull request #255 from jbenet/id-cmd
basic ID cmd
2014-11-17 23:23:06 -08:00
d93e49e06e fix node context (tests pass) 2014-11-17 22:50:01 -08:00
24f0fa0fde delegate teardown
this is silly but whatever

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 22:36:19 -08:00
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
2bbfe4d56f debug(core, datastore, daemon) wrap errors
@jbenet @whyrusleeping @mappum

very helpful for tracking down errors. the stack traces are only
shown when debug mode is visible. They function best when caught at the
source.

I propose we use this errors package as a drop-in replacement for
fmt.Errorf and errors.New in all of our code, and use errors.Wrap for
external errors as they emerge from others' libraries.

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

Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-17 22:36:18 -08:00
bacf3ecc6a feat(util) add datastore Closer Wrapper
@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-11-17 22:36:17 -08:00
f26388e0e5 fix(core) tear-down leveldb
@jbenet @whyrusleeping @mappum

If we permit initialization in `ipfs daemon`, then we must ensure that
the node instantiated in `ipfs init` (to create the welcome file) shuts
down and releases resources.

Kept running into "resource temporarily unavailable". Discovered that it
was our cousins Jeff and Sanjay over at LevelDB Ave.

go-datastore doesn't expose Close() so I extended the TsDs interface and
submitted a patch.

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

Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
2014-11-17 00:44:18 -08:00
9f4127aefa fix variable naming 2014-11-16 17:12:35 -08:00
0de12b5d36 implement ipfs id in the new commands library 2014-11-16 16:46:06 -08:00
a11c59dcac feat(peer) add Type (Unspecified, Local, Remote) 2014-11-16 07:00:58 -08:00
05346dd927 misc(core/identity) more specific function argument
to aid in testing
2014-11-16 07:00:28 -08:00
1ed0850ce2 style(core) peer -> self 2014-11-16 07:00:28 -08:00
f45d575a96 address comments from PR 2014-11-16 02:45:20 -08:00
f21ec1923a verify ipns records 2014-11-16 02:45:19 -08:00
99f2378bac mount: fixed mount init + teardown
This commit adds a Mount abstraction (which is really just
a wrapped context closer). It makes sure to bind the mount
to the fate of the Node (i.e. close it if the node ends).
This fixes #350
2014-11-16 01:42:42 -08:00
0b42d77e13 refactor(core, bitswap) split bitswap init into two steps
@jbenet
2014-11-15 02:10:53 -08:00
6d89094d41 rename -> OnlineMode()
because this method doesn't check actual network status
2014-11-14 03:17:29 -08:00
772f657fcd add online method to node 2014-11-14 03:17:29 -08:00
0135e3ebbe swarm + net: add explicit listen addresses 2014-11-05 04:00:49 -08:00
f0d823c2db fix tests (circular import) 2014-10-30 01:17:26 -07:00
79866d3378 hotfix(core) assign node.Resolver = path.Resolver
discovered by @mappum and applied at 414e20b71e

fixing here to address #233

https://github.com/jbenet/go-ipfs/issues/233
2014-10-29 06:58:35 -07:00
d79ebe68d2 dht ctxcloserify 2014-10-25 21:33:59 -07:00
4584bc8d18 clean up core initialization
- less floating variables
2014-10-25 21:33:59 -07:00
8cf22c062f core is now ctxcloser 2014-10-25 21:33:10 -07:00
f2b8803a57 net/service now uses ctxcloser 2014-10-25 21:33:10 -07:00
056699cebe convert DAGService to an interface 2014-10-25 22:15:19 -04:00