From ac2fa5d69190f33ce6b924127dc23c06bfc991f3 Mon Sep 17 00:00:00 2001 From: dwasse Date: Tue, 16 Jul 2024 18:48:11 -0500 Subject: [PATCH] RFQ Guard: fixes (#2878) --- services/rfq/guard/service/handlers.go | 2 +- services/rfq/relayer/service/handlers.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/services/rfq/guard/service/handlers.go b/services/rfq/guard/service/handlers.go index cc98c7e4e7..736fd61b5a 100644 --- a/services/rfq/guard/service/handlers.go +++ b/services/rfq/guard/service/handlers.go @@ -117,7 +117,7 @@ func (g *Guard) handleProveCalled(parentCtx context.Context, proven *guarddb.Pen // first, get the corresponding bridge request bridgeRequest, err := g.db.GetBridgeRequestByID(ctx, proven.TransactionID) if err != nil { - return fmt.Errorf("could not get bridge request: %w", err) + return fmt.Errorf("could not get bridge request for txid %s: %w", hexutil.Encode(proven.TransactionID[:]), err) } valid, err := g.isProveValid(ctx, proven, bridgeRequest) diff --git a/services/rfq/relayer/service/handlers.go b/services/rfq/relayer/service/handlers.go index d8f85ebb1f..e67ed15de4 100644 --- a/services/rfq/relayer/service/handlers.go +++ b/services/rfq/relayer/service/handlers.go @@ -373,6 +373,10 @@ func (q *QuoteRequestHandler) handleRelayCompleted(ctx context.Context, _ trace. // // This is the seventh step in the bridge process. Here we process the event that the proof was posted on chain. func (r *Relayer) handleProofProvided(ctx context.Context, req *fastbridge.FastBridgeBridgeProofProvided) (err error) { + if req.Relayer != r.signer.Address() { + return nil + } + // TODO: this can still get re-orged // ALso: we should make sure the previous status is ProvePosting err = r.db.UpdateQuoteRequestStatus(ctx, req.TransactionId, reldb.ProvePosted, nil)