Skip to content

fix: point DOS Testnet at the canonical JASJ chain - #10

Merged
JOY (JOY) merged 5 commits into
dosfrom
fix/testnet-canonical-jasj
Oct 21, 2026
Merged

JOY (JOY) merged 5 commits into
dosfrom
fix/testnet-canonical-jasj

Conversation

@JOY

@JOY JOY (JOY) commented Oct 21, 2026 •

Copy link
Copy Markdown

Why

On 2026-08-22, test.doschain.com was mis-routed by hand to the replaced interim testnet chain 2EhC, which has the same chain ID 3939. The ENSv2 redeploy that day (#7) landed on 2EhC, and #7/#9 aligned this repo's testnet record and scripts to it. The canonical testnet is JASJ (genesis 0x36f98b2e..., explorer test.doscan.io). The public RPC was fixed in DOS/DOS-Chain#76.

Evidence

  • The 2026-08-12 deployment (a89847e, blocks 120-166) is live on JASJ: all 16 contracts have bytecode.
  • The 2EhC record's resolver 0xee4b... has no code on JASJ, which is why DOScan's testnet BENS gate fails.
  • The 2EhC addresses match mainnet only because deployer 9999 started at nonce 0 on that fresh chain. Its nonce on JASJ is 88, so they cannot be reproduced there.
  • The score-gated policy (feat: add score-gated DOS domain policy #6) was never deployed anywhere: owner 0x310Bc made only 2 funding transfers on 2EhC.

Change

  • Restore contracts/deployments/dos-testnet-3939.json to the JASJ deployment. The subgraph renders from it.
  • Set the JASJ genesis in Invoke-DeployDOSTestnet.ps1 and Invoke-DeployDOSDomainPolicyTestnet.ps1.
  • Sign the policy deployment with the owner's Ledger (--ledger --sender, optional -LedgerHdPath) instead of reading PRIVATE_KEY. preflight still rejects any other sender.

Verification

  • forge test --match-path test/unit/testnet/*: 41 pass.
  • forge script DeployDOSDomainPolicyTestnet dry run against JASJ with --sender 0x310Bc... succeeds: preflight passes and 5 transactions use about 6.1M gas.

Next (owner)

Broadcast the policy deploy with the Ledger, with voucher signer 0x257958FF376B6C340ea2BDFCCc8e7d6420Fbb5f4 (key in Secret Manager dos-domain-voucher-signer-testnet-private-key) and minimum score 20.

🤖 Generated with Claude Code


📌 TL;DR

This PR updates the DOS testnet deployment artifacts to reflect a new chain genesis and replaces the use of environment-based private keys with Ledger-based signing for the domain policy deployment script, enhancing security and operational safety.

🎯 Type of Change

  • 🚀 New feature
  • 🐛 Bugfix
  • 🧹 Refactor
  • ⚡ Performance
  • 📚 Documentation
  • ⚙️ CI / Configuration

🔍 Changes Walkthrough

File Summary of Changes
contracts/deployments/dos-testnet-3939.json Updated deployment metadata (block numbers, timestamps, transaction hashes) and contract addresses to match the new testnet genesis.
contracts/script/foundry/DeployDOSDomainPolicyTestnet.s.sol Refactored the deployment script to use msg.sender (Ledger) instead of reading PRIVATE_KEY from the environment, removing the need for a private key in the script logic.
contracts/script/foundry/Invoke-DeployDOSDomainPolicyTestnet.ps1 Updated the PowerShell wrapper to remove PRIVATE_KEY validation, added Ledger HD path support, updated the expected genesis hash, and modified forge script invocations to use --ledger and --sender flags.
contracts/script/foundry/Invoke-DeployDOSTestnet.ps1 Updated the expected genesis hash to match the new testnet configuration.

📊 Architectural Flow

sequenceDiagram
    participant User
    participant PS1 as PowerShell Script
    participant Forge as Foundry CLI
    participant Ledger as Hardware Wallet
    participant Chain as DOS Testnet

    User->>PS1: Invoke-DeployDOSDomainPolicyTestnet.ps1
    PS1->>PS1: Validate Env Vars (No Private Key)
    PS1->>PS1: Check Genesis Hash & Balance
    PS1->>Forge: forge script (Simulation)
    Forge->>Chain: Simulate Transactions
    Chain-->>Forge: Simulation Result
    Forge-->>PS1: Success
    PS1->>Forge: forge script --ledger --broadcast
    Forge->>Ledger: Request Signature
    Ledger-->>Forge: Signed Transaction
    Forge->>Chain: Broadcast Transaction
    Chain-->>Forge: Transaction Receipt
    Forge-->>PS1: Deployment Complete
    PS1-->>User: Success
Loading

On 2026-08-22 test.doschain.com was mis-routed to the replaced interim
chain 2EhC (same chain ID 3939). The ENSv2 redeploy that day landed on
2EhC, and this record and the deploy scripts were "aligned" to it. The
canonical testnet is JASJ (genesis 0x36f98b2e...), where the 2026-08-12
deployment (blocks 120-166) is live: all 16 contracts have bytecode.

- Restore contracts/deployments/dos-testnet-3939.json to that JASJ
  deployment (a89847e), which the subgraph manifest renders from.
- Expect the JASJ genesis in both testnet deploy wrappers.
- Sign the domain-policy deployment with the owner's Ledger
  (forge --ledger --sender) instead of reading PRIVATE_KEY: the owner
  0x310Bc is a hardware wallet. preflight still rejects any other sender.

The score-gated policy was never deployed on any chain (the owner made
no deploy transactions on 2EhC). A dry run against JASJ succeeds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.

Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

1 similar comment
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c4442899-964a-4847-b11f-1269073b65b8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

dos[bot]
dos Bot approved these changes Oct 21, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⏱️ Code Review completed (4 eligible files · 9,181 chars · 1 model call(s) · 1 PR unit(s))

Whole diff with bounded context at base 130d42a / head 5b9334d.

✅ CLEAN_PASS: Complete diff reviewed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dos[bot]
dos Bot approved these changes Oct 21, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⏱️ Code Review completed (4 eligible files · 9,761 chars · 2 model call(s) · 1 PR unit(s))

Whole diff with bounded context at base 130d42a / head 9c04e83.

✅ CLEAN_PASS: Complete diff reviewed

Context investigation was bounded to the explicitly requested snapshot paths.

Owner decision (2026-10-21): DOS Names testnet operations should not
need the hardware wallet. The Ledger owner 0x310Bc grants the registrar
admin roles on the testnet DOS registry to the deployer 0x99999e45 once;
the domain-policy deployment then runs with that deployer key (Secret
Manager dos-deployer-99999e45-private-key) and makes it the policy and
registrar owner. Testnet only: mainnet and the chain's validator
management keep the Ledger owner.

This replaces the Ledger-signing variant of the policy wrapper from the
previous commits; the JASJ genesis check stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dos[bot]
dos Bot approved these changes Oct 21, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⏱️ Code Review completed (5 eligible files · 7,828 chars · 2 model call(s) · 1 PR unit(s))

Whole diff with bounded context at base 130d42a / head 84a4365.

✅ CLEAN_PASS: Complete diff reviewed

Context investigation was bounded to the explicitly requested snapshot paths.

The score-gated domain policy is live on the canonical DOS Testnet
(JASJ, genesis 0x36f98b2e...): the Ledger owner granted the registrar
admin roles to the deployer (block 176), and the deployer deployed the
policy and policy registrar, moved the registrar roles off the public
registrar, and linked them (blocks 177-181). Minimum score 20.

`contracts.dosRegistrar` keeps the retired public registrar because
consumers still require that key; the active registrar is under
`domainPolicy.registrar`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dos[bot]
dos Bot approved these changes Oct 21, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⏱️ Code Review completed (5 eligible files · 8,814 chars · 1 model call(s) · 1 PR unit(s))

Whole diff with bounded context at base 130d42a / head d8a2c84.

✅ CLEAN_PASS: Complete diff reviewed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dos[bot]
dos Bot approved these changes Oct 21, 2026

@dos dos Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⏱️ Code Review completed (5 eligible files · 9,097 chars · 1 model call(s) · 1 PR unit(s))

Whole diff with bounded context at base 130d42a / head 5f0518d.

✅ CLEAN_PASS: Complete diff reviewed

@JOY
JOY (JOY) merged commit 3345d09 into dos Oct 21, 2026
11 checks passed
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