From 942569e103b3c4969abaada656b69c63762a3f7c Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 25 Jan 2023 10:05:18 +0100 Subject: [PATCH 1/2] docs: add suggested default 12h for IPNS Entry TTL --- src/ipns/ipns-record.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ipns/ipns-record.md b/src/ipns/ipns-record.md index d5b279362..7083bf62a 100644 --- a/src/ipns/ipns-record.md +++ b/src/ipns/ipns-record.md @@ -3,7 +3,7 @@ title: IPNS Record and Protocol description: > Specifies the IPNS protocol in a language-agnostic manner, allowing everyone to create a compatible IPNS Record Publisher or Resolver. -date: 2023-07-24 +date: 2023-10-03 maturity: reliable editors: - name: Vasco Santos @@ -151,8 +151,10 @@ A logical :dfn[IPNS Record] is a data structure containing the following fields: - Implementations MUST include this value in inside the DAG-CBOR document at `IpnsEntry.data[Sequence]`. - **TTL** (uint64) - - A hint for how long the record should be cached before going back to, for instance the DHT, in order to check if it has been updated. + - A hint for how long (in nanoseconds) the record should be cached before going back to, for instance the DHT, in order to check if it has been updated. - Implementations MUST include this value inside the DAG-CBOR document at `IpnsEntry.data[TTL]`. + - Suggested default: 1 hour (3 600 000 000 000 nanoseconds). + - **Public Key** (bytes) - Public key used to sign this record. From f68df0cbdeaddea8e5efc33d85ac54e43e929017 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 3 Oct 2023 16:26:31 +0200 Subject: [PATCH 2/2] ipns-record: fix lint, add context for ttl --- src/ipns/ipns-record.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ipns/ipns-record.md b/src/ipns/ipns-record.md index 7083bf62a..d0bfaf89d 100644 --- a/src/ipns/ipns-record.md +++ b/src/ipns/ipns-record.md @@ -151,11 +151,10 @@ A logical :dfn[IPNS Record] is a data structure containing the following fields: - Implementations MUST include this value in inside the DAG-CBOR document at `IpnsEntry.data[Sequence]`. - **TTL** (uint64) - - A hint for how long (in nanoseconds) the record should be cached before going back to, for instance the DHT, in order to check if it has been updated. + - A hint for how long (in nanoseconds) the record should be cached before going back to, for instance the DHT, in order to check if it has been updated. The function and trade-offs of this value are analogous to the TTL of DNS record. - Implementations MUST include this value inside the DAG-CBOR document at `IpnsEntry.data[TTL]`. - Suggested default: 1 hour (3 600 000 000 000 nanoseconds). - - **Public Key** (bytes) - Public key used to sign this record. - If public key is small enough to fit in IPNS name (e.g., Ed25519 keys inlined using `identity` multihash), `IpnsEntry.pubKey` field is redundant and MAY be skipped to save space.