Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions universalClient/chains/evm/event_confirmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,19 @@ func (ec *EventConfirmer) processPendingEvents(ctx context.Context) error {
continue
}

// eth_getLogs only returns logs from txs with receipt status 1, so this
// branch should never fire on a healthy RPC. Kept as defense-in-depth and
// for symmetry with the SVM confirmer, which has a real path here.
if receipt.Status != 1 {
if _, updateErr := ec.chainStore.UpdateEventStatus(event.EventID, store.StatusPending, store.StatusReverted); updateErr != nil {
ec.logger.Error().
Err(updateErr).
Str("event_id", event.EventID).
Msg("failed to mark failed-tx event as REVERTED")
}
continue
}

// Check if transaction is confirmed based on confirmation type
requiredConfirmations := ec.getRequiredConfirmations(event.ConfirmationType)
confirmations := latestBlock - receipt.BlockNumber.Uint64() + 1
Expand Down
13 changes: 13 additions & 0 deletions universalClient/chains/svm/event_confirmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,19 @@ func (ec *EventConfirmer) processPendingEvents(ctx context.Context) error {
continue
}

// Solana preserves meta.logMessages even when meta.err is set, so a Program
// data: line from a failed tx can reach the listener. Mark such events
// REVERTED here so they never promote to CONFIRMED and trigger a vote.
if tx.Meta.Err != nil {
if _, updateErr := ec.chainStore.UpdateEventStatus(event.EventID, store.StatusPending, store.StatusReverted); updateErr != nil {
ec.logger.Error().
Err(updateErr).
Str("event_id", event.EventID).
Msg("failed to mark failed-tx event as REVERTED")
}
continue
}

// Get transaction slot
txSlot := tx.Slot
if txSlot == 0 {
Expand Down
Loading