From 2c566875273788d2101280aab429d985dc61ba8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Fri, 20 Jan 2023 00:17:55 +0000 Subject: [PATCH] fix: events: put the _signed_ message through the pipeline. We were putting the unsigned/VM message through the pipeline. The events index was storing the _unsigned_ message CID. However, the Eth tx hash index maps signed Delegated-signature message CIDs to transaction hashes, i.e. it uses the _signed_ message CID. As a result, eth_getLogs and other log-related methods were unable to resolve the transaction hash from the index properly, and would end up returning 0x00..00 in the transactionHash field. --- chain/events/filter/event.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chain/events/filter/event.go b/chain/events/filter/event.go index a19f49a50..779b0c186 100644 --- a/chain/events/filter/event.go +++ b/chain/events/filter/event.go @@ -266,13 +266,13 @@ func (te *TipSetEvents) messages(ctx context.Context) ([]executedMessage, error) } type executedMessage struct { - msg *types.Message + msg types.ChainMsg rct *types.MessageReceipt // events extracted from receipt evs []*types.Event } -func (e *executedMessage) Message() *types.Message { +func (e *executedMessage) Message() types.ChainMsg { return e.msg } @@ -428,7 +428,7 @@ func (m *EventFilterManager) loadExecutedMessages(ctx context.Context, msgTs, rc ems := make([]executedMessage, len(msgs)) for i := 0; i < len(msgs); i++ { - ems[i].msg = msgs[i].VMMessage() + ems[i].msg = msgs[i] var rct types.MessageReceipt found, err := arr.Get(uint64(i), &rct)