From a937f96a4c74a5f0c45d2da8aaea12072a0f4d07 Mon Sep 17 00:00:00 2001 From: Gabe <7622243+decentralgabe@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:00:53 -0500 Subject: [PATCH 1/3] Update image-publish.yml --- .github/workflows/image-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/image-publish.yml b/.github/workflows/image-publish.yml index acebfaf1..d41f351b 100644 --- a/.github/workflows/image-publish.yml +++ b/.github/workflows/image-publish.yml @@ -55,8 +55,8 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: - context: . - file: impl/build/Dockerfile + context: impl + file: build/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} From 346f1b743b69a670adcfb7915900dbc49ce59557 Mon Sep 17 00:00:00 2001 From: Gabe <7622243+decentralgabe@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:03:42 -0500 Subject: [PATCH 2/3] Update image-publish.yml --- .github/workflows/image-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/image-publish.yml b/.github/workflows/image-publish.yml index d41f351b..aa6f2377 100644 --- a/.github/workflows/image-publish.yml +++ b/.github/workflows/image-publish.yml @@ -56,7 +56,7 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: impl - file: build/Dockerfile + file: impl/build/Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From d8a0ce70b12ac7914fe6489ced7d30088091635a Mon Sep 17 00:00:00 2001 From: Andres Uribe Date: Fri, 20 Oct 2023 14:08:07 -0400 Subject: [PATCH 3/3] simple typos (#6) * simple typos * Apply suggestions from code review --------- Co-authored-by: Gabe <7622243+decentralgabe@users.noreply.github.com> --- spec.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/spec.md b/spec.md index f301a983..17b42ed8 100644 --- a/spec.md +++ b/spec.md @@ -14,7 +14,7 @@ As Pkarr states, mainline is chosen for the following reasons (paraphased): # Format -The format for `did:dht` conforms to the [DID Core](https://www.w3.org/TR/did-core/) specification. It consists of the `did:pk` prefix followed by the Pkarr identifier. The Pkarr identifier is a [z-base-32](https://en.wikipedia.org/wiki/Base32#z-base-32) encoded [Ed25519](https://ed25519.cr.yp.to/) public key. +The format for `did:dht` conforms to the [DID Core](https://www.w3.org/TR/did-core/) specification. It consists of the `did:dht` prefix followed by the Pkarr identifier. The Pkarr identifier is a [z-base-32](https://en.wikipedia.org/wiki/Base32#z-base-32) encoded [Ed25519](https://ed25519.cr.yp.to/) public key. ``` did-dht-format := did:dht: @@ -38,15 +38,15 @@ To create a `did:dht`, the process is as follows: 1. Create an [Ed25519](https://ed25519.cr.yp.to/) keypair and encode the public key using the format provided in the [prior section](#Format). 2. Construct a compliant JSON representation of a DID Document - a. The document **MUST** include a [verification method](https://www.w3.org/TR/did-core/#verification-methods) with the _identifier key_ encoded as a `publicKeyJwk` with an `id` of ``#0`` and `type` of [`JsonWebKey2020`](https://www.w3.org/community/reports/credentials/CG-FINAL-lds-jws2020-20220721/#json-web-key-2020). - b. The document can include any number of other [core properties](https://www.w3.org/TR/did-core/#core-properties); always representing key material as a [JWK](https://datatracker.ietf.org/doc/html/rfc7517). - + + a. The document **MUST** include a [verification method](https://www.w3.org/TR/did-core/#verification-methods) with the _identifier key_ encoded as a `publicKeyJwk` with an `id` of ``#0`` and `type` of [`JsonWebKey2020`](https://www.w3.org/community/reports/credentials/CG-FINAL-lds-jws2020-20220721/#json-web-key-2020). + + b. The document can include any number of other [core properties](https://www.w3.org/TR/did-core/#core-properties); always representing key material as a [JWK](https://datatracker.ietf.org/doc/html/rfc7517). 3. Map the output DID Document to a DNS packet as outlined in the [section below](#DNS-Packet-DID-document). 4. Construct a [BEP44 put message](https://www.bittorrent.org/beps/bep_0044.html) with the `v` value as a DNS packet from the previous step. - 5. Submit the result of (3) to the DHT, a Pkarr, or DID DHT service. @@ -72,7 +72,7 @@ It might look like repeating `_did` is an overhead, but these can be compressed The DNS packet must set the `Authoritative Answer` flag, since this is always an `Authoritative` packet. -The DID identifier z-base32 key should be appended as the Origin of all records, which won't cost much thanks to the name compression in DNS packets, so `_did` should be saved as `_did.o4dksfbqk85ogzdb5osziw6befigbuxmuxkuxq8434q89uj56uyy`, this should make caching and responding with to DNS requests faster as they are already in the shape of a DNS packet, albeit for all types and subdomains. +The DID identifier z-base32 key should be appended as the Origin of all records, which won't cost much thanks to the name compression in DNS packets, so `_did` should be saved as `_did.o4dksfbqk85ogzdb5osziw6befigbuxmuxkuxq8434q89uj56uyy`, this should make caching and responding to DNS requests faster as they are already in the shape of a DNS packet, albeit for all types and subdomains. #### Property Mapping @@ -215,7 +215,7 @@ All records are of type `TXT` with an expiry of `7200` to align with the DHT's s ## Read -To read a `did:pk`, the process is as follows: +To read a `did:dht`, the process is as follows: 1. Take the suffix of the DID, that is, the _encoded identifier key_, and pass it to a Pkarr resolver. 2. Decode the resulting [BEP44 response](https://www.bittorrent.org/beps/bep_0044.html)'s `v` value using [bencode](https://en.wikipedia.org/wiki/Bencode). @@ -224,7 +224,7 @@ To read a `did:pk`, the process is as follows: ## Update -Each write to the DHT is considered an update. As long as control of the _identity key_ is retained any update is possible with a unique sequence number with [mutable items](https://www.bittorrent.org/beps/bep_0044.html) using BEP44. +Each write to the DHT is considered an update. As long as control of the _identity key_ is retained, any update is possible with a unique sequence number with [mutable items](https://www.bittorrent.org/beps/bep_0044.html) using BEP44. ## Deactivate @@ -279,4 +279,4 @@ Data needs to be republished. ## Security -## Privacy \ No newline at end of file +## Privacy