You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ipns/ipns-record.md
+16-11Lines changed: 16 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -239,7 +239,7 @@ IPNS implementations MUST support sending and receiving a serialized
239
239
`IpnsEntry` less than or equal to **10 KiB** in size.
240
240
241
241
Records over the limit MAY be ignored. Handling records larger than the
242
-
limit is not recommended so as to keep compatibility with implementations and
242
+
limit is not recommended to keep compatibility with implementations and
243
243
transports that follow this specification.
244
244
245
245
### Backward Compatibility
@@ -316,7 +316,7 @@ Creating a new IPNS record MUST follow the below steps:
316
316
serialized copy in `IpnsEntry.pubKey`
317
317
318
318
- This step SHOULD be skipped for Ed25519, and any other key types that are
319
-
small enough (32 bytes) to be inlined inside of [IPNS Name](#ipns-name) itself.
319
+
small enough (32 bytes) to be inlined inside [IPNS Name](#ipns-name) itself.
320
320
321
321
5. Create `IpnsEntry.signatureV2`
322
322
@@ -327,10 +327,9 @@ Creating a new IPNS record MUST follow the below steps:
327
327
- Sign concatenated bytes from the previous step using the private key, and
328
328
store the signature in `IpnsEntry.signatureV2`
329
329
330
-
7. Confirm that the serialized `IpnsEntry` bytes sum to less than or equal to
330
+
6. Confirm that the serialized `IpnsEntry` bytes sum to less than or equal to
331
331
[the size limit](#record-size-limit).
332
332
333
-
334
333
Created `IpnsEntry` protobuf includes signed `data` CBOR and optional public key:
335
334
336
335
```protobuf
@@ -357,14 +356,14 @@ the [DAG-CBOR specification](https://ipld.io/specs/codecs/dag-cbor/spec/):
357
356
}
358
357
```
359
358
360
-
#### Record Creation: V1+V2 with Legacy V1 Signature
359
+
#### Record Creationwith Legacy SignatureV1
361
360
362
361
:::warning
363
362
364
363
Fields related to `signatureV1` has been deprecated since 2021.
365
364
V1 signatures are no longer used during record validation.
366
365
367
-
However it may be necessary to create a V1+V2 record that allows legacy
366
+
However, it may be necessary to create a V2+V1 record that allows legacy
368
367
software to use IPNS to upgrade itself to the latest version which supports V2
369
368
signatures. In such case, follow the steps below.
370
369
@@ -378,7 +377,7 @@ signatures. In such case, follow the steps below.
378
377
- If you want to store additional metadata in the record, add it under unique keys at `IpnsEntry.data`.
379
378
- The order of fields impacts signature verification. If you are using an alternative CBOR implementation, make sure the CBOR field order follows :cite[rfc7049] sorting rules: length and then bytewise. The order of fields impacts signature verification.
380
379
4. If your public key can't be inlined inside the IPNS Name, include a serialized copy in `IpnsEntry.pubKey`
381
-
- This step SHOULD be skipped for Ed25519, and any other key types that are inlined inside of [IPNS Name](#ipns-name) itself.
380
+
- This step SHOULD be skipped for Ed25519, and any other key types that are inlined inside [IPNS Name](#ipns-name) itself.
382
381
5. Create `IpnsEntry.signatureV2`
383
382
- Create bytes for signing by concatenating `ipns-signature:` prefix (bytes in hex: `69706e732d7369676e61747572653a`) with raw CBOR bytes from `IpnsEntry.data`
384
383
- Sign concatenated bytes from the previous step using the private key, and store the signature in `IpnsEntry.signatureV2`
@@ -420,11 +419,13 @@ Implementations MUST ensure `IpnsEntry.signatureV2` is used instead.
420
419
421
420
Value from `IpnsEntry.value` MUST never be used unless it is the same as signed `IpnsEntry.data[Value]`.
422
421
423
-
## Integration with IPFS
422
+
## Appendix: Notes for Implementers
423
+
424
+
### Integration with IPFS
424
425
425
426
Below are additional notes for implementers, documenting how IPNS is integrated within IPFS ecosystem.
426
427
427
-
### Local Record
428
+
####Local Record
428
429
429
430
This record is stored in the peer's repo datastore and contains the **latest** version of the IPNS record published by the provided key. This record is useful for republishing, as well as tracking the sequence number.
430
431
A legacy convention that implementers MAY want to follow is to store serialized `IpnsEntry` under:
@@ -433,7 +434,7 @@ A legacy convention that implementers MAY want to follow is to store serialized
433
434
434
435
Note: Base32 according to the :cite[rfc4648].
435
436
436
-
### Routing Record
437
+
####Routing Record
437
438
438
439
The routing record is spread across the network according to the available routing systems.
439
440
The two routing systems currently available in IPFS are the [libp2p Kademlia DHT](https://github.com/libp2p/specs/tree/master/kad-dht) and :cite[ipns-pubsub-router].
@@ -445,7 +446,11 @@ The two routing systems currently available in IPFS are the [libp2p Kademlia DHT
445
446
446
447
As the `pubsub` topics must be `utf-8` for interoperability among different implementations, IPNS over PubSub topics use additional wrapping `/record/base64url-unpadded(key)`
447
448
448
-
### Implementations
449
+
#### Reference Implementations
450
+
451
+
When language-specific nuances are not covered by this specification, consider
452
+
below reference implementations as the baseline for making decisions around
0 commit comments