From 4dfb545c1c470e52ca51ef8d93b6dcf166704351 Mon Sep 17 00:00:00 2001 From: Alexander Date: Wed, 2 Oct 2024 11:27:00 -0400 Subject: [PATCH] Redundant write on EigenDA failure --- store/router.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/store/router.go b/store/router.go index 08c496ca..244706dc 100644 --- a/store/router.go +++ b/store/router.go @@ -3,6 +3,7 @@ package store import ( + "bytes" "context" "errors" "fmt" @@ -229,8 +230,13 @@ func (r *Router) multiSourceRead(ctx context.Context, commitment []byte, fallbac continue } - // verify cert:data using EigenDA verification checks - err = r.eigenda.Verify(commitment, data) + if bytes.Equal(key, commitment) { + err = src.Verify(commitment, data) + } else { + // verify cert:data using EigenDA verification checks + err = r.eigenda.Verify(commitment, data) + } + if err != nil { log.Warn("Failed to verify blob", "err", err, "backend", src.BackendType()) continue