-
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
Conversation
@@ -395,6 +396,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 comment
The reason will be displayed to describe this comment to others. Learn more.
{"level":"warn","ts":1730925413.9067168,"caller":"ordersettler/ordersettler.go:218","msg":"error verifying order settlement","error":"failed to fetch message received event: error in json rpc client, with http response metadata: (Status: 200 OK, Protocol HTTP/2.0). RPC error -32603 - Internal error: tx (47F32765BE617BAC646C14556D639EB23785FEA6F7A9E2F25C0ADA41C92263F9) not found","orderID":"e39a4116fb7dddae48bcd40b69edaddc190b2ad098a72260db23f96805486c6b","sourceChainID":"42161"}
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i couldnt think of a cleaner way to do this
hyperlane/relayer_runner.go
Outdated
destinationTxHash, destinationChainID, err := r.relayHandler.Relay(ctx, transfer.SourceChainID, transfer.MessageSentTx) | ||
if err != nil { | ||
if errors.Is(err, ErrNotEnoughSignaturesFound) { | ||
// warning already logged in relayer |
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.
this is to prevent spam of
{"level":"error","ts":1731035285.0626438,"caller":"hyperlane/relayer_runner.go:88","msg":"error relaying pending hyperlane transfer","error":"getting checkpoint at index 328: expected atleast 3 signatures in multisig signed checkpoint, but got 0","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"}
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.
ty for this sir, LGTM
@@ -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 |
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"}
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.
Thanks Nadim!
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 comment
The reason will be displayed to describe this comment to others. Learn more.
can you also fill the TransferStatusMessage
field here with the revert message? bonus if you also rename this query method to SetTransferStatus
No description provided.