Repository navigation
resolver: report a subname's holder as its owner - #2091
Merged
epoberezkin merged 8 commits intoNov 22, 2026
Merged
Conversation
brenzi-agent
marked this pull request as ready for review
November 21, 2026 20:02
brenzi-agent
requested review from
epoberezkin and
spaced4ndy
as code owners
November 21, 2026 20:02
epoberezkin
approved these changes
Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A subname that the subname registrar created is owned in the registry by that contract; its holder is the holder of the 2LD above it, which the subname registrar's
ownerOfreturns. The resolver reported the registry owner as the record'sowner, so a client received the subname registrar's address. smp7, asked forlap.brenzi.simplexwithRSLV, answerednrOwner = "0x86d2248fb5f3b14a1ca3904978314ad5450d4dc9", the.simplexsubname registrar. On mainnet, that contract'sownerOf(namehash("lap.brenzi.simplex"))returns0xb519d8465d112a8a6c0da095f8c2efeb4b1c54f8, the registry owner ofbrenzi.simplex. smp7 answeredmobile.foobar.testingandlap.brenzi.testingwith the.testingsubname registrar as owner in the same way.scripts/resolver/service/snrc-resolve.py:
subname_holderbecomesrecord_owner, which returns the record'sownerfor every name, on/v2/resolveand/resolve:node_of(name)as before, so a hashed query reaches the same node;subnameHook()names: the address itsownerOfreturns, unless that is zero;ownerOfis zero or reverts:None, which both routes answer as not registered, as before.Both routes test
Nonein place of the depth test and read the holder once per lookup, as master does. On/v2/resolve,registrationreads the owner before the record and reads the record only for a held name, so the record of a subname nobody holds is no longer read: a subname the subname registrar owns but no longer holds is answered as not registered in 4 round trips, where master took 5. ThelabelNotRecordedcheck moved into the held branch with its comment unchanged.scripts/resolver/README.md: for a held subname,
owneris the 2LD's holder, on both routes.scripts/resolver/service/test_snrc_resolve.py:
/v2/resolveand/resolvegive the holder asowner; on master both give the registry owner, the subname registrar;/resolve,owneris the registry owner;ownerOfreverts, and one under a TLD without a registrar, is answered as not registered;CI: on this head, resolver (python) passes 165 tests and ruff (https://github.com/simplex-chat/simplexmq/actions/runs/44943998691). The same tests on master 3f57fcd fail 4: both owner assertions of a held subname, the 3-round test on its owner, and the no-longer-held test with 5 rounds for 4 (https://github.com/brenzi-agent/simplexmq/actions/runs/44941154729, branch
ci/ab/subname-holder-tests-on-master).#2016 asserts
addrs["SubnameRegistrar"]as the owner ofmenu.bakery.simplexintest_a_held_subname_is_registered(test_ground_truth.py); after this change the owner isLOCAL_OWNER, the account that holdsbakeryin its seed.A running resolver serves the change after its image is rebuilt:
docker compose up -d --build resolver.