Complete the target spec for the 2026-09-28 review (B-73..B-98)
Finishes what 88221b0 started: sicurezza.md, audit-log.md and storico-bug.md
now describe the target behaviour too, the operator guides are corrected
against today's code, and api.md gains the missing /health/ready and
/admin/electrum sections plus every new error code in its catalog.
Harmonised names and owners across documents (the `resurrected_tx` pause
reason, the reconciler as the one that watches failed rows, the full
`winner_drawn` payload, a reason for an unanswered pre-payout pool check,
one corroboration-failure row per hash instead of one per tick).
Adds B-98 (coin selection stops at the first covering UTXO and refuses a
payable bet), tightens RND-40 to check both 1 and 400 participants and to
guard PUT /admin/config, and gives a stalled `closing` round a signal
(TX-29, closing_stalled).
Records three decisions confirmed on 2026-09-29: the draw's server_seed is
stored Fernet-encrypted until revealed (SEC-56, DAT-64), the chosen abuse
and key-check thresholds (SEC-49, SEC-54, SEC-55), and a broadcast
rejection is verified against every server before any coin is released,
so matching "already known" text is a shortcut, not a safety condition
(TX-04).
Spec only; no code changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
88221b0dbd
commit
4be58709d1
16 files changed
+1377
-323
No files matched your search
@@ -68,9 +68,20 @@ Lo stato nel database non basta per la scadenza ([BET-04]) perché lo
|
||||
scheduler controlla ogni 5 secondi: fino a 5 secondi il round può risultare
|
||||
ancora `open` oltre la scadenza.
|
||||
|
||||
La selezione si ferma alla prima moneta che porta il totale a coprire il
|
||||
costo ([BET-08]): il resto di [BET-09] si misura su quelle monete, non
|
||||
sull'intero saldo.
|
||||
- **[BET-24]** **La selezione garantisce il resto quando il saldo lo
|
||||
permette.** Le monete si scelgono dalla più grande finché il totale copre il
|
||||
costo **più** 294 sat (`DUST_LIMIT_SATS`); [BET-09] rifiuta la scommessa solo
|
||||
se nemmeno tutte le monete disponibili (entro le 50 di [BET-08]) bastano.
|
||||
Con monete da 10 PLM e da 1 PLM, una scommessa da 10 PLM usa entrambe e
|
||||
lascia 1 PLM di resto. Lo stesso vale per il prelievo: la riduzione di
|
||||
[WDR-09] scatta solo quando nessuna combinazione di monete lascia un resto
|
||||
sufficiente.
|
||||
*Codice:* `app/wallet/psbt_builder.py:select_utxos` ·
|
||||
*Test:* —
|
||||
*Stato:* da implementare (B-98) · *Oggi:* la selezione si ferma alla prima
|
||||
moneta che copre il costo, e il resto si misura solo su quelle monete: con
|
||||
10 + 1 PLM una scommessa da 10 PLM è rifiutata con `balance_leaves_no_change`
|
||||
e un prelievo da 10 PLM viene ridotto invece di usare la seconda moneta.
|
||||
|
||||
- **[BET-21]** Il **costo** di una scommessa è il `bet_amount_sats`
|
||||
fotografato sul round alla sua apertura
|
||||
|
||||
Reference in new issue
Block a user