Skip to content

ci: test the resolver against a seeded chain and known mainnet names - #2016

Draft
brenzi-agent wants to merge 7 commits into
simplex-chat:masterfrom
brenzi-agent:ep/resolver-ground-truth
Draft

brenzi-agent wants to merge 7 commits into
simplex-chat:masterfrom
brenzi-agent:ep/resolver-ground-truth

Conversation

@brenzi-agent

@brenzi-agent brenzi-agent commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

The resolver is tested against real contracts: in the build, against a local chain with one name per lookup answer, and daily, against known mainnet names. Stacked on #2015 (its commits are included until it is merged).

Local chain, from public repositories only, in "Test resolver" of the Linux build job when the resolver or build.yml changes:

  • "Build names dev chain" clones simplex.domains at the pinned commit into the runner's temp directory, builds the contracts and anvil stages of its webapp/dev/Dockerfile (simplex-network/ens-contracts at the commit that Dockerfile pins, compiled, and Foundry's anvil), copies the artifacts and anvil out of them, and installs the webapp's dependencies: 59 s. "Test resolver" then takes 10 s.
  • test_ground_truth.py LocalChainTests starts anvil and deploys .simplex with the webapp's dev/deploy.ts: registry, registrar, controller behind its proxy, subname registrar, resolver, name policy and sponsor, with bakery (contact and channel links), harbour (no links) and the community name bakehouse registered, and support, simplex and official reserved.
  • The test then seeds the states deploy.ts lacks, over JSON-RPC from anvil's unlocked accounts:
    • lapsed and expiring, registered through the registrar for 1 and 30 days; the controller and the name policy refuse less than 2 years, so the deployer is added as a registrar controller. The chain then moves on by the registrar's grace period plus 2 days: lapsed is past its grace period, expiring is in it, and bakery is still registered;
    • a contact link on expiring, and the subname menu.bakery, created through the subname registrar, with its own contact link;
    • brandname reserved as trademark and privacy as community;
    • Multicall3 from the compiled ens-contracts mocks, so the resolver reads in multicall rounds as on mainnet.
  • It starts the resolver on the chain and checks:
    • bakery: registered, with its contact and channel links, owned by the holder; harbour: registered, without links;
    • expiring: registered, in grace, with its contact link;
    • menu.bakery: registered, owned by the holder of bakery through the subname registrar, with its contact link;
    • sunflower, lapsed and menu.expiring: available at the launch price ($50 a year, $100 for 7 letters, $200 for 6, minimum length 6);
    • simplex, brandname and privacy: reserved, as internal, trademark and community;
    • v1: 200 with the contact link, 404 for a name never registered and for a subname nobody holds, 410 for a lapsed name.

Pin: SIMPLEX_DOMAINS_COMMIT is b4cc2f47fe534c03e3f9157c246c9ab471bc8e94 of brenzi-agent/simplex.domains, the head of simplex-chat/simplex.domains#31, which builds the dev chain without simplex-namespace-contract. Before this pull request is marked ready, the pin moves to the merge commit of simplex-chat/simplex.domains#31, and the repository to simplex-chat/simplex.domains.

Mainnet, resolver-mainnet.yml: daily, on a manual run and on a pull request that changes it. MainnetTests starts the resolver with its default addresses, the v2 .simplex contracts and .testing, and the RPC of the secret SNRC_MAINNET_RPC, or https://ethereum-rpc.publicnode.com without it, and checks, as read at block 26486323:

  • foobar.testing (contact https://smp16.simplex.im/a#Q_F00BA7, until 2027-06-23), bitcoin.testing (until 2046) and evgenypoberezkin.simplex (until 2036): registered;
  • simplex.testing and simplex.simplex: reserved, internal;
  • groundtruthcheck.testing and groundtruthcheck.simplex: available.

Docs: the CI guide and the resolver README (local runs with SNRC_DEV_CHAIN and SNRC_MAINNET_RPC).

resolver mainnet on this pull request (19d7570), with the public endpoint: 3 passed in 2.4 s.
https://github.com/simplex-chat/simplexmq/actions/runs/45443691011

build on this pull request (19d7570): the 6 local-chain tests passed (172 passed, 3 skipped: the mainnet tests), and the run passed.
https://github.com/simplex-chat/simplexmq/actions/runs/45443690970

Copy link
Copy Markdown
Contributor Author

#2091 changes the owner the resolver reports for a subname that the subname registrar holds: both routes now answer the 2LD's holder, which SubnameRegistrar.ownerOf returns, in place of the subname registrar's address. #2090 makes the .simplex v2 addresses the resolver's defaults.

This draft needs two changes once it includes them:

  1. test_a_held_subname_is_registered asserts the subname registrar as the owner of menu.bakery.simplex (test_ground_truth.py#L121). With resolver: report a subname's holder as its owner #2091 the resolver answers the holder of bakery.simplex, LOCAL_OWNER, which L111 already asserts for bakery.simplex:
    self.assertEqual(reg["nameRecord"]["owner"], LOCAL_OWNER)
  2. SIMPLEX_MAINNET (L18-L22) points MainnetTests at the retired v1 deployment (registry 0xa7f6497be2f1aa41aa2db55aba8a6e0145dff0d2), whose registrar no longer lists its controller or name policy. With resolver: resolve .simplex names on mainnet by default #2090, SIMPLEX_MAINNET can be removed, and MainnetTests then reads v2, where evgenypoberezkin.simplex is registered and simplex.simplex is reserved (internal).

@brenzi-agent
brenzi-agent force-pushed the ep/resolver-ground-truth branch from 3558f94 to 19d7570 Compare November 24, 2026 17:00

This branch has not been deployed

No deployments
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