From 2b96010f837f1b1328f4af5da38e2f4d54352c28 Mon Sep 17 00:00:00 2001 From: Philip Feairheller Date: Thu, 4 Jan 2024 19:55:33 -0800 Subject: [PATCH] Fix sendArtifacts method to use the correct Serder subclass for TEL events. (#656) Signed-off-by: pfeairheller --- src/keri/core/serdering.py | 2 +- src/keri/peer/exchanging.py | 4 ++-- src/keri/vdr/credentialing.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/keri/core/serdering.py b/src/keri/core/serdering.py index 863434952..a6a464e0f 100644 --- a/src/keri/core/serdering.py +++ b/src/keri/core/serdering.py @@ -433,7 +433,7 @@ def __init__(self, *, raw=b'', sad=None, strip=False, version=Version, logger.error("Invalid raw for Serder %s\n%s", self.pretty(), ex.args[0]) raise ValidationError(f"Invalid raw for Serder = " - f"{self._sad}.") from ex + f"{self._sad}. {ex.args[0]}") from ex elif sad or makify: # serialize sad into raw or make sad if makify: # recompute properties and said(s) and reset sad diff --git a/src/keri/peer/exchanging.py b/src/keri/peer/exchanging.py index 0cf751a8f..21d30acc8 100644 --- a/src/keri/peer/exchanging.py +++ b/src/keri/peer/exchanging.py @@ -76,8 +76,8 @@ def processEvent(self, serder, tsgs=None, cigars=None, **kwargs): if tsgs is not None: for prefixer, seqner, ssaider, sigers in tsgs: # iterate over each tsg if sender != prefixer.qb64: # sig not by aid - raise MissingSignatureError("Exchange process: skipped signature not from aid=" - "%s on exn msg=\n%s\n", sender, serder.pretty()) + raise MissingSignatureError(f"Exchange process: skipped signature not from aid=" + f"{sender}, from {prefixer.qb64} on exn msg=\n{serder.pretty()}\n") if prefixer.qb64 not in self.kevers or self.kevers[prefixer.qb64].sn < seqner.sn: if self.escrowPSEvent(serder=serder, tsgs=tsgs, pathed=pathed): diff --git a/src/keri/vdr/credentialing.py b/src/keri/vdr/credentialing.py index 21da79b5b..b9b8fc223 100644 --- a/src/keri/vdr/credentialing.py +++ b/src/keri/vdr/credentialing.py @@ -980,7 +980,7 @@ def sendArtifacts(hby, reger, postman, creder, recp): postman.send(serder=serder, attachment=atc) for msg in reger.clonePreIter(pre=creder.said): - serder = serdering.SerderACDC(raw=msg) # coring.Serder(raw=msg) + serder = serdering.SerderKERI(raw=msg) # coring.Serder(raw=msg) atc = msg[serder.size:] postman.send(serder=serder, attachment=atc)