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

Registrar fixes #3

Merged
merged 25 commits into from
Feb 8, 2021
Merged

Registrar fixes #3

merged 25 commits into from
Feb 8, 2021

Commits on Feb 5, 2021

  1. registrar: remove unused code

    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    8b2067b View commit details
    Browse the repository at this point in the history
  2. registrar: make immutable variables constant

    These values will never change, so setting them as constants makes
    auditing the contract a little easier.
    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    9355838 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3f90793 View commit details
    Browse the repository at this point in the history
  4. registrar: account for ens fallback mechanism

    The new ens registry has a fallback mechanism where the old registry will be
    queried if an owner for a record cannot be found in the new registry.
    
    The logic for this mechanism makes use to two sentinel values for the
    `owner` field in a record:
    
    - `address(0)`: no owner found in the new registry, try the old one
    - `address(this)`: record is unowned, do not fallback to the old registrar
    
    Calling `setOwner(record, address(0))` on the new registrar will in fact
    set a value of `address(this)` for the owner field on that record.
    
    the `recordExists` method only checks if the owner of a domain is
    `address(0)` and returns `true` otherwise.
    
    The combination of the above two points meant that revoked names (where
    the owner had been set to `address(0)`) could not be reregistered.
    
    This commit replaces the call to `recordExists` with a check based on
    `ens.owner(node)` (which returns `address(0)` when the owner of a record
    is `address(this)`), thus allowing reregistration of intentionally
    revoked names.
    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    08f7218 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6090129 View commit details
    Browse the repository at this point in the history
  6. registrar: remove redundant require

    This check ensures that the owner of the "eth" tld in the ens registry
    has been set. However the call to `setDomainOwner` will always fail if
    this is not the case (due to the call to `transferFrom` later in the
    method).
    
    Removing as this is not a user facing method, and clarity of
    implementation trumps clarity of error messages in this case.
    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    c39b01e View commit details
    Browse the repository at this point in the history
  7. registrar: setDomainOwner does not update resolver and ttl

    The `setDomainOwner` method should not set the resolver and ttl values.
    In particular the previous behaviour (setting the resolver to the
    address of the new domain owner) seems almost certain to be wrong (and
    cause disruption for downstream clients who may rely on the resolver for
    the `radicle.eth` domain).
    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    e1c21ea View commit details
    Browse the repository at this point in the history
  8. registrar: naming consistency

    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    fcac3df View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1f40518 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0536426 View commit details
    Browse the repository at this point in the history
  11. registrar: set resolver and ttl for subdomains

    Either sets a default value for the resolver and ttl, or allows the
    caller to specify a custom one when registering a new name.
    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    c63d86c View commit details
    Browse the repository at this point in the history
  12. registrar: naming

    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    39255a4 View commit details
    Browse the repository at this point in the history
  13. registrar: introduce commit / reveal scheme

    This prevents an attack where a malicious actor could scan the mempool
    and front run name registration before charging the original registrant
    an extra fee.
    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    8cf11c7 View commit details
    Browse the repository at this point in the history
  14. registrar: give admin control over ens address

    The ENS registry has migrated before, and may do so again in the future,
    this change gives admin a little more flexibility in case such a situation
    arises again in the future.
    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    fa1cd8f View commit details
    Browse the repository at this point in the history
  15. registrar: enforce min time between commit and reveal

    This prevents an attack where a malicious actor could frontrun a call to
    `register` with an atomic call to `commit` followed by `register` for
    the same name.
    
    50 blocks has been (somewhat arbitrarily) chosen as a default for now,
    some more work is required to justify the safety of this value in the
    face of e.g. heavy network congestion.
    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    163f1ab View commit details
    Browse the repository at this point in the history
  16. registrar: adapt tests

    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    c14a88a View commit details
    Browse the repository at this point in the history
  17. registrar: remove safemath

    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    622cab2 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    ececfe0 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    a127bef View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    8516530 View commit details
    Browse the repository at this point in the history
  21. registrar: update comments

    d-xo committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    9ce8d22 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2021

  1. - inline mkCommitment

    - add commitWithPermit
    - fover RadicleToken over ERC20Burnable interface
    MrChico committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    8198113 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    31ee950 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2021

  1. 0 tx registration flow

    MrChico committed Feb 8, 2021
    Configuration menu
    Copy the full SHA
    6da8bae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1abd66e View commit details
    Browse the repository at this point in the history