Skip to content

Commit 7d17622

Browse files
committed
refactor: legacy-cid-v1 → test-cid-v1
keeping old name to minimize noise, just document pre-existing defaults
1 parent 318b8e7 commit 7d17622

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

config/profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ fetching may be degraded.
279279
return nil
280280
},
281281
},
282-
"legacy-cid-v1": {
282+
"test-cid-v1": {
283283
Description: `Makes UnixFS import produce legacy CIDv1 with the same suboptimal settings as legacy-cid-v0, but with 1MiB file chunk, CIDv1 and raw leaves. Use only if legacy behavior is required.`,
284284
Transform: func(c *Config) error {
285285
c.Import.CidVersion = *NewOptionalInteger(1)

docs/changelogs/v0.35.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ You can set default values for these options using the following configuration s
7070
##### Updated Configuration Profiles
7171

7272
The release updated configuration [profiles](https://github.com/ipfs/kubo/blob/master/docs/config.md#profile) to incorporate these new `Import.*` settings:
73-
- Renamed Profile: `test-cid-v1` is now `legacy-cid-v1`. This profile locks in current defaults, ensuring stability for users who prefer unchanged behavior in future releases.
73+
- Updated Profile: `test-cid-v1` now includes current defaults as explicit `Import.UnixFSFileMaxLinks=174`, `Import.UnixFSDirectoryMaxLinks=0`, `Import.UnixFSHAMTDirectoryMaxFanout=256` and `Import.UnixFSHAMTDirectorySizeThreshold=256KiB`
7474
- New Profile: `test-cid-v1-2025-v35` adopts modern defaults, increasing the maximum file DAG width from 174 to 1024 and raising the HAMT directory sharding threshold from 256KiB to 1MiB, aligning with 1MiB file chunks.
7575
- Benefits: Larger blocks (256KiB to 1MiB) enable up to 4x faster Amino DHT announcements and lookups.
7676
- Status: This profile is a candidate for future default settings.

test/cli/add_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,20 +226,20 @@ func TestAdd(t *testing.T) {
226226
})
227227
})
228228

229-
t.Run("ipfs init --profile=legacy-cid-v1 produces CIDv1 with raw leaves", func(t *testing.T) {
229+
t.Run("ipfs init --profile=test-cid-v1 produces CIDv1 with raw leaves", func(t *testing.T) {
230230
t.Parallel()
231-
node := harness.NewT(t).NewNode().Init("--profile=legacy-cid-v1")
231+
node := harness.NewT(t).NewNode().Init("--profile=test-cid-v1")
232232
node.StartDaemon()
233233
defer node.StopDaemon()
234234

235235
cidStr := node.IPFSAddStr(shortString)
236236
require.Equal(t, shortStringCidV1, cidStr) // raw leaf
237237
})
238238

239-
t.Run("ipfs init --profile=legacy-cid-v1 applies UnixFSChunker=size-1048576", func(t *testing.T) {
239+
t.Run("ipfs init --profile=test-cid-v1 applies UnixFSChunker=size-1048576", func(t *testing.T) {
240240
t.Parallel()
241241
seed := "v1-seed"
242-
profile := "--profile=legacy-cid-v1"
242+
profile := "--profile=test-cid-v1"
243243

244244
t.Run("under UnixFSFileMaxLinks=174", func(t *testing.T) {
245245
t.Parallel()
@@ -271,10 +271,10 @@ func TestAdd(t *testing.T) {
271271
})
272272
})
273273

274-
t.Run("ipfs init --profile=legacy-cid-v1 applies UnixFSHAMTDirectoryMaxFanout=256 and UnixFSHAMTDirectorySizeThreshold=256KiB", func(t *testing.T) {
274+
t.Run("ipfs init --profile=test-cid-v1 applies UnixFSHAMTDirectoryMaxFanout=256 and UnixFSHAMTDirectorySizeThreshold=256KiB", func(t *testing.T) {
275275
t.Parallel()
276-
seed := "hamt-legacy-cid-v1"
277-
profile := "--profile=legacy-cid-v1"
276+
seed := "hamt-cid-v1"
277+
profile := "--profile=test-cid-v1"
278278

279279
t.Run("under UnixFSHAMTDirectorySizeThreshold=256KiB", func(t *testing.T) {
280280
t.Parallel()
@@ -313,7 +313,7 @@ func TestAdd(t *testing.T) {
313313
// Confirm this time, the number of links is less than UnixFSHAMTDirectoryMaxFanout=256
314314
root, err := node.InspectPBNode(cidStr)
315315
assert.NoError(t, err)
316-
require.Equal(t, 245, len(root.Links))
316+
require.Equal(t, 252, len(root.Links))
317317
})
318318
})
319319

@@ -354,7 +354,7 @@ func TestAdd(t *testing.T) {
354354

355355
t.Run("ipfs init --profile=test-cid-v1-2025-v35 applies UnixFSHAMTDirectoryMaxFanout=256 and UnixFSHAMTDirectorySizeThreshold=1MiB", func(t *testing.T) {
356356
t.Parallel()
357-
seed := "hamt-legacy-cid-v1"
357+
seed := "hamt-cid-v1"
358358
profile := "--profile=test-cid-v1-2025-v35"
359359

360360
t.Run("under UnixFSHAMTDirectorySizeThreshold=1MiB", func(t *testing.T) {

0 commit comments

Comments
 (0)