From 907104765c64fae5cf4f2a40a8561c7ff6184058 Mon Sep 17 00:00:00 2001 From: Victor Castell Date: Fri, 29 Sep 2023 17:29:33 +0200 Subject: [PATCH] Add RLP receipts to trace --- state/executor.go | 1 + types/types.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/state/executor.go b/state/executor.go index b60a618abe..3ac19799e0 100644 --- a/state/executor.go +++ b/state/executor.go @@ -396,6 +396,7 @@ func (t *Transition) Write(txn *types.Transaction) error { txnTrace := &types.TxnTrace{ Transaction: txn.MarshalRLP(), + Receipt: receipt.MarshalRLP(), Delta: t.Txn().GetCompactJournal(), Hash: txn.Hash, GasUsed: result.GasUsed, diff --git a/types/types.go b/types/types.go index cb492381aa..7d7e227484 100644 --- a/types/types.go +++ b/types/types.go @@ -261,6 +261,9 @@ type TxnTrace struct { // ReceiptRoot is the root of the trie of receipts for this transaction ReceiptRoot Hash `json:"receiptRoot"` + // Receipt is the RLP encoding of the receipt for this transaction + Receipt ArgBytes `json:"receipt"` + // TxnRoot is the root of the trie of transactions for this block TxnRoot Hash `json:"txnRoot,omitempty"`