From 5b18d68620f680ce208b5912826c43599b1653cb Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Thu, 7 Sep 2023 16:41:34 +0100 Subject: [PATCH] Fix the event relevancy fields (#1506) * Fix the event relevancy fields * adding logindex and txindex --- go/common/tracers/debug_logs.go | 36 ++++++++++++------------ integration/simulation/network/socket.go | 1 + 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/go/common/tracers/debug_logs.go b/go/common/tracers/debug_logs.go index f37aef2b12..7c9a5c9836 100644 --- a/go/common/tracers/debug_logs.go +++ b/go/common/tracers/debug_logs.go @@ -24,29 +24,29 @@ type DebugLogs struct { // this holds a copy of the gethtypes.Log log marshaller func (l DebugLogs) MarshalJSON() ([]byte, error) { return json.Marshal(struct { - Address gethcommon.Address `json:"address" gencodec:"required"` - Topics []gethcommon.Hash `json:"topics" gencodec:"required"` - Data hexutil.Bytes `json:"data" gencodec:"required"` - BlockNumber hexutil.Uint64 `json:"blockNumber"` - TxHash gethcommon.Hash `json:"transactionHash" gencodec:"required"` - TxIndex hexutil.Uint `json:"transactionIndex"` - BlockHash gethcommon.Hash `json:"blockHash"` - Index hexutil.Uint `json:"logIndex"` - Removed bool `json:"removed"` - LifecycleEvent bool `json:"lifecycleEvent"` - RelAddress1 *gethcommon.Hash `json:"relAddress1"` - RelAddress2 *gethcommon.Hash `json:"relAddress2"` - RelAddress3 *gethcommon.Hash `json:"relAddress3"` - RelAddress4 *gethcommon.Hash `json:"relAddress4"` + Address string `json:"address" gencodec:"required"` + Topics []gethcommon.Hash `json:"topics" gencodec:"required"` + Data hexutil.Bytes `json:"data" gencodec:"required"` + BlockNumber uint64 `json:"blockNumber"` + TxHash gethcommon.Hash `json:"transactionHash" gencodec:"required"` + TxIndex uint `json:"transactionIndex"` + BlockHash gethcommon.Hash `json:"blockHash"` + Index uint `json:"logIndex"` + Removed bool `json:"removed"` + LifecycleEvent bool `json:"lifecycleEvent"` + RelAddress1 *gethcommon.Hash `json:"relAddress1"` + RelAddress2 *gethcommon.Hash `json:"relAddress2"` + RelAddress3 *gethcommon.Hash `json:"relAddress3"` + RelAddress4 *gethcommon.Hash `json:"relAddress4"` }{ - l.Address, + l.Address.Hex(), l.Topics, l.Data, - hexutil.Uint64(l.BlockNumber), + l.BlockNumber, l.TxHash, - hexutil.Uint(l.TxIndex), + l.TxIndex, l.BlockHash, - hexutil.Uint(l.Index), + l.Index, l.Removed, l.LifecycleEvent, l.RelAddress1, diff --git a/integration/simulation/network/socket.go b/integration/simulation/network/socket.go index b63aa379eb..17da492b77 100644 --- a/integration/simulation/network/socket.go +++ b/integration/simulation/network/socket.go @@ -98,6 +98,7 @@ func (n *networkOfSocketNodes) Create(simParams *params.SimParams, _ *stats.Stat node.WithL1WSPort(simParams.StartPort+100), node.WithInboundP2PDisabled(isInboundP2PDisabled), node.WithLogLevel(4), + node.WithDebugNamespaceEnabled(true), ), )