Make Exchanger handler dispatch recoverable after process restart

Aperta
#1,663 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start with src/keri/peer/exchanging.py, especially Exchanger.processEvent() and the persistence and handler-dispatch steps linked in the issue. Trace how persisted exchanges and startup recovery are handled before choosing a durable strategy; the issue does not name specific tests or storage files. Done means focused crash/restart tests show accepted EXNs are recoverable, rejected EXNs stay out of the work path, and repeated handler processing is safe.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature request description/rationale

Exchanger.processEvent() persists a successfully verified exchange message and then dispatches it to the registered behavior handler:

https://github.com/WebOfTrust/keripy/blob/e2a1e35ca2b7d3ef1920c4bc956ccfd7400b46b6/src/keri/peer/exchanging.py#L171-L185

There is no durable indication that handler dispatch still needs to occur or a startup path that re-dispatches a persisted exchange whose handler did not finish. If the process stops after logEvent() but before or during behavior.handle(), the EXN can remain saved while the application-layer work triggered by that EXN is lost.

This matters for downstream handlers that drive IPEX and multisig workflows. It is the KERIpy side of the application-layer reliability concern described in WebOfTrust/keria#433.

Expected behavior

Once KERIpy accepts and persists an EXN for handler processing, a process restart must not permanently lose the associated handler work.

KERIpy should use a durable queue, escrow, or another appropriate storage strategy so incomplete handler dispatch can be recovered after startup. The implementation should also define safe repeated processing where recovery may cause an exchange to be presented to a handler more than once.

Suggested scope
  • Preserve pending handler work across process shutdown or failure.
  • Recover and resume or safely repeat incomplete dispatch on startup.
  • Keep rejected or unverifiable EXNs outside the durable work path.
  • Make the ownership boundary between Exchanger persistence and application handler completion explicit.
  • Add focused crash/restart tests around persistence, dispatch, and completion.

Related: WebOfTrust/keria#433

Lingua principale
Python
Stelle
81
Fork
79
Merge medio
2g 14h
PR unite (30g)
25

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WebOfTrust/keripy

Tutte le issue di WebOfTrust/keripy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.