From e249026daafa4a3ca066f93e095006d94702e7c1 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 13:23:41 -0400 Subject: [PATCH] Stop passing in app PreBlocker to slinky VE handler (#1491) (#1492) (cherry picked from commit 24945570633ce55ab6a86612c22b18f41a759a60) Co-authored-by: roy-dydx <133032749+roy-dydx@users.noreply.github.com> --- protocol/app/app.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/protocol/app/app.go b/protocol/app/app.go index bc65e1633a..20fd36d602 100644 --- a/protocol/app/app.go +++ b/protocol/app/app.go @@ -1541,7 +1541,15 @@ func (app *App) initOracle(pricesTxDecoder process.UpdateMarketPriceTxDecoder) { compression.NewDefaultVoteExtensionCodec(), compression.NewZLibCompressor(), ), - app.PreBlocker, + // We are not using the slinky PreBlocker, so there is no need to pass in PreBlocker here for + // VE handler to work properly. + // Currently the clob PreBlocker assumes that it will only be called during the normal ABCI + // PreBlocker step. Passing in the app PreBlocker here will break that assumption by causing + // the clob PreBlocker to be called unexpectedly. This to leads improperly initialized clob state + // which results in the next block being committed incorrectly. + func(_ sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) { + return nil, nil + }, app.oracleMetrics, )