diff --git a/package.json b/package.json index 135f1527..ac011405 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "warp-contracts", - "version": "1.4.36-beta.1", + "version": "1.4.36-beta.2", "description": "An implementation of the SmartWeave smart contract protocol.", "types": "./lib/types/index.d.ts", "main": "./lib/cjs/index.js", diff --git a/src/core/modules/impl/DefaultStateEvaluator.ts b/src/core/modules/impl/DefaultStateEvaluator.ts index 3f1ad54a..08444b1b 100644 --- a/src/core/modules/impl/DefaultStateEvaluator.ts +++ b/src/core/modules/impl/DefaultStateEvaluator.ts @@ -346,15 +346,21 @@ export abstract class DefaultStateEvaluator implements StateEvaluator { const commitBenchmark = Benchmark.measure(); await contract.interactionState().commit(missingInteraction, forceStateStoreToCache); commitBenchmark.stop(); - this.logger.info('Update benchmark', commitBenchmark.elapsed()); + this.logger.info('Commit benchmark', commitBenchmark.elapsed()); } else { + const rollbackBenchmark = Benchmark.measure(); await contract.interactionState().rollback(missingInteraction, forceStateStoreToCache); + rollbackBenchmark.stop(); + this.logger.info('Rollback benchmark', rollbackBenchmark.elapsed()); } } } else { // if that's an inner contract call - only update the state in the uncommitted states const interactionState = new EvalStateResult(currentState, validity, errorMessages); + const innerContractCallBenchmark = Benchmark.measure(); contract.interactionState().update(contract.txId(), interactionState, currentSortKey); + innerContractCallBenchmark.stop(); + this.logger.info('Inner contract call benchmark', innerContractCallBenchmark.elapsed()); } forceStateBenchmark.stop();