Skip to content
Merged
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
2 changes: 1 addition & 1 deletion chains/txmgr/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ func (eb *Broadcaster[CID, HEAD, ADDR, THASH, BHASH, SEQ, FEE]) handleInProgress

lgr := etx.GetLogger(logger.With(eb.lggr, "fee", attempt.TxFee))
errType, err := eb.client.SendTransactionReturnCode(ctx, etx, attempt, lgr)
eb.lggr.Infow("Broadcasted transaction", "txHash", attempt.Hash, "tracingID", etx.GetTracingID(lgr), "attempt", attempt, "etxID", etx.ID, "etx", etx, "errType", errType, "err", err)
eb.lggr.Infow("Broadcasted transaction", "txHash", attempt.Hash, "transactionLifecycleID", etx.GetTransactionLifecycleID(lgr), "attempt", attempt, "etxID", etx.ID, "etx", etx, "errType", errType, "err", err)

// The validation below is only applicable to Hedera because it has instant finality and a unique sequence behavior
if eb.chainType == hederaChainType {
Expand Down
6 changes: 3 additions & 3 deletions chains/txmgr/confirmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ func (ec *Confirmer[CID, HEAD, ADDR, THASH, BHASH, R, SEQ, FEE]) ProcessIncluded
continue
}
confirmedTxIDs = append(confirmedTxIDs, tx.ID)
ec.lggr.Infow("Transaction confirmed", "etxID", tx.ID, "tracingID", tx.GetTracingID(ec.lggr))
ec.lggr.Infow("Transaction confirmed", "etxID", tx.ID, "transactionLifecycleID", tx.GetTransactionLifecycleID(ec.lggr))
observeUntilTxConfirmed(ctx, ec.metrics, tx, head)
}
// Mark the transactions included on-chain with a purge attempt as fatal error with the terminally stuck error message
Expand Down Expand Up @@ -811,9 +811,9 @@ func (ec *Confirmer[CID, HEAD, ADDR, THASH, BHASH, R, SEQ, FEE]) ForceRebroadcas
attempt.Tx = *etx // for logging
errType, err := ec.client.SendTransactionReturnCode(ctx, *etx, attempt, ec.lggr)
if errType == multinode.Successful || errType == multinode.TransactionAlreadyKnown {
ec.lggr.Infow("ForceRebroadcast: Broadcasted transaction", "txHash", attempt.Hash, "tracingID", etx.GetTracingID(ec.lggr), "attempt", attempt, "etxID", etx.ID, "etx", etx, "errType", errType, "err", err)
ec.lggr.Infow("ForceRebroadcast: Broadcasted transaction", "txHash", attempt.Hash, "transactionLifecycleID", etx.GetTransactionLifecycleID(ec.lggr), "attempt", attempt, "etxID", etx.ID, "etx", etx, "errType", errType, "err", err)
} else {
ec.lggr.Errorw("ForceRebroadcast: Broadcasted transaction", "txHash", attempt.Hash, "tracingID", etx.GetTracingID(ec.lggr), "attempt", attempt, "etxID", etx.ID, "etx", etx, "errType", errType, "err", err)
ec.lggr.Errorw("ForceRebroadcast: Broadcasted transaction", "txHash", attempt.Hash, "transactionLifecycleID", etx.GetTransactionLifecycleID(ec.lggr), "attempt", attempt, "etxID", etx.ID, "etx", etx, "errType", errType, "err", err)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion chains/txmgr/txmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ func (b *Txm[CID, HEAD, ADDR, THASH, BHASH, R, SEQ, FEE]) pruneQueueAndCreateTxn
"toAddress", txRequest.ToAddress,
"meta", txRequest.Meta,
"transactionID", tx.ID,
"tracingID", tx.GetTracingID(b.logger),
"transactionLifecycleID", tx.GetTransactionLifecycleID(b.logger),
)

return tx, nil
Expand Down
10 changes: 5 additions & 5 deletions chains/txmgr/types/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ type TxMeta[ADDR chains.Hashable, TX_HASH chains.Hashable] struct {
DualBroadcast *bool `json:"DualBroadcast,omitempty"`
DualBroadcastParams *string `json:"DualBroadcastParams,omitempty"`

// TracingID is used for tracing the entire lifecycle of a transaction from OCR Transmit to confirmation on-chain.
TracingID *string `json:"TracingID,omitempty"`
// TransactionLifecycleID is used for tracing the entire lifecycle of a transaction from OCR Transmit to confirmation on-chain.
TransactionLifecycleID *string `json:"TransactionLifecycleID,omitempty"`
}

type TxAttempt[
Expand Down Expand Up @@ -266,16 +266,16 @@ func (e *Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetMeta() (*TxMeta[A
return &m, nil
}

func (e *Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetTracingID(lgr logger.Logger) string {
func (e *Tx[CHAIN_ID, ADDR, TX_HASH, BLOCK_HASH, SEQ, FEE]) GetTransactionLifecycleID(lgr logger.Logger) string {
meta, err := e.GetMeta()
if err != nil {
lgr.Errorw("failed to get meta of the transaction", "err", err)
return ""
}
if meta == nil || meta.TracingID == nil {
if meta == nil || meta.TransactionLifecycleID == nil {
return ""
}
return *meta.TracingID
return *meta.TransactionLifecycleID
}

// GetLogger returns a new logger with metadata fields.
Expand Down
Loading