-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: clean up spam error logs #23
Changes from all commits
6f6669d
ac39e95
990e639
4c418a6
4b0e782
5c2523d
d4cd1e7
907407f
408685c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ import ( | |
"database/sql" | ||
"errors" | ||
"fmt" | ||
"strings" | ||
"time" | ||
|
||
dbtypes "github.com/skip-mev/go-fast-solver/db" | ||
|
@@ -85,6 +86,36 @@ func (r *RelayerRunner) Run(ctx context.Context) error { | |
|
||
destinationTxHash, destinationChainID, err := r.relayHandler.Relay(ctx, transfer.SourceChainID, transfer.MessageSentTx) | ||
if err != nil { | ||
// Unrecoverable error | ||
if strings.Contains("execution reverted", err.Error()) { | ||
lmt.Logger(ctx).Warn( | ||
"abandoning hyperlane transfer", | ||
zap.Int64("transferId", transfer.ID), | ||
zap.String("txHash", transfer.MessageSentTx), | ||
zap.Error(err), | ||
) | ||
|
||
if _, err := r.db.SetMessageStatus(ctx, db.SetMessageStatusParams{ | ||
TransferStatus: dbtypes.TransferStatusAbandoned, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you also fill the |
||
SourceChainID: transfer.SourceChainID, | ||
DestinationChainID: transfer.DestinationChainID, | ||
MessageID: transfer.MessageID, | ||
}); err != nil { | ||
lmt.Logger(ctx).Error( | ||
"error updating invalid transfer status", | ||
zap.Int64("transferId", transfer.ID), | ||
zap.String("txHash", transfer.MessageSentTx), | ||
zap.Error(err), | ||
) | ||
} | ||
continue | ||
} | ||
|
||
// warning already logged in relayer | ||
if errors.Is(err, ErrNotEnoughSignaturesFound) { | ||
continue | ||
} | ||
|
||
lmt.Logger(ctx).Error( | ||
"error relaying pending hyperlane transfer", | ||
zap.Error(err), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ import ( | |
"fmt" | ||
"math/big" | ||
"strconv" | ||
"strings" | ||
"time" | ||
|
||
dbtypes "github.com/skip-mev/go-fast-solver/db" | ||
|
@@ -226,7 +227,7 @@ func (r *OrderSettler) verifyOrderSettlements(ctx context.Context) error { | |
|
||
if err = r.verifyOrderSettlement(ctx, settlement); err != nil { | ||
lmt.Logger(ctx).Warn( | ||
"error verifying order settlement", | ||
"failed to verify order settlement, will retry verification on next interval", | ||
zap.Error(err), | ||
zap.String("orderID", settlement.OrderID), | ||
zap.String("sourceChainID", settlement.SourceChainID), | ||
|
@@ -413,6 +414,11 @@ func (r *OrderSettler) verifyOrderSettlement(ctx context.Context, settlement db. | |
if settlement.SettlementStatus == dbtypes.SettlementStatusPending { | ||
gasCost, failure, err := destinationBridgeClient.GetTxResult(ctx, settlement.InitiateSettlementTx.String) | ||
if err != nil { | ||
// Check if the error is due to tx not found | ||
if strings.Contains(err.Error(), "tx") && strings.Contains(err.Error(), "not found") && strings.Contains(err.Error(), settlement.InitiateSettlementTx.String) { | ||
// Transaction not yet indexed, we'll check again later | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. damn so the node is returning a 200 but its actually an error. error string checking is never great but seems like this is probably the easiest solution for now so im good with it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah i couldnt think of a cleaner way to do this |
||
return fmt.Errorf("transaction not yet indexed. will retry fetching next interval") | ||
} | ||
return fmt.Errorf("failed to fetch message received event: %w", err) | ||
} else if failure != nil { | ||
lmt.Logger(ctx).Error("tx failed", zap.String("failure", failure.String())) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{"level":"error","ts":1731035755.109063,"caller":"hyperlane/relayer_runner.go:88","msg":"error relaying pending hyperlane transfer","error":"processing message on domain 42161: processing message on destination mailbox: execution reverted: !threshold","sourceChainID":"osmosis-1","txHash":"9C4EDA7213A3909E7F852B4047BFE74F76CD2477C8C92CA1975DD70B74547F73","stacktrace":"[github.com/skip-mev/go-fast-solver/hyperlane.(*RelayerRunner).Run](http://github.com/skip-mev/go-fast-solver/hyperlane.(*RelayerRunner).Run)\n\t/solver/hyperlane/relayer_runner.go:88\nmain.main.func6\n\t/solver/cmd/solver/main.go:153\[ngolang.org/x/sync/errgroup.(*Group).Go.func1](http://ngolang.org/x/sync/errgroup.(*Group).Go.func1)\n\t/root/.cache/go-build/golang.org/x/[email protected]/errgroup/errgroup.go:78"}