Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate domain manager on writing #203

Closed
pikonha opened this issue Sep 10, 2024 · 1 comment · Fixed by #208
Closed

Validate domain manager on writing #203

pikonha opened this issue Sep 10, 2024 · 1 comment · Fixed by #208
Assignees
Labels
enhancement New feature or request

Comments

@pikonha
Copy link
Contributor

pikonha commented Sep 10, 2024

Feature Request

There is a scenario where the owner returned by the ENSRegistry isn't the ENS NFT owner, this happens on old domains that were created using the legacy ETHRegistrarController (e.g. blockful.eth)

Describe Preferred Solution

Validate both the NFT and the ENSRegistry owner when writing to a domain by calling the

Architecture Diagram

sequenceDiagram
    User -->> Client: Asks to set a text for test.eth
    Client -->> Client: normalize name
    Client -->> Client: namehash(name) = node
    Client -->> UniversalResolver: findResolver(node)
    UniversalResolver -->> Client: resolverAddr = 0x...
    Client -->> Resolver: setText(node, key, value)
    Resolver -->> Client: revert StorageHandledByL2(chainID, contractAddress)
    Client -->> L2: setText(node, key, value)
    Note over L2: Validate NFT owner
    L2 -->> L2: Validate ownership of both
    L2 -->> L2: Update data
Loading

QA Replication steps

  1. Fork Ethereum mainnet locally
  2. Impersonate blockful.eth NFT owner (0x000ee9A6Bcec9AadCc883bD52B2c9A75FB098991)
  3. Do a writing call
  4. Check whether the change took effect on the given storage (DB or L2)
@pikonha pikonha added the enhancement New feature or request label Sep 10, 2024
@pikonha pikonha added this to the Database Resolver on mainnet milestone Sep 10, 2024
@pikonha pikonha self-assigned this Sep 10, 2024
@pikonha pikonha linked a pull request Sep 16, 2024 that will close this issue
10 tasks
@pikonha
Copy link
Contributor Author

pikonha commented Sep 16, 2024

#208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants