Skip to content

Support registering an account to the allowlist - #2610

Open
Mirko-von-Leipzig wants to merge 1 commit into
mirko/account-whitelist-adminfrom
mirko/account-whitelist-registration
Open

Support registering an account to the allowlist#2610
Mirko-von-Leipzig wants to merge 1 commit into
mirko/account-whitelist-adminfrom
mirko/account-whitelist-registration

Conversation

@Mirko-von-Leipzig

Copy link
Copy Markdown
Collaborator

Summary

Adds a new gRPC method to register an account using an invitation code.

The method is idempotent, and rejects requests which specify an unknown invitation code or which attempts to register an account that is already registered.

Changelog

[[entry]]
scope       = "rpc"
impact      = "added"
description = "Added `RegisterAccount` which adds an account to the allowlist using an invitation code"

Stack created with GitHub Stacks CLIGive Feedback 💬

@Mirko-von-Leipzig
Mirko-von-Leipzig added this pull request to stack #2611 September 11, 2026 08:23
Comment thread proto/proto/rpc.proto

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@igamigo this is what I had in mind. Let me know if this isn't suitable for some reason?

An open question is whether the invite code should be a string or bytes, but I feel like a string makes more sense so it can be used manually.

@Mirko-von-Leipzig Mirko-von-Leipzig Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another question is funding.. at the moment I'm thinking a separate side car service that polls the admin API for new account registrations and sends funds that way.

One alternative would be that RegisterAccount uses the funding service we are building, and sends the private note to the caller as part of this registration?

This would be less work, but does tie registration to funding which may or may not be desireable from the client side.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other downside is that using the admin api to register an account directly, would also have to return the funding note - and that flow doesn't make much sense.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @bobbinth, this is probably also a good point to get your input on.

@Mirko-von-Leipzig Mirko-von-Leipzig Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A cute option is to use the note transport service.. or to make the notes public in any case? Using the transport service is elegant but couples a lot of infrastructure to it which may or may not be desireable.

Dog fooding = good, but having everything die because one service is down is less good.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would let the client discover the note on their own. This should use already existing mechanism and so avoid specialized new code for this use case.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no client in this case; so its much more code because we need to recreate a client specifically for this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean to create the notes or to consume them? The consumption will go through regular wallet flows - so, if we create a public P2ID note, everything else should work as it currently does (i.e., no need to specialize anything).

@Mirko-von-Leipzig Mirko-von-Leipzig Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I think we're slightly missing each other here.

Our infrastructure accounts e.g. the monitor, also require funding. And they don't have a proper client, just whatever we code there. They'll be using this funding service to remain topped up, but for them its easier if they either receive the full note info or at least the note ID so they don't have to poll and sync notes constantly.

They also have to register; but we can register them directly via the admin api.

@igamigo igamigo Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two cents on this:

  • I'd agree with using the funding service for this. I don't think it's bad that this couples infrastructure as it should be a short-term solution anyway
  • I'd still make the funding service return the note as bytes. The note can be returned optimistically (e.g., before the note actually exists on a block). The registering endpoint may still want to discard it, but for other usecases I believe this is useful. EDIT: basically for what Mirko said, the conversation updated when I posted my comment

@Mirko-von-Leipzig
Mirko-von-Leipzig force-pushed the mirko/account-whitelist-registration branch from 6e60b2c to d3f5301 Compare September 11, 2026 08:59

@igamigo igamigo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread proto/proto/rpc.proto

@igamigo igamigo Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two cents on this:

  • I'd agree with using the funding service for this. I don't think it's bad that this couples infrastructure as it should be a short-term solution anyway
  • I'd still make the funding service return the note as bytes. The note can be returned optimistically (e.g., before the note actually exists on a block). The registering endpoint may still want to discard it, but for other usecases I believe this is useful. EDIT: basically for what Mirko said, the conversation updated when I posted my comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants