Skip to content

Commit

Permalink
Merge branch 'master' into ajnavarro/swarm-peering-save
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnavarro authored Dec 5, 2022
2 parents bfd17bd + a4594fb commit e24d048
Show file tree
Hide file tree
Showing 21 changed files with 509 additions and 420 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Kubo Changelogs

- [v0.17](docs/changelogs/v0.17.md)
- [v0.16](docs/changelogs/v0.16.md)
- [v0.15](docs/changelogs/v0.15.md)
- [v0.14](docs/changelogs/v0.14.md)
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Note: when updating the go minor version here, also update the go-channel in snap/snapcraft.yml
FROM golang:1.19.1-buster
LABEL maintainer="Steven Allen <steven@stebalien.com>"

Expand Down
29 changes: 7 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## What is Kubo?

Kubo was the first IPFS implementation and is the most widely used one today. Implementing the *Interplanetary Filesystem* - the Web3 standard and contender to replace https. Thus powered by IPLD's data models and the libp2p for network communication. Kubo is written in Go.
Kubo was the first IPFS implementation and is the most widely used one today. Implementing the *Interplanetary Filesystem* - the Web3 standard for content-addressing, interoperable with HTTP. Thus powered by IPLD's data models and the libp2p for network communication. Kubo is written in Go.

Featureset
- Runs an IPFS-Node as a network service
Expand Down Expand Up @@ -216,22 +216,7 @@ $ guix package -i go-ipfs

#### Snap

> ⚠️ **SNAP USE IS DISCOURAGED**
>
> If you want something more sophisticated to escape the Snap confinement, we recommend using a different method to install Kubo so that it is not subject to snap confinement.

