1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 23:42:20 +08:00

233 Commits

Author SHA1 Message Date
rht
5d8e15042f Replace WithTimeout with WithCancel whenever possible
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
rht
d32177cda0 Make sure ctx in commands are derived from req.Context
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-08-23 19:35:03 +07:00
d140b8aae1 Add router that does nothing for bitswap_wo_routing test
License: MIT
Signed-off-by: Karthik Bala <karthikbala444@gmail.com>
2015-08-16 16:42:08 -07:00
f209763357 blockservice.New doesnt need to return an error
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-08-14 16:25:51 -07:00
578fd02ce3 fuse unmount fixes
unmounting wasn't happening, mostly because of a recent bug in
goprocess.SetTeardown. This commit bumps up some messages to
log.Warnings, as users may want to see them, and makes sure to
Unmount when a node shuts down.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-29 01:36:50 -07:00
5513aabf78 core/mock: make sure node has a ctx and proc
License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-28 23:35:50 -07:00
a19ad97ea5 make ping its own protocol
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-07-13 19:19:25 -07:00
rht
0ceac5ded9 Use WithContextAndTeardown whenever possible
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-05 09:19:06 +07:00
rht
007a12e7ef Change Process interface into object variable
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 22:50:23 +07:00
rht
330b213777 Replace ctxgroup.ContextGroup -> goprocess.Process
License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
2015-07-04 22:50:23 +07:00
c595cf8ae0 config: DialBlocklist -> Swarm.AddrFilters
This commit changes the DialBlocklist key to be under the key
Swarm.AddrFilters instead.

License: MIT
Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
2015-07-02 16:11:46 -07:00
e7fd57f69a add filters from config to addr filter in swarm
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-30 15:03:56 -07:00
e01f8e4f22 add in basic address dial filtering
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
2015-06-23 01:29:29 -07:00
81572ec236 core/core: Refer back to the main go-ipfs docs
So folks looking in core can figure out how it fits into the
repository as a whole.
2015-05-02 08:18:08 -07:00
d2a28300a2 core/core: Explain that subpackages are our low-level API
Discussion in [1].

[1]: https://github.com/ipfs/go-ipfs/issues/1158
2015-04-30 21:57:46 -07:00
9e6866f52f hotfix: dont use nodes context because it might not be set yet 2015-04-30 14:16:49 -07:00
cf478af971 cleanup changes from PR 2015-04-22 01:25:22 -07:00
001b7ab714 implement a config option for mdns 2015-04-22 00:55:31 -07:00
0917c1cb82 implement basic peer discovery using mdns 2015-04-21 21:34:54 -07:00
31ff954539 Move IPNS resolutions into the core library
Move IPNS resolutions into the core library via the pathresolver.go
file. Fix the CLI commands to leverage this core component.
2015-04-20 01:04:30 -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
2c8cb9fc75 bandwidth metering on streams
humanize bandwidth output

instrument conn.Conn for bandwidth metrics

add poll command for continuous bandwidth reporting

move bandwidth tracking onto multiaddr net connections

another mild refactor of recording locations

address concerns from PR

lower mock nodes in race test due to increased goroutines per connection
2015-03-31 19:58:08 -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
7ad8dd8523 ignore bootstrap failures in namesys initialization 2015-03-17 21:57:57 -07:00
f679127d83 comments! and cleanup 2015-03-17 20:57:21 -07:00
eb228eb615 remove addCloser 2015-03-17 20:57:21 -07:00
9ab59e44ad implement in memory model for ipns filesystem, to be used as backing for ipns fuse interface 2015-03-17 20:57:20 -07:00
7fb63d7e43 move signing options into a validation checker struct 2015-02-26 22:05:03 -08: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
a29c0fc751 move blocking calls out of single threaded loops, cancel contexts ASAP 2015-02-19 06:04:39 +00:00
5253b6ab13 pass routed host into bitswap construction 2015-02-18 19:11:38 +00:00
6241c25984 make contructor code a little less magical 2015-02-18 19:11:33 +00:00
e40e5699f9 use a routedHost in the core node constructor 2015-02-18 18:56:57 +00:00
7a2545a14b implement nodebuilder 2015-02-11 21:47:07 +00:00
140c70d772 document some packages 2015-02-10 22:59:10 +00:00
8558838d00 fix(core) check nil for _all_ owned resources
since construction can fail, and construction is non-trivial, it's
probably safer to never assume resource exists.

cc @jbenet @whyrusleeping
2015-02-06 11:22:43 -07:00
581c4e558e cmds/id: show self addrs 2015-02-03 05:51:31 -08:00
e908effb4b AddrManager: use addr manager with smarter TTLs
This addr manager should seriously help with the addrsplosion
problem.
2015-02-02 21:04:14 -08:00
88fa7388de feat(core) add shutdown message 2015-02-01 21:54:20 -08:00
d0f9be56e7 refac(core) privatize method 2015-02-01 21:54:20 -08:00
1beef957da refac(core): expose core.OnlineWithRouting constructor option
fix FIXUP maybeRouter in core
2015-02-01 21:54:19 -08:00
c114b04ae1 feat(bitswap): synchronous close 2015-02-01 21:54:19 -08:00
29bf59dded bootstrap: use ipfsaddr for boostrap peers ⚠️
⚠️ this commit makes your current configs unusable, as the
default bootstrap peers. You may need to edit your config.

Go from:

```js
Bootstrap: [
  {
    "Address": "/ip4/104.131.131.82/tcp/4001",
    "PeerID": "QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
  }
]
```

To:
```js
Bootstrap: [
  "/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
]
```
2015-02-01 05:16:52 -08:00
7b85579d7a core: move online service init block into own func
addresses CR comments
2015-01-31 17:20:34 -08:00
1a3752b81f core: setup peerhost + listen separate steps
We had a problem: we were starting all the services with the network
live, and so would miss early messages. We were noticing bitswap
messages not handled (not in muxer). Many of the subsystems expect
the network to _exist_ when they start up, so we split construction
and starting to listen into two separate steps.
2015-01-30 20:37:53 -08:00
abb3c9c9c4 implement path type 2015-01-29 17:51:08 +00:00
f1267d0624 change ipns resolve/publish to store raw keys, not b58 encoded 2015-01-28 19:36:30 +00:00
76d9d89aff user friendliness in logs + output 2015-01-26 17:01:00 -08:00
ca757c66ff p2p/nat: managed by host now.
Exposing the NAT to the core is unnecessary. The Host can take
care of it. If a need emerges, we can address it then.
2015-01-26 14:00:00 -08:00
332d350196 p2p/nat: re-factors nat object
- allow retrieving addresses
- allow notifications on mapping changes
- allow lifecycle mgmt (future commit will manage it)
2015-01-26 13:45:02 -08:00