feat(relay): add NIP-ER push scheduler with cross-pod delivery (#957)

Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
Will Pfleger
2026-06-17 10:43:22 -04:00
committed by GitHub
parent 79fcfd82bc
commit 26563968cb
10 changed files with 593 additions and 29 deletions

View File

@@ -105,6 +105,8 @@ CREATE TABLE events (
channel_id UUID,
deleted_at TIMESTAMPTZ,
d_tag TEXT,
not_before BIGINT,
delivered_at BIGINT,
PRIMARY KEY (created_at, id)
) PARTITION BY RANGE (created_at);
@@ -132,6 +134,8 @@ CREATE INDEX idx_events_id ON events (id);
CREATE INDEX idx_events_deleted ON events (deleted_at);
CREATE INDEX idx_events_addressable ON events (kind, pubkey, channel_id, deleted_at);
CREATE INDEX idx_events_parameterized ON events (kind, pubkey, d_tag, deleted_at) WHERE d_tag IS NOT NULL;
CREATE INDEX idx_events_not_before ON events (not_before)
WHERE not_before IS NOT NULL AND deleted_at IS NULL AND delivered_at IS NULL;
-- ── Event mentions ────────────────────────────────────────────────────────────