1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-10-29 00:46:02 +08:00

244 Commits

Author SHA1 Message Date
2c3fb43350 feat: expose IpfsNode.Bootstrap() method 2015-01-11 01:23:25 -08:00
4c2eda2123 refactor: remove deprecated function 2015-01-11 01:23:25 -08:00
57b3ffa533 feat: new core constructor + config options (Standard, Online, Offline) 2015-01-11 01:23:25 -08:00
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
1fa14335b9 core: rearranged initialization a bit 2015-01-04 00:47:27 -08:00
8fb5cf9578 swap net2 -> net 2015-01-02 08:46:46 -08:00
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
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
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
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
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
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