Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release v0.17.0 #9431

Merged
merged 21 commits into from
Nov 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
121 changes: 119 additions & 2 deletions docs/changelogs/v0.17.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,125 @@ More details in [go-libp2p release notes](https://github.com/libp2p/go-libp2p/re

### Changelog

<!-- TODO -->
<details><summary>Full Changelog</summary>

- github.com/ipfs/kubo:
- chore: bump version to v0.17.0 ([ipfs/kubo#9427](https://github.com/ipfs/kubo/pull/9427))
- chore: bump version to v0.17.0-rc2 ([ipfs/kubo#9414](https://github.com/ipfs/kubo/pull/9414))
- Doc improvements and changelog for resource manager (#9413) ([ipfs/kubo#9413](https://github.com/ipfs/kubo/pull/9413))
- fix(docs): typo
- docs: document /wss fixes in 0.17
- refactor(config): remove Swarm.ConnMgr defaults
- fix(config): skip nulls in ResourceMgr
- Apply go fmt
- Update core/node/libp2p/rcmgr_defaults.go
- Remove limitation by HighWater param.
- Fix RM errors when acceleratedDHT is active
- docs: Deprecate Reframe on docs. (#9401) ([ipfs/kubo#9401](https://github.com/ipfs/kubo/pull/9401))
- chore: bump version to v0.17.0-rc1 ([ipfs/kubo#9394](https://github.com/ipfs/kubo/pull/9394))
- feat: Improve ResourceManager UX (#9338) ([ipfs/kubo#9338](https://github.com/ipfs/kubo/pull/9338))
- feat: ipfs-webui 2.20.0
- docs: note log tail is broken (#9383) ([ipfs/kubo#9383](https://github.com/ipfs/kubo/pull/9383))
- feat(gateway): TAR response format (#9029) ([ipfs/kubo#9029](https://github.com/ipfs/kubo/pull/9029))
- fix: error when using huge json limit file
- chore: go-multicodec v0.7.0
- fix: remove old unused buggy coredag code
- feat: Add command line completion for fish
- chore: delete snap configuration ([ipfs/kubo#9352](https://github.com/ipfs/kubo/pull/9352))
- docs: update scoop package
- docs: init release issue template improvement process v0.16.0 ([ipfs/kubo#9283](https://github.com/ipfs/kubo/pull/9283))
- feat: add delegated routing metrics (#9354) ([ipfs/kubo#9354](https://github.com/ipfs/kubo/pull/9354))
- chore: create v0.17.md changelog ([ipfs/kubo#9353](https://github.com/ipfs/kubo/pull/9353))
- docs: pin remote arg
- feat: webui@v2.19.0
- test(car): export/import of (dag-)cbor/json codecs
- add refs local alias repo ls (#9320) ([ipfs/kubo#9320](https://github.com/ipfs/kubo/pull/9320))
- docs(cmds): Clarify block fetching of refs endpoint.
- chore(cmds): dag import: use ipld legacy decode ([ipfs/kubo#9219](https://github.com/ipfs/kubo/pull/9219))
- fix ipfs swarm peering crash in offline mode (#9261) ([ipfs/kubo#9261](https://github.com/ipfs/kubo/pull/9261))
- feat: remove provider delay interval in bitswap (#9053) ([ipfs/kubo#9053](https://github.com/ipfs/kubo/pull/9053))
- feat: --reset flag on swarm limit command (#9310) ([ipfs/kubo#9310](https://github.com/ipfs/kubo/pull/9310))
- fix: add InlineDNSLink flag to PublicGateways config (#9328) ([ipfs/kubo#9328](https://github.com/ipfs/kubo/pull/9328))
- docs: Fix typo and grammar in README
- ci: add stylecheck to golangci-lint (#9334) ([ipfs/kubo#9334](https://github.com/ipfs/kubo/pull/9334))
- Fix: `swarm stats all` command
- Merge release v0.16.0 back into master ([ipfs/kubo#9324](https://github.com/ipfs/kubo/pull/9324))
- fix: Set default Methods value to nil
- docs: add WebTransport docs ([ipfs/kubo#9314](https://github.com/ipfs/kubo/pull/9314))
- chore: bump version to 0.17.0-dev
- github.com/ipfs/go-delegated-routing (v0.6.0 -> v0.7.0):
- Release v0.7.0
- feat: add latency & count metrics for content routing client (#59) ([ipfs/go-delegated-routing#59](https://github.com/ipfs/go-delegated-routing/pull/59))
- docs: add basic readme ([ipfs/go-delegated-routing#57](https://github.com/ipfs/go-delegated-routing/pull/57))
- sync: update CI config files ([ipfs/go-delegated-routing#40](https://github.com/ipfs/go-delegated-routing/pull/40))
- added link to reframe blog post (#54) ([ipfs/go-delegated-routing#54](https://github.com/ipfs/go-delegated-routing/pull/54))
- github.com/ipfs/go-ipfs-files (v0.1.1 -> v0.2.0):
- Release v0.2.0
- fix: error when TAR has files outside of root (#56) ([ipfs/go-ipfs-files#56](https://github.com/ipfs/go-ipfs-files/pull/56))
- sync: update CI config files ([ipfs/go-ipfs-files#55](https://github.com/ipfs/go-ipfs-files/pull/55))
- chore(Directory): add DirIterator API restriction: iterate only once
- github.com/ipfs/go-unixfs (v0.4.0 -> v0.4.1):
- Update version.json
- Fix: panic when childer is nil (#127) ([ipfs/go-unixfs#127](https://github.com/ipfs/go-unixfs/pull/127))
- sync: update CI config files (#125) ([ipfs/go-unixfs#125](https://github.com/ipfs/go-unixfs/pull/125))
- github.com/ipld/go-ipld-prime (v0.18.0 -> v0.19.0):
- Prepare v0.19.0
- fix: correct json codec links & bytes handling
- test(basicnode): increase test coverage for int and map types (#454) ([ipld/go-ipld-prime#454](https://github.com/ipld/go-ipld-prime/pull/454))
- fix: remove reliance on ioutil
- run gofmt -s
- bump go.mod to Go 1.18 and run go fix
- feat: add kinded union to gendemo
- github.com/libp2p/go-libp2p (v0.23.2 -> v0.23.4):
- Release v0.23.4 (#1864) ([libp2p/go-libp2p#1864](https://github.com/libp2p/go-libp2p/pull/1864))
- release v0.23.3
- websocket: set the HTTP host header in WSS
- github.com/libp2p/go-netroute (v0.2.0 -> v0.2.1):
- v0.2.1 ([libp2p/go-netroute#27](https://github.com/libp2p/go-netroute/pull/27))
- fix(phys-addr-length): fix physical address length mismatch ([libp2p/go-netroute#29](https://github.com/libp2p/go-netroute/pull/29))
- compare priority if route rule's dst mask is same size
- compare priority if route rule's dst mask is same size
- sync: update CI config files (#24) ([libp2p/go-netroute#24](https://github.com/libp2p/go-netroute/pull/24))
- github.com/marten-seemann/qpack (v0.2.1 -> v0.3.0):
- update to Ginkgo v2 (#30) ([marten-seemann/qpack#30](https://github.com/marten-seemann/qpack/pull/30))
- return write error when encoding header fields (#28) ([marten-seemann/qpack#28](https://github.com/marten-seemann/qpack/pull/28))
- update Go versions (#29) ([marten-seemann/qpack#29](https://github.com/marten-seemann/qpack/pull/29))
- remove CircleCI build status from README
- add link to QPACK RFC to README
- remove build constraint from fuzzer ([marten-seemann/qpack#24](https://github.com/marten-seemann/qpack/pull/24))
- github.com/multiformats/go-multicodec (v0.6.0 -> v0.7.0):
- feat: update ./multicodec/table.csv ([multiformats/go-multicodec#71](https://github.com/multiformats/go-multicodec/pull/71))

</details>

### Contributors

<!-- TODO -->
| Contributor | Commits | Lines ± | Files Changed |
|-------------|---------|---------|---------------|
| Antonio Navarro Perez | 11 | +780/-987 | 31 |
| Marcin Rataj | 14 | +791/-543 | 26 |
| web3-bot | 7 | +393/-427 | 71 |
| galargh | 20 | +309/-277 | 21 |
| Gus Eggert | 5 | +358/-222 | 58 |
| Henrique Dias | 3 | +409/-30 | 13 |
| Dustin Long | 1 | +314/-0 | 2 |
| Marco Munizaga | 2 | +211/-46 | 11 |
| Rod Vagg | 4 | +188/-62 | 13 |
| Jorropo | 2 | +4/-219 | 5 |
| Steve Loeppky | 1 | +115/-72 | 4 |
| Andreas Källberg | 1 | +145/-5 | 5 |
| Lucas Molas | 3 | +76/-53 | 9 |
| snyh | 2 | +36/-18 | 2 |
| Piotr Galar | 2 | +31/-4 | 2 |
| Ondrej Kokes | 1 | +25/-4 | 2 |
| Marten Seemann | 6 | +14/-14 | 14 |
| Yann Autissier | 1 | +14/-4 | 1 |
| maxos | 1 | +8/-1 | 2 |
| reidlw | 1 | +1/-4 | 1 |
| Russell Dempsey | 2 | +4/-1 | 2 |
| Ian Davis | 1 | +4/-0 | 2 |
| Daniel Norman | 1 | +3/-1 | 1 |
| Will Scott | 1 | +1/-1 | 1 |
| Nikhilesh Susarla | 1 | +2/-0 | 2 |
| Jamie Wilkinson | 1 | +1/-1 | 1 |
| Will | 1 | +0/-1 | 1 |
61 changes: 13 additions & 48 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1305,8 +1305,7 @@ Contains options for content, peer, and IPNS routing mechanisms.
Map of additional Routers.

Allows for extending the default routing (DHT) with alternative Router
implementations, such as custom DHTs and delegated routing based
on the [reframe protocol](https://github.com/ipfs/specs/tree/main/reframe#readme).
implementations.

The map key is a name of a Router, and the value is its configuration.

Expand All @@ -1322,7 +1321,7 @@ It specifies the routing type that will be created.

Currently supported types:

- `reframe` (delegated routing based on the [reframe protocol](https://github.com/ipfs/specs/tree/main/reframe#readme))
- `reframe` **(DEPRECATED)** (delegated routing based on the [reframe protocol](https://github.com/ipfs/specs/tree/main/reframe#readme))
- `dht`
- `parallel` and `sequential`: Helpers that can be used to run several routers sequentially or in parallel.

Expand All @@ -1334,7 +1333,7 @@ Type: `string`

Parameters needed to create the specified router. Supported params per router type:

Reframe:
Reframe **(DEPRECATED)**:
- `Endpoint` (mandatory): URL that will be used to connect to a specified router.

DHT:
Expand All @@ -1357,21 +1356,6 @@ Sequential:
- `IgnoreErrors:bool`: It will specify if that router should be ignored if an error occurred.
- `Timeout:duration`: Global timeout. It accepts strings compatible with Go `time.ParseDuration(string)`.

**Examples:**

To add router provided by _Store the Index_ team at [cid.contact](https://cid.contact):

```console
$ ipfs config Routing.Routers.CidContact --json '{
"Type": "reframe",
"Parameters": {
"Endpoint": "https://cid.contact/reframe"
}
}'
```

Anyone can create and run their own Reframe endpoint, and experiment with custom routing logic. See [`someguy`](https://github.com/aschmahmann/someguy) example, which proxies requests to BOTH the IPFS Public DHT AND an Indexer node. Protocol Labs provides a public instance at `https://routing.delegate.ipfs.io/reframe`.

Default: `{}` (use the safe implicit defaults)

Type: `object[string->string]`
Expand All @@ -1387,44 +1371,25 @@ Type: `object[string->object]`

**Examples:**

To use the previously added `CidContact` reframe router on all methods:

```console
$ ipfs config Routing.Methods --json '{
"find-peers": {
"RouterName": "CidContact"
},
"find-providers": {
"RouterName": "CidContact"
},
"get-ipns": {
"RouterName": "CidContact"
},
"provide": {
"RouterName": "CidContact"
},
"put-ipns": {
"RouterName": "CidContact"
}
}'
```
Complete example using 3 Routers, reframe, DHT and parallel.
Complete example using 2 Routers, DHT (LAN/WAN) and parallel.

```
$ ipfs config Routing.Type --json '"custom"'

$ ipfs config Routing.Routers.CidContact --json '{
"Type": "reframe",
$ ipfs config Routing.Routers.WanDHT --json '{
"Type": "dht",
"Parameters": {
"Endpoint": "https://cid.contact/reframe"
"Mode": "auto",
"PublicIPNetwork": true,
"AcceleratedDHTClient": false
}
}'

$ ipfs config Routing.Routers.WanDHT --json '{
$ ipfs config Routing.Routers.LanDHT --json '{
"Type": "dht",
"Parameters": {
"Mode": "auto",
"PublicIPNetwork": true,
"PublicIPNetwork": false,
"AcceleratedDHTClient": false
}
}'
Expand All @@ -1434,7 +1399,7 @@ $ ipfs config Routing.Routers.ParallelHelper --json '{
"Parameters": {
"Routers": [
{
"RouterName" : "CidContact",
"RouterName" : "LanDHT",
"IgnoreErrors" : true,
"Timeout": "3s"
},
Expand All @@ -1459,7 +1424,7 @@ ipfs config Routing.Methods --json '{
"RouterName": "ParallelHelper"
},
"provide": {
"RouterName": "WanDHT"
"RouterName": "ParallelHelper"
},
"put-ipns": {
"RouterName": "ParallelHelper"
Expand Down