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, Nov 11, 5:25 AM
Unknown Object (File)
Fri, Nov 8, 3:41 PM
Unknown Object (File)
Thu, Nov 7, 9:48 AM
Unknown Object (File)
Tue, Oct 22, 5:28 PM
Unknown Object (File)
Sat, Oct 19, 4:20 AM
Unknown Object (File)
Sat, Oct 19, 4:20 AM
Unknown Object (File)
Sat, Oct 19, 4:20 AM
Unknown Object (File)
Sat, Oct 19, 4:18 AM
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