From 4e61c802b98f399956b8765ec833aa540f0ec6ff Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 19 Dec 2023 23:17:25 -0700 Subject: [PATCH] updates --- baseapp/baseapp.go | 2 ++ x/auth/ante/setup.go | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 50514900a446..1c649663a6ae 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -675,6 +675,8 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re return sdk.GasInfo{}, nil, nil, 0, err } + ctx.Logger().With("sim", "info").Info("runTx start", "tx_hash", tx.GetMsgs()) + msgs := tx.GetMsgs() if err := validateBasicTxMsgs(msgs); err != nil { return sdk.GasInfo{}, nil, nil, 0, err diff --git a/x/auth/ante/setup.go b/x/auth/ante/setup.go index 759623906e55..5df3d0568ab8 100644 --- a/x/auth/ante/setup.go +++ b/x/auth/ante/setup.go @@ -33,10 +33,19 @@ func (sud SetUpContextDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate if !ok { // Set a gas meter with limit 0 as to prevent an infinite gas meter attack // during runTx. + + if simulate { + ctx.Logger().With("sim", "info").Info("SetUpContextDecorator not gasTx, inf gas meter") + } + newCtx = SetGasMeter(simulate, ctx, 0) return newCtx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be GasTx") } + if simulate { + ctx.Logger().With("sim", "info").Info("SetUpContextDecorator gasTx - reg gas meter") + } + newCtx = SetGasMeter(simulate, ctx, gasTx.GetGas()) if cp := ctx.ConsensusParams(); cp != nil && cp.Block != nil {