From f2926ce66254661f7f2bf468b847a80c5c92cf02 Mon Sep 17 00:00:00 2001 From: Dimitris Date: Thu, 26 Mar 2026 12:02:19 +0200 Subject: [PATCH] Rename TracingID to TransactionLifecycleID --- chains/txmgr/broadcaster.go | 2 +- chains/txmgr/confirmer.go | 6 +++--- chains/txmgr/txmgr.go | 2 +- chains/txmgr/types/tx.go | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/chains/txmgr/broadcaster.go b/chains/txmgr/broadcaster.go index 5f299cd..d99eba7 100644 --- a/chains/txmgr/broadcaster.go +++ b/chains/txmgr/broadcaster.go @@ -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 { diff --git a/chains/txmgr/confirmer.go b/chains/txmgr/confirmer.go index b34e69f..68146f6 100644 --- a/chains/txmgr/confirmer.go +++ b/chains/txmgr/confirmer.go @@ -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 @@ -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) } } } diff --git a/chains/txmgr/txmgr.go b/chains/txmgr/txmgr.go index 6f27672..5f3ac66 100644 --- a/chains/txmgr/txmgr.go +++ b/chains/txmgr/txmgr.go @@ -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 diff --git a/chains/txmgr/types/tx.go b/chains/txmgr/types/tx.go index 200925a..e4aba93 100644 --- a/chains/txmgr/types/tx.go +++ b/chains/txmgr/types/tx.go @@ -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[ @@ -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.