Make Exchanger handler dispatch recoverable after process restart

Abierto
#1,663 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Python
Estrellas
81
Forks
79
Merge medio
2 d 14 h
PR fusionados (30 d)
25

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de WebOfTrust/keripy

Todos los issues de WebOfTrust/keripy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.