Skip to content

Add allowlist database - #2608

Open
Mirko-von-Leipzig wants to merge 2 commits into
nextfrom
mirko/account-whitelist
Open

Add allowlist database#2608
Mirko-von-Leipzig wants to merge 2 commits into
nextfrom
mirko/account-whitelist

Conversation

@Mirko-von-Leipzig

Copy link
Copy Markdown
Collaborator

Summary

Adds a new sequencer-only database for holding account allowlist data.

This is a separate database because:

  1. It is temporary, and
  2. it requires a separate write path and I don't want to interfere with the chain data.

Changelog

[[entry]]
scope       = "node"
impact      = "added"
description = "Added a new sequencer database for tracking account allowlist"

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
CREATE TABLE account_allowlist (
id INTEGER PRIMARY KEY,
account_id BLOB UNIQUE,
invitation_digest BLOB UNIQUE,

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.

should we make the invitation digest the PK?

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.

We can't because its optional :D

An admin is also allowed to inject an account ID directly without needing an invitation code.

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.

Would it be worth adding a notes column to this then? Something to write basic notes about who got the code, etc. Alternatively the invitation digest could be random and enforced and then we could get rid of id.

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.

Also should invitation_digest be indexed?

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.

I explicitly didn't want to track who got the code assigned here. I figured that could be done externally by whoever is handing them out. Otherwise we could also store the original code instead of the digest.

@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.

Yeah, makes sense. IMO since this is supposed to be just for the closed mainnet and not a long term thing we could make it more immediately functional (eg if there is going to be a UI for editing the DB I think it could make sense to have notes there already, but the benefit is not substantial anyway so either way works for me; similarly for the actual invite code)

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.

That's fair; I was looking at it more from a perspective of who operates what i.e. sequencer operator is likely not the allowlist admin

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.

3 participants