From 1fd2dd50ce7e1b25aa630b480e715b113af9fada Mon Sep 17 00:00:00 2001 From: Joe Dragon Date: Tue, 31 Mar 2026 06:17:05 -0500 Subject: [PATCH] Add correlation_id to TransactionCreateRequest and TransactionHeader Callers can set correlation_id when creating transactions to link related transactions together (e.g. all transactions in a workflow). The field propagates through the PRIME pipeline and child transactions. --- models/models.go | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/models/models.go b/models/models.go index f0adee1..f292b89 100644 --- a/models/models.go +++ b/models/models.go @@ -5,10 +5,11 @@ const ( ) type TransactionCreateRequest struct { - Version string `json:"version,omitempty"` - TxnType string `json:"txn_type"` - Payload string `json:"payload"` - Tag string `json:"tag,omitempty"` + Version string `json:"version,omitempty"` + TxnType string `json:"txn_type"` + Payload string `json:"payload"` + Tag string `json:"tag,omitempty"` + CorrelationId string `json:"correlation_id,omitempty"` } type TransactionCreateResponse struct { @@ -35,13 +36,14 @@ type Transaction struct { } type TransactionHeader struct { - Tag string `json:"tag"` - DcId string `json:"dc_id"` - TxnId string `json:"txn_id"` - Invoker string `json:"invoker"` - BlockId string `json:"block_id"` - TxnType string `json:"txn_type"` - Timestamp string `json:"timestamp"` + Tag string `json:"tag"` + DcId string `json:"dc_id"` + TxnId string `json:"txn_id"` + Invoker string `json:"invoker"` + BlockId string `json:"block_id"` + TxnType string `json:"txn_type"` + Timestamp string `json:"timestamp"` + CorrelationId string `json:"correlation_id,omitempty"` } type TransactionProof struct {