From 02a2095c2625a060196fa111b47c13bc68b63b16 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Tue, 19 Mar 2024 20:10:37 +1100 Subject: [PATCH] fix(events): don't log.Warn for EVM events with non-Raw codec (#11742) 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 54dd164acf4..81ecef64bfa 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