[consensus] Unify epoch settlement across paths (cross-path double-credit + schema drift)
I maintainer di solito rispondono entro 10 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Ambito
- backend, databases, distributed-systems
Direzione di ricerca
The settlement writers live in finalize_epoch (node), settle_epoch_rip200 in rewards_implementation_rip200.py, settle_epoch_with_anti_double_mining in anti_double_mining.py, and the divergent epoch_state CREATE in sophia_elya_service.py. Read how each path opens its transaction and writes epoch_state before proposing a shared claim_epoch helper. Done means one schema source and a single claim before settlement, backed by a migration plan agreed in the thread.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Spun out of PR #(epoch-settlement-atomic). Tri-brain (3 loops) surfaced that epoch settlement has multiple independent writers with no shared concurrency control:
finalize_epoch(node) — writesbalances+epoch_state.settled(now atomic vs itself after the PR)settle_epoch_rip200(rewards_implementation_rip200.py) — writesepoch_rewards+epoch_state.settled(INSERT OR REPLACE)settle_epoch_with_anti_double_mining(anti_double_mining.py) — same patternsophia_elya_service.pyhas its ownepoch_stateCREATE withoutsettled/settled_ts
Risks
- Cross-path race: two settlement paths can settle the same epoch concurrently — no shared lock/claim spans them.
- INSERT OR REPLACE epoch_state in the rewards/anti-double-mining paths clobbers
accepted_blocks/finalizedwritten by block ingest. - Schema drift: divergent
epoch_stateCREATEs across files → missing-column errors / order-dependent migrations in mixed/standalone deployments. - Two visibility models: reward APIs read
epoch_rewards; finalize-path settlements only appear inepoch_state/balances.
Proposed direction
- One canonical settlement entrypoint (or a shared
claim_epoch(con, epoch)helper usingBEGIN IMMEDIATEthat all paths call first). - Single source of truth for
epoch_stateschema (shared init) + remove the divergent CREATE. - Reconcile
epoch_rewardsvsepoch_state(dual-write or pick one).
CHAOTIC-tier; needs deliberate design + a migration plan. Good bounty candidate.
- Lingua principale
- Python
- Stelle
- 850
- Fork
- 589
- Merge medio
- 11g 7h
- PR unite (30g)
- 29
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Scottcjn/Rustchain
-
utxo_ledger (reference): failed apply_transaction leaks already-created outputs (supply inflation)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 10 giorni
-
SDK CLI prints 0 RTC for canonical /wallet/balance responsesForse già presa @ArtyormSatori l’ha presa 37 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Scottcjn/Rustchain#8580 · 4 commenti ·
I maintainer di solito rispondono entro 10 giorni
-
utxo_ledger (reference): no coinbase authorization; mempool admits any input-less MINING_REWARDAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
I maintainer di solito rispondono entro 10 giorni
-
[SECURITY] Non-finite and garbage weights pass the sybil-guard money chain — enrollment_weight has no isfinite guard and epoch_weight_to_units raises on NaN/infForse già presa @thinhnx128 l’ha presa 28 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Scottcjn/Rustchain#8619 · 2 commenti ·
I maintainer di solito rispondono entro 10 giorni
-
[Antiquity] Celeron M (Banias/Dothan, 2004) has no brand rule — real vintage silicon falls to x86 default 1.0x while its Pentium M twin earns 1.9xForse già presa @Limm-web l’ha presa 60 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Scottcjn/Rustchain#8578 · 5 commenti ·
I maintainer di solito rispondono entro 10 giorni
Tutte le issue di Scottcjn/Rustchain
Issue simili
-
[Resource]: SpaicelyApertaresource-submission validation-passed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
hesreallyhim/awesome-claude-code#3875 · 1 commento ·
-
[Bug]: Ajax Pro login issueApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
bvis/aegis-hass#725 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
datasektionen/cashflow#468 ·
-
dont call alembic upgrade until we check whether or not the cache DB has an alembic version stampAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Bug: AttributeError: 'GptOssConfig' object has no attribute 'rope_scaling_factor' with transformers >= 5.xForse già presa @NimaVaziri l’ha presa oggi. ApertaPytorch
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA/TensorRT-LLM#23406 ·
I maintainer di solito rispondono entro 1 giorno