Safe restore from a backup: START_PAUSED and the derivation-gap check (B-90, REG-15, OPS-27)

START_PAUSED=true pauses the lottery as the operator before the scheduler exists.
On the first Electrum session the 20 derivation indexes past the highest
assigned one are looked up on every server; if any has history, registration
stays closed (503 registration_unavailable) and restore_gap_detected is
written, so a restored database cannot hand a lost user's address to a new one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-10-18 00:43:45 +02:00
1 parent 55d852fe08
commit 40ac490826
21 files changed
+281 -70

No files matched your search

+5
View File
@@ -50,3 +50,8 @@ ADMIN_TOKEN=
# endpoints included — to anyone who requests them. Off by default; set to
# true only for local development, never in production.
ENABLE_API_DOCS=false
# Start with the lottery paused (as the operator's pause, audit-logged), e.g. after
# restoring a backup: nothing opens a round until you resume from /admin. See
# docs/operativita.md (OPS-27).
START_PAUSED=false