Skip to content

Comments

feat: Add comprehensive DNS import debugging with dnsprovejs patch#279

Open
storywithoutend wants to merge 3 commits intomainfrom
feature/fet-2615-ensjs-dns-provejs-fix
Open

feat: Add comprehensive DNS import debugging with dnsprovejs patch#279
storywithoutend wants to merge 3 commits intomainfrom
feature/fet-2615-ensjs-dns-provejs-fix

Conversation

@storywithoutend
Copy link
Contributor

Summary

This PR adds comprehensive debug logging to diagnose DNS import functionality issues:

  • Added detailed logging to getDnsImportData.ts - Tracks DNS query flow from entry through on-chain verification
  • Patched dnsprovejs@0.5.2 - Fixes DoH query encoding to use proper RFC 8484 base64url format and Accept header
  • Design documentation - Comprehensive plan for checkpoint-based debugging approach

Changes

Logging in getDnsImportData.ts

Added console logging at 9 key checkpoints:

  1. Entry parameters (name, endpoint)
  2. DNS query initiation
  3. DNS query results structure
  4. Assembled proofs
  5. Encoded rrsets
  6. On-chain verification inputs/outputs
  7. Serial number comparison
  8. Final validation (proof wire vs onchain data)
  9. Return values

dnsprovejs Patch

Applied via pnpm patch to fix DoH query encoding:

  • Convert standard base64 to base64url (RFC 4648 §5)
  • Use proper Accept: application/dns-message header
  • Simplified query parameter encoding per RFC 8484

Documentation

Added docs/plans/2025-11-20-dns-provejs-debugging-design.md outlining:

  • Two-part logging approach (ensjs + dnsprovejs)
  • Checkpoint-based implementation strategy
  • Patching workflow and rollback plan

Test plan

  • Build succeeds with logging changes
  • pnpm patch applied successfully
  • Design document reviewed
  • Test with sample DNS name to verify logging output
  • Verify patch fixes DoH query issues

🤖 Generated with Claude Code

storywithoutend and others added 3 commits November 20, 2025 14:01
Add comprehensive design for debugging DNS import functionality by
adding logging to both ensjs and dnsprovejs. Outlines checkpoint-based
implementation plan using pnpm patch for dnsprovejs instrumentation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add detailed console logging to both getDnsImportData.ts and dnsprovejs
(via pnpm patch) to trace DNS query execution and data flow. This enables
debugging of DNS import issues by logging:

- getDnsImportData.ts: Entry parameters, DNS query results, proof assembly,
  on-chain verification, and serial number comparisons
- dnsprovejs@0.5.2 (patched): DNS queries, proof verification, signature
  validation, and DNSSEC chain building

The patch is applied via pnpm's patch system and will persist across
package reinstalls.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sonarqubecloud
Copy link

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.

1 participant