B6: atomic UTXO reservation, bet signed by the worker and saved before broadcast, broadcast verdicts (BET-30..33)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-11-16 16:18:34 +01:00
1 parent 2acd4ccd1c
commit feff993584
25 files changed
+995 -53

No files matched your search

+5
View File
@@ -87,6 +87,11 @@ def open_new_round_if_needed(now: datetime | None = None) -> Round | None:
server_seed_hash=server_seed_commitment(seed), # public from now on (RND-34)
server_seed_enc=encrypt_seed(seed), # the secret itself stays hidden until the reveal
)
if settings.LEDGER_BACKEND == "chain": # DAT-60: this round's own address, from the public key
from .chain import derive_pool_address
round_.pool_address = derive_pool_address(round_.pk)
round_.save(update_fields=["pool_address"])
except IntegrityError: # another process opened one first (ADR-22): use theirs
return get_active_round()
audit.record("round_opened", actor_label=WORKER, subject_type="round", subject_id=round_.pk,