Final Milestone

Deployment, Documentation, Productionizing

Milestone Outputs

  1. A deployment-ready package or container (Nix/Docker) is made available for users

  2. Extensive tests, including golden tests where applicable/useful, are implemented for each of the DeNS components

    • An integration test suite which verifies data is piped between each component correctly can be found here

    • A test suite for DeNS Query’s to verify the SQL queries function as expected can be found here

    • A PowerDNS backend test suite to verify that DeNS Query’s SQL schema integrates with PowerDNS can be found here

  3. User-facing documentation & examples are provided

    • A website with user-facing documentation and examples can be found here

  4. A running service (the exact nature depends on design decisions, provisionally: a DeNS "local resolver") that users can integrate with to perform name-resolution queries using our system.

    • A running service is demonstrated on the Preview testnet with the Docker images and Compose file mentioned above.

Acceptance criteria

  • The package / container is properly configured and can be deployed by users to interact with the DeNS protocol.

  • The test suites are extensive and all tests pass.

    • CI on the most recent commit (at the time of writing this) passes and hence demonstrates that all tests pass.

  • Documentation is clear, thorough, and sufficient for users to interact with the protocol.

    • The project website provided found here has such documentation.

  • The running service actually works.

Evidence of milestone completion

Preview Testnet Demo Video

The video can be found here

Commands Used

The following commands were executed in the demo video.

Note
It is assumed that we start in the root of the project directory.
  1. Load all the docker images.

    cd dens-apps/preview-testnet
    nix build .#cardano-node-preview-testnet-image && docker load < ./result
    nix build .#ogmios-preview-testnet-image && docker load < ./result
    nix build .#dens-query-preview-testnet-image && docker load < ./result
    nix build .#dens-pdns-preview-testnet-image && docker load < ./result
    nix build .#dens-pdns-backend-preview-testnet-image && docker load  < ./result
    nix build .#dens-query-postgres-preview-testnet-image && docker load < ./result
    Note
    These commands were done prior to filming the demo video
  2. Run all services using the Compose file.

    docker compose up
  3. Wait several hours for the services to sync with the preview testnet.

  4. Check that testdomainname.com has no RRs associated with it using the well known DNS lookup utility dig.

    dig @127.0.0.1 -p 6653 testdomainname.com
    Important
    The Compose file maps the port 6653 on the host machine to the PowerDNS server running in the docker image.
  5. Purchase the domain name testdomainname.com

    docker exec -it preview-testnet-dens-query-1 \
        dens-transactions-cli \
            register-domain \
            --ogmios-host ogmios \
            --ogmios-port 1337 \
            --network Preview \
            --protocol-nft-tx-out-ref "5969b450ec00019044fbcb1cd5973cc80a47b1507e2e0e14f3e6e4a2f23cdabd#0" \
            --dens-query-socket-path /ipc/dens-query/dens-query.sock \
            --private-key-bech32 ed25519_sk1p8874wgza2c5yxytucugt2k2mrw3l3gkpg6ezxn498smerqh8j0qe078pu \
            --domain-name testdomainname.com
  6. Associate testdomainname.com with some RRs

    docker exec -it preview-testnet-dens-query-1 \
        dens-transactions-cli \
            update-record \
            --ogmios-host ogmios \
            --ogmios-port 1337 \
            --network Preview \
            --protocol-nft-tx-out-ref "5969b450ec00019044fbcb1cd5973cc80a47b1507e2e0e14f3e6e4a2f23cdabd#0" \
            --dens-query-socket-path /ipc/dens-query/dens-query.sock \
            --private-key-bech32 ed25519_sk1p8874wgza2c5yxytucugt2k2mrw3l3gkpg6ezxn498smerqh8j0qe078pu \
            --domain-name testdomainname.com \
            --a-record "270,69.69.69.69" \
            --soa-record "30,ns1.testdomainname.com dns-admin.testdomainname.com 639491960 900 900 1800 60"
  7. Verify that testdomainname.com has the RRs we just associated it with.

    dig @127.0.0.1 -p 6653 testdomainname.com
