diff --git a/chain/consensus/compute_state.go b/chain/consensus/compute_state.go index 8442b55e9..056aa0725 100644 --- a/chain/consensus/compute_state.go +++ b/chain/consensus/compute_state.go @@ -192,7 +192,6 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context, cronGas = 0 partDone = metrics.Timer(ctx, metrics.VMApplyMessages) - // TODO reorg the code to minimize the execution critical section vmi, err := makeVm(pstate, epoch, ts.MinTimestamp()) if err != nil { return cid.Undef, cid.Undef, xerrors.Errorf("making vm: %w", err) @@ -259,7 +258,7 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context, return cid.Cid{}, cid.Cid{}, err } - vmDoCron := partDone() + vmCron := partDone() partDone = metrics.Timer(ctx, metrics.VMApplyFlush) rectarr := blockadt.MakeEmptyArray(sm.ChainStore().ActorStore(ctx)) @@ -298,7 +297,7 @@ func (t *TipSetExecutor) ApplyBlocks(ctx context.Context, vmFlush := partDone() partDone = func() time.Duration { return time.Duration(0) } - log.Infow("ApplyBlocks stats", "early", vmEarly, "earlyCronGas", earlyCronGas, "vmMsg", vmMsg, "msgGas", msgGas, "vmCron", vmDoCron, "cronGas", cronGas, "vmFlush", vmFlush, "epoch", epoch, "tsk", ts.Key()) + log.Infow("ApplyBlocks stats", "early", vmEarly, "earlyCronGas", earlyCronGas, "vmMsg", vmMsg, "msgGas", msgGas, "vmCron", vmCron, "cronGas", cronGas, "vmFlush", vmFlush, "epoch", epoch, "tsk", ts.Key()) stats.Record(ctx, metrics.VMSends.M(int64(atomic.LoadUint64(&vm.StatSends))), metrics.VMApplied.M(int64(atomic.LoadUint64(&vm.StatApplied)))) diff --git a/chain/stmgr/call.go b/chain/stmgr/call.go index cba1b95ab..61056528f 100644 --- a/chain/stmgr/call.go +++ b/chain/stmgr/call.go @@ -169,7 +169,6 @@ func (sm *StateManager) callInternal(ctx context.Context, msg *types.Message, pr if err != nil { return nil, xerrors.Errorf("failed to set up vm: %w", err) } - for i, m := range priorMsgs { _, err = vmi.ApplyMessage(ctx, m) if err != nil { diff --git a/chain/vm/execution.go b/chain/vm/execution.go index fb86a3a7d..dfa9d98d2 100644 --- a/chain/vm/execution.go +++ b/chain/vm/execution.go @@ -26,9 +26,7 @@ const ( DefaultPriorityExecutionLanes = 2 ) -var ErrExecutorDone = errors.New("executor has been released") - -// the execution environment; see below for definition, methods, and initilization +// the execution environment; see below for definition, methods, and initialization var execution *executionEnv // implementation of vm executor with simple sanity check preventing use after free.