This seems interesting but I think it depends on particulars. What software must be executed? What kinds of names can be verified? What’s it take to generate the proof of resolution?
For example, Unruggable Gateways (Urg) is a pretty sophisticated thin client. Urg has a verifier called SelfVerifier
which lets you verify nearly anything about the current chain (rather than crosschain/rollup, like L2 Primary Names.)
SelfVerifier.sol
was not included in the recent audit but it’s extremely simple (<50 LoC) and its critical components were already audited: GatewayVM.sol
and the various proof verifiers like EthVerifierHooks.sol
.
Using the SelfVerifier+EthVerifierHooks on mainnet, you can construct a human-readable query which reads the resolver of a namehash from the ENS registry, then reads the necessary data from that resolver, as a single gateway request.
Each resolvers storage layout is different, so you’d need a conditional load of a program specific to each resolver contract.
For example, the PublicResolver (V3)
requires the following gateway program to read the addr(60)
for an arbitrary node
:
// assuming: target = resolver, stack = [node]
const program = new GatewayProgram()
.setSlot(0) // recordVersions
.pushStack(0) // node
.follow() // recordVersions[node]
.read() // version, leave on stack at offset 1
.setSlot(2) // addresses
.follow() // slot
.follow() // node
.push(60).follow() // coinType
.readBytes() // addresses[version][node][coinType]
.setOutput(1);
Which is equivalent to the following Urg bytecode: 0x00460029483c0102464848013c483d010133
Then you just read this program stored onchain, conditional on the resolver in the registry, which can be proven as part of the request.
I created a simple demo which proves the addr(60)
of "vitalik.eth"
.
This would require audits on SelfVerifier.sol
, VerifyENS.sol
, and the program for each resolver. The trust would be on the execution environment and the ability to obtain a relevant blockhash.
A significantly more sophisticated (but limited scope) example is ETHTLDResolver.sol
which is the crosschain resolver for Namechain that supports feature parity with the PublicResolver
.
In both cases, Urg generates a proof trace for the execution and can interleave logic using its internal VM. Urg has enough expessive power that it can execute ENSIP-10 or Namechain “Registry of Registries” logic.
It would be cool to have other execution environments as not everyone has access to a local Ethereum node or can execute Solidity locally and obtain a known blockhash.
Privacy‑preserving ENS resolution is also interesting.