Logs

The terminal output of the demo is as follows.

$ dig @127.0.0.1 -p 6653 testdomainname.com

; <<>> DiG 9.18.19 <<>> @127.0.0.1 -p 6653 testdomainname.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 11316
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;testdomainname.com.		IN	A

;; Query time: 2 msec
;; SERVER: 127.0.0.1#6653(127.0.0.1) (UDP)
;; WHEN: Wed Jun 05 02:40:22 MDT 2024
;; MSG SIZE  rcvd: 47

$ docker exec -it preview-testnet-dens-query-1 \
    dens-transactions-cli \
        register-domain \
        --ogmios-host ogmios \
        --ogmios-port 1337 \
        --network Preview \
        --protocol-nft-tx-out-ref "5969b450ec00019044fbcb1cd5973cc80a47b1507e2e0e14f3e6e4a2f23cdabd#0" \
        --dens-query-socket-path /ipc/dens-query/dens-query.sock \
        --private-key-bech32 ed25519_sk1p8874wgza2c5yxytucugt2k2mrw3l3gkpg6ezxn498smerqh8j0qe078pu \
        --domain-name testdomainname.com
(node:136) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
info: Tx hash: 9bda385ff825254f416b7c2275e0c4277c6493224ea83163ab724f21a4b6a4da
$ docker exec -it preview-testnet-dens-query-1 \
    dens-transactions-cli \
        update-record \
        --ogmios-host ogmios \
        --ogmios-port 1337 \
        --network Preview \
        --protocol-nft-tx-out-ref "5969b450ec00019044fbcb1cd5973cc80a47b1507e2e0e14f3e6e4a2f23cdabd#0" \
        --dens-query-socket-path /ipc/dens-query/dens-query.sock \
        --private-key-bech32 ed25519_sk1p8874wgza2c5yxytucugt2k2mrw3l3gkpg6ezxn498smerqh8j0qe078pu \
        --domain-name testdomainname.com \
        --a-record "270,69.69.69.69" \
        --soa-record "30,ns1.testdomainname.com dns-admin.testdomainname.com 639491960 900 900 1800 60"
(node:158) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
info: Tx hash: 6414ea74af6ecc214fdac327b5abca8be80f6b9f9dbdb5ec920cedded343a349
$ dig @127.0.0.1 -p 6653 testdomainname.com

; <<>> DiG 9.18.19 <<>> @127.0.0.1 -p 6653 testdomainname.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 14626
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;testdomainname.com.		IN	A

;; Query time: 1 msec
;; SERVER: 127.0.0.1#6653(127.0.0.1) (UDP)
;; WHEN: Wed Jun 05 02:42:02 MDT 2024
;; MSG SIZE  rcvd: 47

$ dig @127.0.0.1 -p 6653 testdomainname.com

; <<>> DiG 9.18.19 <<>> @127.0.0.1 -p 6653 testdomainname.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 5485
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;testdomainname.com.		IN	A

;; Query time: 1 msec
;; SERVER: 127.0.0.1#6653(127.0.0.1) (UDP)
;; WHEN: Wed Jun 05 02:42:25 MDT 2024
;; MSG SIZE  rcvd: 47

$ dig @127.0.0.1 -p 6653 testdomainname.com

; <<>> DiG 9.18.19 <<>> @127.0.0.1 -p 6653 testdomainname.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13253
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;testdomainname.com.		IN	A

;; ANSWER SECTION:
testdomainname.com.	270	IN	A	69.69.69.69

;; Query time: 20 msec
;; SERVER: 127.0.0.1#6653(127.0.0.1) (UDP)
;; WHEN: Wed Jun 05 02:42:33 MDT 2024
;; MSG SIZE  rcvd: 63