From 7ef93448fbcb603571b4a07a90ec59a89f8e105b Mon Sep 17 00:00:00 2001 From: "Andrew Jackson (Ajax)" Date: Fri, 8 Sep 2023 11:17:51 -0500 Subject: [PATCH] eth_filter flake debug --- itests/eth_filter_test.go | 6 ++++++ node/impl/full/eth_utils.go | 1 + 2 files changed, 7 insertions(+) diff --git a/itests/eth_filter_test.go b/itests/eth_filter_test.go index 62ab5db54..9212e60fc 100644 --- a/itests/eth_filter_test.go +++ b/itests/eth_filter_test.go @@ -16,6 +16,7 @@ import ( "time" "github.com/ipfs/go-cid" + logging "github.com/ipfs/go-log/v2" "github.com/stretchr/testify/require" "golang.org/x/xerrors" @@ -543,6 +544,7 @@ func TestTxReceiptBloom(t *testing.T) { kit.MockProofs(), kit.ThroughRPC()) ens.InterconnectAll().BeginMining(blockTime) + logging.SetLogLevel("fullnode", "DEBUG") ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() @@ -577,6 +579,10 @@ func TestTxReceiptBloom(t *testing.T) { } } + // Deflake plan: (Flake: 5 bits instead of 6) + // Debug + search logs for "LogsBloom" + // compare to passing case. + // // 3 bits from the topic, 3 bits from the address require.Equal(t, 6, bitsSet) } diff --git a/node/impl/full/eth_utils.go b/node/impl/full/eth_utils.go index 5908c9412..f553c68b4 100644 --- a/node/impl/full/eth_utils.go +++ b/node/impl/full/eth_utils.go @@ -665,6 +665,7 @@ func newEthTxReceipt(ctx context.Context, tx ethtypes.EthTx, lookup *api.MsgLook continue } for _, topic := range topics { + log.Debug("LogsBloom set for ", topic) ethtypes.EthBloomSet(receipt.LogsBloom, topic[:]) } l.Data = data