Page MenuHomePhabricator

[keyserver] add eth addresses to reserved usernames table
ClosedPublic

Authored by varun on Oct 18 2023, 8:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 2, 11:16 AM
Unknown Object (File)
Tue, Aug 27, 4:34 PM
Unknown Object (File)
Tue, Aug 27, 12:04 PM
Unknown Object (File)
Tue, Aug 27, 11:54 AM
Unknown Object (File)
Tue, Aug 27, 5:10 AM
Unknown Object (File)
Sun, Aug 25, 2:12 AM
Unknown Object (File)
Wed, Aug 14, 5:44 PM
Unknown Object (File)
Wed, Aug 14, 5:43 PM
Subscribers

Details

Summary

we should add eth addresses to the reserved usernames table as well so we can make sure we don't mint new user IDs for these users

Test Plan

verified eth address exists in my localstack ddb reserved usernames table

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Oct 18 2023, 8:38 PM
keyserver/src/creators/account-creator.js
193–195 ↗(On Diff #32170)

Not clear you need this async IIFE anymore (see below comment)

294–298 ↗(On Diff #32170)

Not clear to me why you need this async IIFE

remove unnecessary iife's

What happens if the API request fails (eg endpoint is unreachable)? We may end up in a state where not all eth addresses make it to the reserved usernames table.

Should we also have some sort of cron script that takes all eth addresses from keyserver DB and hits the addReservedUsernames endpoint to "fix things up" so things are eventually in a correct state?

This revision is now accepted and ready to land.Oct 20 2023, 10:54 AM
In D9526#280196, @atul wrote:

What happens if the API request fails (eg endpoint is unreachable)? We may end up in a state where not all eth addresses make it to the reserved usernames table.

Should we also have some sort of cron script that takes all eth addresses from keyserver DB and hits the addReservedUsernames endpoint to "fix things up" so things are eventually in a correct state?

yep that's what keyserver/src/cron/update-identity-reserved-usernames.js does