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.
This commit is contained in:
Raúl Kripalani 2023-01-20 00:17:55 +00:00
parent 522e96f016
commit 2c56687527

View File

@ -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)