Skip to content

Commit 4e2925f

Browse files
authored
Revert "feat: make PML compatible with OE by staging in-memory CLOB side effects (backport #2447)" (#2469)
1 parent e905175 commit 4e2925f

28 files changed

+412
-1029
lines changed

indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts

Lines changed: 257 additions & 259 deletions
Large diffs are not rendered by default.

indexer/packages/v4-protos/src/codegen/dydxprotocol/clob/finalize_block.ts

Lines changed: 0 additions & 66 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import * as _129 from "./gogo";
2-
export const gogoproto = { ..._129
1+
import * as _128 from "./gogo";
2+
export const gogoproto = { ..._128
33
};
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import * as _130 from "./api/annotations";
2-
import * as _131 from "./api/http";
3-
import * as _132 from "./protobuf/descriptor";
4-
import * as _133 from "./protobuf/duration";
5-
import * as _134 from "./protobuf/timestamp";
6-
import * as _135 from "./protobuf/any";
1+
import * as _129 from "./api/annotations";
2+
import * as _130 from "./api/http";
3+
import * as _131 from "./protobuf/descriptor";
4+
import * as _132 from "./protobuf/duration";
5+
import * as _133 from "./protobuf/timestamp";
6+
import * as _134 from "./protobuf/any";
77
export namespace google {
8-
export const api = { ..._130,
9-
..._131
8+
export const api = { ..._129,
9+
..._130
1010
};
11-
export const protobuf = { ..._132,
11+
export const protobuf = { ..._131,
12+
..._132,
1213
..._133,
13-
..._134,
14-
..._135
14+
..._134
1515
};
1616
}

proto/dydxprotocol/clob/finalize_block.proto

Lines changed: 0 additions & 16 deletions
This file was deleted.

protocol/mocks/MemClob.go

Lines changed: 2 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protocol/testutil/keeper/clob.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ func CreateTestClobPairs(
282282
clobPairs []types.ClobPair,
283283
) {
284284
for _, clobPair := range clobPairs {
285-
_, err := clobKeeper.CreatePerpetualClobPairAndMemStructs(
285+
_, err := clobKeeper.CreatePerpetualClobPair(
286286
ctx,
287287
clobPair.Id,
288288
clobPair.MustGetPerpetualId(),
@@ -341,7 +341,7 @@ func CreateNClobPair(
341341
),
342342
).Return()
343343

344-
_, err := keeper.CreatePerpetualClobPairAndMemStructs(
344+
_, err := keeper.CreatePerpetualClobPair(
345345
ctx,
346346
items[i].Id,
347347
clobtest.MustPerpetualId(items[i]),

protocol/x/clob/abci.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ func Precommit(
5151
ctx sdk.Context,
5252
keeper keeper.Keeper,
5353
) {
54-
// Process all staged finalize block events, and apply necessary side effects
55-
// (e.g. MemClob orderbook creation) that could not be done during FinalizeBlock.
56-
// Note: this must be done in `Precommit` which is prior to `PrepareCheckState`, when
57-
// MemClob could access the new orderbooks.
58-
keeper.ProcessStagedFinalizeBlockEvents(ctx)
59-
6054
if streamingManager := keeper.GetFullNodeStreamingManager(); !streamingManager.Enabled() {
6155
return
6256
}

protocol/x/clob/abci_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ func TestEndBlocker_Success(t *testing.T) {
530530
),
531531
),
532532
).Once().Return()
533-
_, err = ks.ClobKeeper.CreatePerpetualClobPairAndMemStructs(
533+
_, err = ks.ClobKeeper.CreatePerpetualClobPair(
534534
ctx,
535535
constants.ClobPair_Btc.Id,
536536
clobtest.MustPerpetualId(constants.ClobPair_Btc),
@@ -563,7 +563,7 @@ func TestEndBlocker_Success(t *testing.T) {
563563
),
564564
),
565565
).Once().Return()
566-
_, err = ks.ClobKeeper.CreatePerpetualClobPairAndMemStructs(
566+
_, err = ks.ClobKeeper.CreatePerpetualClobPair(
567567
ctx,
568568
constants.ClobPair_Eth.Id,
569569
clobtest.MustPerpetualId(constants.ClobPair_Eth),
@@ -1170,7 +1170,7 @@ func TestPrepareCheckState(t *testing.T) {
11701170

11711171
// Create all CLOBs.
11721172
for _, clobPair := range tc.clobs {
1173-
_, err = ks.ClobKeeper.CreatePerpetualClobPairAndMemStructs(
1173+
_, err = ks.ClobKeeper.CreatePerpetualClobPair(
11741174
ctx,
11751175
clobPair.Id,
11761176
clobtest.MustPerpetualId(clobPair),

protocol/x/clob/genesis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func InitGenesis(ctx sdk.Context, k *keeper.Keeper, genState types.GenesisState)
1919
if err != nil {
2020
panic(errorsmod.Wrap(types.ErrInvalidClobPairParameter, err.Error()))
2121
}
22-
_, err = k.CreatePerpetualClobPairAndMemStructs(
22+
_, err = k.CreatePerpetualClobPair(
2323
ctx,
2424
elem.Id,
2525
perpetualId,

0 commit comments

Comments
 (0)