Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address TXT records > 255 characters; make language more consistent; separate section for root records #162

Merged
merged 9 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22.1
go-version: 1.22.2

- name: Install Mage
run: go install github.com/magefile/mage
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.22.1
go-version: 1.22.2

- name: Install Mage
run: go install github.com/magefile/mage
Expand Down
96 changes: 9 additions & 87 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@ This guide is for you.

## Development Prerequisites

___***UPDATE TABLE OF PROJECT DEPS AND INSTALLATION NOTES***___

| Requirement | Tested Version | Installation Instructions |
|-------------|----------------|------------------------------------------------------|
| Go | 1.17.6 |[go.dev](https://go.dev/doc/tutorial/compile-install) |
| Mage | 1.12.1 |[magefile.org](https://magefile.org/) |
| Java | 17.0.2 | Below, recommended via [SDKMan](https://sdkman.io) |
| Requirement | Tested Version | Installation Instructions |
|-------------|----------------|-------------------------------------------------------|
| Go | 1.22.2 | [go.dev](https://go.dev/doc/tutorial/compile-install) |
| Mage | 1.15.0-5 | [magefile.org](https://magefile.org/) |

### Go

Expand All @@ -29,7 +27,7 @@ You may verify your `go` installation via the terminal:

```
$> go version
go version go1.17.6 darwin/amd64
go version go1.22.2 darwin/amd64
```

If you do not have go, we recommend installing it by:
Expand All @@ -53,10 +51,10 @@ You may verify your `mage` installation via the terminal:

```
$> mage --version
Mage Build Tool 1.12.1
Build Date: 2021-12-15T21:00:02Z
Commit: 2f1ec40
built with: go1.17.6
Mage Build Tool v1.15.0-5-g2385abb
Build Date: 2024-03-21T12:20:13-07:00
Commit: 2385abb
built with: go1.22.2
```

#### MacOS
Expand All @@ -70,47 +68,6 @@ $> brew install mage
#### Linux

Installation instructions are on the [Magefile home page](https://magefile.org/).

### Java

This project is written in Java, a typesafe, compiled programming language.

You may verify your `java` installation via the terminal by running `java -version`.

If you do not have Java, we recommend installing it
via [SDKMan](https://sdkman.io/install). This is a project which will allow you
to easily install the Java Development Kit (JDK), runtime (JRE), and related frameworks,
build tools, and runtimes.

After you've installed SDKMan, you may install Java:

#### SDKMan (cross-platform instructions)

```shell
$> sdk install java
...
Do you want java 17.0.2-open to be set as default? (Y/n): Y
Setting java 17.0.2-open as default.
```

You may test your installation:

```shell
$> java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
```

---
**NOTE**

You may additionally look for other Java versions to install by running `sdk list java`:

...or other installation candidates like Apache Ant, Apache Maven, etc, by running `sdk list`.

Consult the SDKMan documentation for more info.

---

## Build (Mage)
Expand All @@ -119,47 +76,12 @@ Consult the SDKMan documentation for more info.
$> mage build
```

## Build (Java / Gradle)

### macOS / Linux
```shell
$> ./gradlew build
```

### Windows
```shell
$> gradlew.bat build
```

## Test (Mage)

```
$> mage test
```

## Test (Java / Gradle)

### macOS / Linux
```shell
$> ./gradlew test
```

### Windows
```shell
$> gradlew.bat test
```

---
**NOTE**

You may also combine Gradle build targets in one call, like:

```shell
$> ./gradlew clean build test
```

---

## Communications

### Issues
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![godoc did-dht-method](https://img.shields.io/badge/godoc-did_dht_method-blue)](https://github.com/TBD54566975/did-dht-method/impl)
[![go version 1.22.1](https://img.shields.io/badge/go_version-1.22.1-brightgreen)](https://go.dev/)
[![go version 1.22.2](https://img.shields.io/badge/go_version-1.22.2-brightgreen)](https://go.dev/)
[![license Apache 2](https://img.shields.io/badge/license-Apache%202-black)](https://github.com/TBD54566975/did-dht-method/blob/main/LICENSE)
[![issues](https://img.shields.io/github/issues/TBD54566975/did-dht-method)](https://github.com/TBD54566975/did-dht-method/issues)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/tbd54566975/did-dht-method/ci.yml)
Expand Down Expand Up @@ -59,6 +59,7 @@ docker run \
| Typescript | Yes | No | [web5-js](https://github.com/TBD54566975/web5-js/blob/main/packages/dids/src/methods/did-dht.ts) |
| Kotlin | Yes | No | [web5-kt](https://github.com/TBD54566975/web5-kt/tree/main/dids/src/main/kotlin/web5/sdk/dids/methods/dht) |
| Swift | Yes | No | [web5-swift](https://github.com/TBD54566975/web5-swift/blob/main/Sources/Web5/Dids/Methods/DIDDHT.swift) |
| Dart | Yes | No | [web5-dart](https://github.com/TBD54566975/web5-dart/tree/main/packages/web5/lib/src/dids/did_dht) |
| Rust | Yes | No | Coming soon! |

## Project Resources
Expand Down
20 changes: 8 additions & 12 deletions impl/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
# Server Implementation

- Heavily a work-in-progress
- Designed to be run as a single instance

## Config

### TOML Config File

Config is managed using a [TOML](https://toml.io/en/) [file](../../config/dev.toml). There are sets of configuration values for the server
(e.g. which port to listen on), the services (e.g. which database to use), and each service.

Each service may define specific configuration, such as which DID methods are enabled for the DID service.

A full config example is [provided here](../../config/kitchensink.toml).
Config is managed using a [TOML](https://toml.io/en/) [file](../../config/dev.toml). There are sets of configuration value
s for the server (e.g. which port to listen on) and each sub-component (e.g. which database to use).

## Usage

Expand Down Expand Up @@ -60,10 +53,13 @@ docker build \
and then

```sh
docker run --publish 8305:8305 did-dht
docker run \
--publish 8305:8305 \
--publish 6881:6881/udp \
did-dht
```

### Postgres

To use a postgres database as the storage backend, set configuration option `storage_uri` to a `postgres://` URI with the database
connection string. The schema will be created or updated as needed while the program starts.
To use a postgres database as the storage backend, set configuration option `storage_uri` to a `postgres://` URI with
the database connection string. The schema will be created or updated as needed while the program starts.
2 changes: 1 addition & 1 deletion impl/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.1-alpine
FROM golang:1.22.2-alpine

# Create directory for our app inside the container
WORKDIR /app
Expand Down
4 changes: 2 additions & 2 deletions impl/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ require (
github.com/goccy/go-json v0.10.2
github.com/jackc/pgx/v5 v5.5.5
github.com/joho/godotenv v1.5.1
github.com/lestrrat-go/jwx/v2 v2.0.21
github.com/magefile/mage v1.15.0
github.com/miekg/dns v1.1.58
github.com/mitchellh/go-homedir v1.1.0
Expand Down Expand Up @@ -98,7 +99,6 @@ require (
github.com/lestrrat-go/httpcc v1.0.1 // indirect
github.com/lestrrat-go/httprc v1.0.5 // indirect
github.com/lestrrat-go/iter v1.0.2 // indirect
github.com/lestrrat-go/jwx/v2 v2.0.21 // indirect
github.com/lestrrat-go/option v1.0.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
Expand Down Expand Up @@ -139,7 +139,7 @@ require (
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
Expand Down
8 changes: 2 additions & 6 deletions impl/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ github.com/RoaringBitmap/roaring v0.4.17/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrX
github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/TBD54566975/ssi-sdk v0.0.4-alpha.0.20240401231222-6550aeed8a9d h1:M/dYJOKyLNBDh97VYAyLvzO7sS01K1eIBwNcAK2SFDQ=
github.com/TBD54566975/ssi-sdk v0.0.4-alpha.0.20240401231222-6550aeed8a9d/go.mod h1:nyTjplXnrari2nQg63ztI4C0rgMb7Jjn3gfn0OM656g=
github.com/TBD54566975/ssi-sdk v0.0.4-alpha.0.20240402005210-f282aecaa186 h1:XIaS0WBSrg2wU00Cx45NO9H3x3ca7WEI35sSef6NC5c=
github.com/TBD54566975/ssi-sdk v0.0.4-alpha.0.20240402005210-f282aecaa186/go.mod h1:nyTjplXnrari2nQg63ztI4C0rgMb7Jjn3gfn0OM656g=
github.com/TBD54566975/ssi-sdk v0.0.4-alpha.0.20240402005820-2c6b20991baa h1:1kJozfMxe8fRI0jjKUbKhj7/o16d1oTDOfZJLOMTU28=
github.com/TBD54566975/ssi-sdk v0.0.4-alpha.0.20240402005820-2c6b20991baa/go.mod h1:nyTjplXnrari2nQg63ztI4C0rgMb7Jjn3gfn0OM656g=
github.com/alecthomas/assert/v2 v2.0.0-alpha3 h1:pcHeMvQ3OMstAWgaeaXIAL8uzB9xMm2zlxt+/4ml8lk=
Expand Down Expand Up @@ -607,8 +603,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down
Loading
Loading