From 06d288e92bdb8de9a7f8d767d30a8820ee1d5a90 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 17 Nov 2023 18:08:58 +0100 Subject: [PATCH] fix: eth: remove trace sanity check (#11385) We added this check as a self-test to make sure that the message indices in our trace matched up with those in the block. Unfortunately, this only works for blocks on the main-chain, and breaks tracing of uncle blocks (and tracing of head). --- node/impl/full/eth.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/node/impl/full/eth.go b/node/impl/full/eth.go index 6b8b0e0aa..f8c5ba9b5 100644 --- a/node/impl/full/eth.go +++ b/node/impl/full/eth.go @@ -842,16 +842,6 @@ func (a *EthModule) EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtyp return nil, xerrors.Errorf("failed when calling ExecutionTrace: %w", err) } - tsParent, err := a.ChainAPI.ChainGetTipSetByHeight(ctx, ts.Height()+1, a.Chain.GetHeaviestTipSet().Key()) - if err != nil { - return nil, xerrors.Errorf("cannot get tipset at height: %v", ts.Height()+1) - } - - msgs, err := a.ChainGetParentMessages(ctx, tsParent.Blocks()[0].Cid()) - if err != nil { - return nil, xerrors.Errorf("failed to get parent messages: %w", err) - } - cid, err := ts.Key().Cid() if err != nil { return nil, xerrors.Errorf("failed to get tipset key cid: %w", err) @@ -870,11 +860,6 @@ func (a *EthModule) EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtyp continue } - // as we include TransactionPosition in the results, lets do sanity checking that the - // traces are indeed in the message execution order - if ir.Msg.Cid() != msgs[msgIdx].Message.Cid() { - return nil, xerrors.Errorf("traces are not in message execution order") - } msgIdx++ txHash, err := a.EthGetTransactionHashByCid(ctx, ir.MsgCid)