ensdomains / ens-app

Legacy ENS manager app
https://legacy.ens.domains/
BSD 2-Clause "Simplified" License
222 stars 267 forks source link

Track registration source on-chain via ENSIP 14 #1601

Closed gskril closed 1 year ago

gskril commented 1 year ago

When generating a secret for registering names, we can use the beginning of the enslabs.eth namehash to track on-chain what portion of registrations are coming from the official manager app as outlined in ENSIP 14.

Before:

'0x' + crypto.randomBytes(32).toString('hex')

After:

const platformSource = '9923eb94'
'0x' + platformSource + crypto.randomBytes(28).toString('hex')
makoto commented 1 year ago
const platformSource = '9923eb94'

How is this derived? The draft ENSIP doesn't mention how the code is assigned or managed.

I suggest not merging this until the ENSIP itself get merged and the official number is assigned (there is actually another 14 in the PR) https://github.com/ensdomains/docs/pull/127/files.

gskril commented 1 year ago

How is this derived? The draft ENSIP doesn't mention how the code is assigned or managed.

The proposal includes a line that "suggests a social convention that generates the secret from a combination of taking the first 6 characters of a namehash...". So 9923eb94 is the first 8 characters (just to be safe since that was a suggested change to the proposal) of enslabs.eth.

But generally I agree this can wait until the proposal itself is merged :)