With snap, in any of the [supported Linux distributions](https://snapcraft.io/docs/core/install):

```
$ sudo snap install ipfs
```

The snap sets `IPFS_PATH` to `SNAP_USER_COMMON`, which is usually `~/snap/ipfs/common`. If you want to use `~/.ipfs` instead, you can bind-mount it to `~/snap/ipfs/common` like this:

```
$ sudo mount --bind ~/.ipfs ~/snap/ipfs/common
```
No longer supported, see rationale in [kubo#8688](https://github.com/ipfs/kubo/issues/8688).

#### MacPorts

Expand Down Expand Up @@ -266,11 +251,7 @@ $ brew install --formula ipfs

#### Chocolatey

[![Chocolatey Version](https://img.shields.io/chocolatey/v/go-ipfs?color=00a4ef&label=go-ipfs&logo=windows&style=flat-square&cacheSeconds=3600)](https://chocolatey.org/packages/go-ipfs)

```Powershell
PS> choco install go-ipfs
```
No longer supported, see rationale in [kubo#9341](https://github.com/ipfs/kubo/issues/9341).

#### Scoop

Expand Down Expand Up @@ -378,6 +359,10 @@ Basic proof of 'ipfs working' locally:
# QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
ipfs cat <that hash>

### HTTP/RPC clients

For programmatic interaction with Kubo, see our [list of HTTP/RPC clients](docs/http-rpc-clients.md).

### Troubleshooting

If you have previously installed IPFS before and you are running into problems getting a newer version to work, try deleting (or backing up somewhere else) your IPFS config directory (~/.ipfs by default) and rerunning `ipfs init`. This will reinitialize the config file to its defaults and clear out the local datastore of any bad entries.
Expand Down
9 changes: 8 additions & 1 deletion bin/mkreleaselog
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ recursive_release_log() {

printf -- "Generating Changelog for %s %s..%s\n" "$module" "$start" "$end" >&2

echo "### Changelog"
echo
echo "<details><summary>Full Changelog</summary>"
echo

printf -- "- %s:\n" "$module"
release_log "$module" "$start" "$end" | indent

Expand All @@ -286,7 +291,9 @@ recursive_release_log() {
done

echo
echo "Contributors"
echo "</details>"
echo
echo "### Contributors"
echo

echo "| Contributor | Commits | Lines ± | Files Changed |"
Expand Down
4 changes: 4 additions & 0 deletions config/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ type PubsubConfig struct {

// Enable pubsub (--enable-pubsub-experiment)
Enabled Flag `json:",omitempty"`

// SeenMessagesTTL configures the duration after which a previously seen
// message ID can be forgotten about.
SeenMessagesTTL *OptionalDuration `json:",omitempty"`
}
1 change: 1 addition & 0 deletions core/node/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
pubsubOptions = append(
pubsubOptions,
pubsub.WithMessageSigning(!cfg.Pubsub.DisableSigning),
pubsub.WithSeenMessagesTTL(cfg.Pubsub.SeenMessagesTTL.WithDefault(pubsub.TimeCacheDuration)),
)

switch cfg.Pubsub.Router {
Expand Down
28 changes: 25 additions & 3 deletions core/node/libp2p/rcmgr_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,31 @@ func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error)
StreamsOutbound: 0,
},

// Just go with what libp2p does
TransientBaseLimit: rcmgr.DefaultLimits.TransientBaseLimit,
TransientLimitIncrease: rcmgr.DefaultLimits.TransientLimitIncrease,
TransientBaseLimit: rcmgr.BaseLimit{
Memory: rcmgr.DefaultLimits.TransientBaseLimit.Memory,
FD: rcmgr.DefaultLimits.TransientBaseLimit.FD,

Conns: bigEnough,
ConnsInbound: rcmgr.DefaultLimits.TransientBaseLimit.ConnsInbound,
ConnsOutbound: bigEnough,

Streams: bigEnough,
StreamsInbound: rcmgr.DefaultLimits.TransientBaseLimit.StreamsInbound,
StreamsOutbound: bigEnough,
},

TransientLimitIncrease: rcmgr.BaseLimitIncrease{
Memory: rcmgr.DefaultLimits.TransientLimitIncrease.Memory,
FDFraction: rcmgr.DefaultLimits.TransientLimitIncrease.FDFraction,

Conns: 0,
ConnsInbound: rcmgr.DefaultLimits.TransientLimitIncrease.ConnsInbound,
ConnsOutbound: 0,

Streams: 0,
StreamsInbound: rcmgr.DefaultLimits.TransientLimitIncrease.StreamsInbound,
StreamsOutbound: 0,
},

// Lets get out of the way of the allow list functionality.
// If someone specified "Swarm.ResourceMgr.Allowlist" we should let it go through.
Expand Down
2 changes: 1 addition & 1 deletion core/node/libp2p/rcmgr_logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (n *loggingResourceManager) start(ctx context.Context) {
n.limitExceededErrs = make(map[string]int)

for e, count := range errs {
n.logger.Errorf("Resource limits were exceeded %d times with error %q.", count, e)
n.logger.Errorf("Protected from exceeding resource limits %d times: %q.", count, e)
}

if len(errs) != 0 {
Expand Down
2 changes: 1 addition & 1 deletion core/node/libp2p/rcmgr_logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestLoggingResourceManager(t *testing.T) {
if oLogs.Len() == 0 {
continue
}
require.Equal(t, "Resource limits were exceeded 2 times with error \"system: cannot reserve inbound connection: resource limit exceeded\".", oLogs.All()[0].Message)
require.Equal(t, "Protected from exceeding resource limits 2 times: \"system: cannot reserve inbound connection: resource limit exceeded\".", oLogs.All()[0].Message)
return
}
}
Expand Down
2 changes: 0 additions & 2 deletions docs/PATCH_RELEASE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ This process handles patch releases from version `vX.Y.Z` to `vX.Y.Z+1` assuming
- [ ] Release published
- [ ] to [dist.ipfs.tech](https://dist.ipfs.tech)
- [ ] to [npm-go-ipfs](https://www.npmjs.com/package/go-ipfs) (should be done by [ipfs/npm-go-ipfs](https://github.com/ipfs/npm-go-ipfs), but ok to dispatch [this job](https://github.com/ipfs/npm-go-ipfs/actions/workflows/main.yml) manually)
- [ ] to [chocolatey](https://chocolatey.org/packages/go-ipfs) (should be done by [ipfs/choco-go-ipfs](https://github.com/ipfs/choco-go-ipfs/), but ok to dispatch [this job](https://github.com/ipfs/choco-go-ipfs/actions/workflows/main.yml) manually)
- [ ] to [snap](https://snapcraft.io/ipfs) (should happen automatically, see [snap/snapcraft.yaml](https://github.com/ipfs/kubo/blob/master/snap/snapcraft.yaml))
- [ ] to [github](https://github.com/ipfs/kubo/releases)
- [ ] to [arch](https://www.archlinux.org/packages/community/x86_64/go-ipfs/) (flag it out of date)
- [ ] Cut a new ipfs-desktop release
Expand Down
Loading

0 comments on commit e24d048

Please sign in to comment.