steem icon indicating copy to clipboard operation
steem copied to clipboard

Allow creation of accounts with 2 letters following a dot (.xx) as opposed to requiring minimum 3 letters. (.xxx)

Open Any-X opened this issue 10 years ago • 5 comments

Offending line of code: https://github.com/steemit/steem/blob/f271bfbfae4c7d1bca4ea0ddc911b1dc67b78cca/libraries/chain/protocol/authority.cpp#L33

Issue: The ability to create account names with "[name].[TLD]" is useful for those wishing to register an account name that corresponds to their website, such as "example.com". However, there are many TLDs that are only two letters, many of which are popular such as ".io", ".co", and ".ca". This means that "example.co" is not a valid account name, despite being a perfectly valid web address.

I see no reason for limiting accounts to have more than 3 letters after the dot; two letters following the dot should suffice! :)

Any-X avatar Oct 09 '16 23:10 Any-X

Furthermore, I can create the accounts with dashes nicely, but not dots.

For example: I can create any-x and anyx-io. I see no reason why I cannot create any.x or anyx.io

Any-X avatar Oct 09 '16 23:10 Any-X

Good idea. Is there a technical reason preventing it?

thecryptofiend avatar Oct 11 '16 21:10 thecryptofiend

The current grammar for account names as defined by RFC 1035

/**
 * Names must comply with the following grammar (RFC 1035):
 * <domain> ::= <subdomain> | " "
 * <subdomain> ::= <label> | <subdomain> "." <label>
 * <label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
 * <ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
 * <let-dig-hyp> ::= <let-dig> | "-"
 * <let-dig> ::= <letter> | <digit>
 *
 * Which is equivalent to the following:
 *
 * <domain> ::= <subdomain> | " "
 * <subdomain> ::= <label> ("." <label>)*
 * <label> ::= <letter> [ [ <let-dig-hyp>+ ] <let-dig> ]
 * <let-dig-hyp> ::= <let-dig> | "-"
 * <let-dig> ::= <letter> | <digit>
 *
 * I.e. a valid name consists of a dot-separated sequence
 * of one or more labels consisting of the following rules:
 *
 * - Each label is three characters or more
 * - Each label begins with a letter
 * - Each label ends with a letter or digit
 * - Each label contains only letters, digits or hyphens
 *
 * In addition we require the following:
 *
 * - All letters are lowercase
 * - Length is between (inclusive) STEEMIT_MIN_ACCOUNT_NAME_LENGTH and STEEMIT_MAX_ACCOUNT_NAME_LENGTH
 */

There is no technical reason per-se limiting us from using any grammar for account names. This is a carryover from BitShares and has not been readdressed in Steem. The implementation switching from one account name validation logic to another is not the easiest of changes to make, so unless there is an extremely compelling reason for us to change the logic, I lean towards leaving it as it is for now.

mvandeberg avatar Oct 12 '16 13:10 mvandeberg

This is a ticket of the form "There is a bug, the set L of names accepted by the live code is wrong". This implies that OP has in mind a specification which consists of some set S of names the code should accept, and S != L (because if S = L then no change is needed).

The specification of the set of names accepted by the code is in the above comment. The above comment defines S. There is no bug and the code will not be changed.

I see no reason for limiting accounts to have more than 3 letters after the dot

I assume you mean "3 or more". The original reason was that the Graphene / BitShares system where, in order to create an account of the form X.Y, you must own account Y. Just like how subdomains work on the Internet -- the owner of .com has to approve registration of example.com, and the owner of example.com has to approve registration of sub.example.com. So if the minimum non-dotted account name length is three letters, anything ending with a final dotted component of fewer than three letters would never be able to exist regardless of whether the name validation rules allowed it. So the rules didn't allow it, in order to match the above grammar and make the code simpler.

Users found this subaccount system to be more confusing than empowering, so we didn't do it in Steem -- but nobody ever bothered to re-examine the account name validation rules. It's working code that does what it does well enough.

OP's reasoning for relaxing the restrictions simply isn't compelling enough for us to change this.

theoreticalbts avatar Oct 13 '16 20:10 theoreticalbts

@theoreticalbts @mvandeberg - could we reexamine this issue? All national domains has only 2 letters.It would be great to support account names which could resemble majority of the domain names.

noisy avatar Jan 15 '18 12:01 noisy