mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 03:17:43 +08:00
feat(gateway): support for ipip-412 parameters
This commit is contained in:
parent
1fe17a4165
commit
a8c63537f2
@ -6,6 +6,7 @@
|
||||
|
||||
- [Overview](#overview)
|
||||
- [🔦 Highlights](#-highlights)
|
||||
- [Gateway: support for `order=` and `dups=` parameters (IPIP-412)](#gateway-support-for-order-and-dups-parameters-ipip-412)
|
||||
- [`ipfs name publish` now supports V2 only IPNS records](#ipfs-name-publish-now-supports-v2-only-ipns-records)
|
||||
- [📝 Changelog](#-changelog)
|
||||
- [👨👩👧👦 Contributors](#-contributors)
|
||||
@ -14,6 +15,28 @@
|
||||
|
||||
### 🔦 Highlights
|
||||
|
||||
#### Gateway: support for `order=` and `dups=` parameters (IPIP-412)
|
||||
|
||||
The updated [`boxo/gateway` library](https://github.com/ipfs/boxo/tree/main/gateway)
|
||||
introduces support for ordered CAR responses through the inclusion of optional
|
||||
CAR content type parameters: `order=dfs` and `dups=y|n` from
|
||||
[IPIP-412](https://github.com/ipfs/specs/pull/412).
|
||||
|
||||
Previously, Kubo already provided CARs in DFS order without duplicate blocks.
|
||||
With the implementation of IPIP-412, this behavior is now explicitly defined
|
||||
rather than implied.
|
||||
|
||||
In the absence of `dups` or `order` in `Accept` request reader, the default CAR
|
||||
response will have the `Content-Type: application/vnd.ipld.car; version=1; order=dfs; dups=n`
|
||||
and the same blocks as Kubo 0.21.
|
||||
|
||||
Kubo 0.22 still only supports DFS block ordering (`order=dfs`). However, it is
|
||||
now possible to request a DFS CAR stream with duplicate blocks by opting in via
|
||||
`Accept: application/vnd.ipld.car; order=dfs; dups=y`. This opt-in feature can be
|
||||
beneficial for memory-constrained clients and IoT devices, as it allows for
|
||||
streaming large DAGs without the need to store all previously encountered
|
||||
blocks in memory.
|
||||
|
||||
#### `ipfs name publish` now supports V2 only IPNS records
|
||||
|
||||
When publishing an IPNS record, you are now able to create v2 only records
|
||||
|
||||
@ -7,7 +7,7 @@ go 1.18
|
||||
replace github.com/ipfs/kubo => ./../../..
|
||||
|
||||
require (
|
||||
github.com/ipfs/boxo v0.10.2-0.20230629140307-fdad9f921191
|
||||
github.com/ipfs/boxo v0.10.3-0.20230724084731-f6b448b4263a
|
||||
github.com/ipfs/kubo v0.0.0-00010101000000-000000000000
|
||||
github.com/libp2p/go-libp2p v0.27.7
|
||||
github.com/multiformats/go-multiaddr v0.9.0
|
||||
|
||||
@ -320,8 +320,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
|
||||
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
|
||||
github.com/ipfs/boxo v0.10.2-0.20230629140307-fdad9f921191 h1:oNiEZXJYb4B6zmvUc3F5vvS4xtll8naN8rz1hKftgd4=
|
||||
github.com/ipfs/boxo v0.10.2-0.20230629140307-fdad9f921191/go.mod h1:8IfDmp+FzFGcF4zjAgHMVPpwYw4AjN9ePEzDfkaYJ1w=
|
||||
github.com/ipfs/boxo v0.10.3-0.20230724084731-f6b448b4263a h1:eDO++KVTMF7wNqHHhNCZnW/Ocf2K6zCSizAbWoIMREo=
|
||||
github.com/ipfs/boxo v0.10.3-0.20230724084731-f6b448b4263a/go.mod h1:8IfDmp+FzFGcF4zjAgHMVPpwYw4AjN9ePEzDfkaYJ1w=
|
||||
github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA=
|
||||
github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU=
|
||||
github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY=
|
||||
|
||||
2
go.mod
2
go.mod
@ -15,7 +15,7 @@ require (
|
||||
github.com/fsnotify/fsnotify v1.6.0
|
||||
github.com/google/uuid v1.3.0
|
||||
github.com/hashicorp/go-multierror v1.1.1
|
||||
github.com/ipfs/boxo v0.10.2-0.20230629140307-fdad9f921191
|
||||
github.com/ipfs/boxo v0.10.3-0.20230724084731-f6b448b4263a
|
||||
github.com/ipfs/go-block-format v0.1.2
|
||||
github.com/ipfs/go-cid v0.4.1
|
||||
github.com/ipfs/go-cidutil v0.1.0
|
||||
|
||||
4
go.sum
4
go.sum
@ -355,8 +355,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
|
||||
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
|
||||
github.com/ipfs/boxo v0.10.2-0.20230629140307-fdad9f921191 h1:oNiEZXJYb4B6zmvUc3F5vvS4xtll8naN8rz1hKftgd4=
|
||||
github.com/ipfs/boxo v0.10.2-0.20230629140307-fdad9f921191/go.mod h1:8IfDmp+FzFGcF4zjAgHMVPpwYw4AjN9ePEzDfkaYJ1w=
|
||||
github.com/ipfs/boxo v0.10.3-0.20230724084731-f6b448b4263a h1:eDO++KVTMF7wNqHHhNCZnW/Ocf2K6zCSizAbWoIMREo=
|
||||
github.com/ipfs/boxo v0.10.3-0.20230724084731-f6b448b4263a/go.mod h1:8IfDmp+FzFGcF4zjAgHMVPpwYw4AjN9ePEzDfkaYJ1w=
|
||||
github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA=
|
||||
github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU=
|
||||
github.com/ipfs/go-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ=
|
||||
|
||||
@ -7,7 +7,7 @@ replace github.com/ipfs/kubo => ../../
|
||||
require (
|
||||
github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd
|
||||
github.com/golangci/golangci-lint v1.49.0
|
||||
github.com/ipfs/boxo v0.10.2-0.20230629140307-fdad9f921191
|
||||
github.com/ipfs/boxo v0.10.3-0.20230724084731-f6b448b4263a
|
||||
github.com/ipfs/go-cid v0.4.1
|
||||
github.com/ipfs/go-cidutil v0.1.0
|
||||
github.com/ipfs/go-datastore v0.6.0
|
||||
|
||||
@ -415,8 +415,8 @@ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NH
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs=
|
||||
github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0=
|
||||
github.com/ipfs/boxo v0.10.2-0.20230629140307-fdad9f921191 h1:oNiEZXJYb4B6zmvUc3F5vvS4xtll8naN8rz1hKftgd4=
|
||||
github.com/ipfs/boxo v0.10.2-0.20230629140307-fdad9f921191/go.mod h1:8IfDmp+FzFGcF4zjAgHMVPpwYw4AjN9ePEzDfkaYJ1w=
|
||||
github.com/ipfs/boxo v0.10.3-0.20230724084731-f6b448b4263a h1:eDO++KVTMF7wNqHHhNCZnW/Ocf2K6zCSizAbWoIMREo=
|
||||
github.com/ipfs/boxo v0.10.3-0.20230724084731-f6b448b4263a/go.mod h1:8IfDmp+FzFGcF4zjAgHMVPpwYw4AjN9ePEzDfkaYJ1w=
|
||||
github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA=
|
||||
github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU=
|
||||
github.com/ipfs/go-block-format v0.1.2 h1:GAjkfhVx1f4YTODS6Esrj1wt2HhrtwTnhEr+DyPUaJo=
|
||||
|
||||
Loading…
Reference in New Issue
Block a user