From 593afcdf6153bd7558a1022aafc3fe35d1497f4a Mon Sep 17 00:00:00 2001 From: Uday Patil Date: Fri, 1 Mar 2024 08:36:43 -0600 Subject: [PATCH] Seiv2 runtx (#448) ## Describe your changes and provide context Uncomment a metric for seiv2 ## Testing performed to validate your change --- baseapp/baseapp.go | 14 +++++++------- server/config/config.go | 2 +- server/config/config_test.go | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 0b78550ce..1bed75dbb 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -829,13 +829,13 @@ func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context // and execute successfully. An error is returned otherwise. func (app *BaseApp) runTx(ctx sdk.Context, mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, result *sdk.Result, anteEvents []abci.Event, priority int64, err error) { - // defer telemetry.MeasureThroughputSinceWithLabels( - // telemetry.TxCount, - // []metrics.Label{ - // telemetry.NewLabel("mode", modeKeyToString[mode]), - // }, - // time.Now(), - // ) + defer telemetry.MeasureThroughputSinceWithLabels( + telemetry.TxCount, + []metrics.Label{ + telemetry.NewLabel("mode", modeKeyToString[mode]), + }, + time.Now(), + ) // Reset events after each checkTx or simulateTx or recheckTx // DeliverTx is garbage collected after FinalizeBlocker diff --git a/server/config/config.go b/server/config/config.go index e7d6c3c6d..116b3cdd3 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -26,7 +26,7 @@ const ( DefaultConcurrencyWorkers = 20 // DefaultOccEanbled defines whether to use OCC for tx processing - DefaultOccEnabled = true + DefaultOccEnabled = false ) // BaseConfig defines the server's basic configuration diff --git a/server/config/config_test.go b/server/config/config_test.go index 61801e9ca..963142cae 100644 --- a/server/config/config_test.go +++ b/server/config/config_test.go @@ -31,5 +31,8 @@ func TestSetConcurrencyWorkers(t *testing.T) { func TestOCCEnabled(t *testing.T) { cfg := DefaultConfig() - require.Equal(t, true, cfg.OccEnabled) + require.False(t, cfg.OccEnabled) + + cfg.BaseConfig.OccEnabled = true + require.True(t, cfg.OccEnabled) }