diff --git a/data/pools/transactionPool.go b/data/pools/transactionPool.go index afe12f2363..a2eef08bc3 100644 --- a/data/pools/transactionPool.go +++ b/data/pools/transactionPool.go @@ -29,6 +29,7 @@ import ( "github.com/algorand/go-algorand/data/basics" "github.com/algorand/go-algorand/data/bookkeeping" "github.com/algorand/go-algorand/data/transactions" + "github.com/algorand/go-algorand/data/transactions/logic" "github.com/algorand/go-algorand/ledger" "github.com/algorand/go-algorand/ledger/ledgercore" "github.com/algorand/go-algorand/logging" @@ -784,15 +785,19 @@ func (pool *TransactionPool) recomputeBlockEvaluator(committedTxIDs map[transact case *ledgercore.LeaseInLedgerError: asmStats.LeaseErrorCount++ stats.RemovedInvalidCount++ - pool.log.Infof("Cannot re-add pending transaction to pool: %v", err) + pool.log.Infof("Pending transaction in pool no longer valid: %v", err) case *transactions.MinFeeError: asmStats.MinFeeErrorCount++ stats.RemovedInvalidCount++ - pool.log.Infof("Cannot re-add pending transaction to pool: %v", err) + pool.log.Infof("Pending transaction in pool no longer valid: %v", err) + case logic.EvalError: + asmStats.LogicErrorCount++ + stats.RemovedInvalidCount++ + pool.log.Infof("Pending transaction in pool no longer valid: %v", err) default: asmStats.InvalidCount++ stats.RemovedInvalidCount++ - pool.log.Warnf("Cannot re-add pending transaction to pool: %v", err) + pool.log.Infof("Pending transaction in pool no longer valid: %v", err) } } } diff --git a/logging/telemetryspec/metric.go b/logging/telemetryspec/metric.go index 8ab269a2c2..2d43baae0d 100644 --- a/logging/telemetryspec/metric.go +++ b/logging/telemetryspec/metric.go @@ -46,6 +46,7 @@ type AssembleBlockStats struct { IncludedCount int // number of transactions that are included in a block InvalidCount int // number of transaction groups that are included in a block MinFeeErrorCount int // number of transactions excluded because the fee is too low + LogicErrorCount int // number of transactions excluded due to logic error (contract no longer valid) ExpiredCount int // number of transactions removed because of expiration ExpiredLongLivedCount int // number of expired transactions with non-super short LastValid values LeaseErrorCount int // number of transactions removed because it has an already used lease @@ -115,6 +116,7 @@ func (m AssembleBlockStats) String() string { b.WriteString(fmt.Sprintf("IncludedCount:%d, ", m.IncludedCount)) b.WriteString(fmt.Sprintf("InvalidCount:%d, ", m.InvalidCount)) b.WriteString(fmt.Sprintf("MinFeeErrorCount:%d, ", m.MinFeeErrorCount)) + b.WriteString(fmt.Sprintf("LogicErrorCount:%d, ", m.LogicErrorCount)) b.WriteString(fmt.Sprintf("ExpiredCount:%d, ", m.ExpiredCount)) b.WriteString(fmt.Sprintf("ExpiredLongLivedCount:%d, ", m.ExpiredLongLivedCount)) b.WriteString(fmt.Sprintf("LeaseErrorCount:%d, ", m.LeaseErrorCount))