From 27cdafb14c7e279259017abd1630ab1ad73526ea Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 19 Mar 2024 19:28:07 +1100 Subject: [PATCH] fix(events): don't log.Warn for EVM events with non-Raw codec Codec != Raw likely means built-in actor events, which we can safely skip, so avoid filling up logs with warnings for every built-in actor event that comes past this point. Fixes: https://github.com/filecoin-project/lotus/issues/11718 --- node/impl/full/eth_events.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/impl/full/eth_events.go b/node/impl/full/eth_events.go index 54dd164acf..81ecef64bf 100644 --- a/node/impl/full/eth_events.go +++ b/node/impl/full/eth_events.go @@ -39,9 +39,9 @@ func ethLogFromEvent(entries []types.EventEntry) (data []byte, topics []ethtypes // Topics must be non-nil, even if empty. So we might as well pre-allocate for 4 (the max). topics = make([]ethtypes.EthHash, 0, 4) for _, entry := range entries { - // Drop events with non-raw topics to avoid mistakes. + // Drop events with non-raw topics. Built-in actors emit CBOR, and anything else would be + // invalid anyway. if entry.Codec != cid.Raw { - log.Warnw("did not expect an event entry with a non-raw codec", "codec", entry.Codec, "key", entry.Key) return nil, nil, false } // Check if the key is t1..t4