Make Exchanger handler dispatch recoverable after process restart

未关闭
#1,663 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
python
领域
backend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
Python
星标
81
派生
79
平均合并
2 天 14 小时
30 天内合并 PR
25

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

WebOfTrust/keripy 的其他 Issue

查看 WebOfTrust/keripy 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。