Skip to content

Add workflow for updating tld.h file - #121

Closed
Falci wants to merge 3 commits into
handshake-org:masterfrom
Falci:update1
Closed

Falci wants to merge 3 commits into
handshake-org:masterfrom
Falci:update1

Conversation

@Falci

@Falci Falci commented Nov 24, 2023

Copy link
Copy Markdown
Member

This PR adds a GitHub action script that will:

  • Checkout and install hs-names with its dependencies
  • Download the TLD and zone file from ICANN
  • Update the src/tld.h
  • Commit and create a PR

There's no automatic trigger for this action. It needs to be manually triggered from the actions page.

@rithvikvibhu

Copy link
Copy Markdown
Member

Tried this out and running the workflow (manually) created a PR.

I also wanted to collect some data on how often the root zone changes and affects resolvability, but hnsd seems to be unstable when it gets a few queries that respond with SERVFAIL. It starts responding with NXDOMAIN/SERVFAIL even for working domains. Either a restart or wait for some time (cache?) will make the domains work again.

For ex, the long list of SERVFAILs here are false-negatives:
image

So while I don't have an exact count, some examples of TLDs that should work but don't:

❯ dig @127.0.0.1 -p 9592 abb +dnssec

; <<>> DiG 9.18.19 <<>> @127.0.0.1 -p 9592 abb +dnssec
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 32885
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; QUESTION SECTION:
;abb.                           IN      A

;; Query time: 2220 msec
;; SERVER: 127.0.0.1#9592(127.0.0.1) (UDP)
;; WHEN: Mon Nov 27 22:22:57 IST 2023
;; MSG SIZE  rcvd: 32

❯ dig @1.1.1.1 nic.abb +dnssec

; <<>> DiG 9.18.19 <<>> @1.1.1.1 nic.abb +dnssec
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33053
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 1232
;; QUESTION SECTION:
;nic.abb.                       IN      A

;; ANSWER SECTION:
nic.abb.                300     IN      A       138.224.0.118
nic.abb.                300     IN      RRSIG   A 8 2 300 20231211063301 20231127063301 37583 nic.abb. ZXrhU2XGq4mws44phZqEPBLKUb3dcNw3m/dahV4aSZ31TAgvlVxwLiIZ GtqnH5x0VGebHGwzAyzB7GPr0OIi6IykY8+zyMwegHAWmnZc1lf5xkmb FatJ91smr5G9mZyJFcOJ0qouBqlTVFx0R+qMV1dMlna7fPaj0JJJjXcO n1M=

;; Query time: 336 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Mon Nov 27 22:23:10 IST 2023
;; MSG SIZE  rcvd: 219

Comment on lines +29 to +30
- name: Install dependencies (hsd)
run: npm --prefix=hs-names install hsd@^5

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

G'day,
Using hsd v5 is causing the workflow to fail (test run on my fork)

Can you update this to hsd@v8 (or the latest hsd version)

@shadstoneofficial

Copy link
Copy Markdown

Thanks for starting this workflow. While reviewing the release request in #135, I independently reproduced newer tld.h drift and confirmed that the current master snapshot should be regenerated again before a release.

I also tested this generator path with Node.js 22, the current hs-names revision, and hsd@8.0.0, addressing the outstanding review request here. Generation succeeds against root-zone serial 2026081403 when the generator uses the JavaScript crypto backend, avoiding legacy native-addon compilation problems.

I have a hardened patch prepared that keeps the approach in this PR and adds:

  • weekly scheduling plus manual dispatch;
  • pinned hs-names, hsd, Node.js, and Action revisions;
  • explicit minimal workflow permissions and concurrency control;
  • generated name/data count validation;
  • source root-zone serial and SHA-256 provenance;
  • hnsd build, unit tests, and integration tests before proposing an update;
  • no-op handling when there is no drift; and
  • one reusable automation/update-tld PR instead of timestamped branches and duplicate PRs.

To avoid competing with this PR, would you prefer that the patch be incorporated here? If the original branch is no longer being updated, I can instead prepare a separate draft PR for maintainer review.

@Nathanwoodburn

Copy link
Copy Markdown
Member

This is closed as I merged it in #136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants