diff --git a/protocol/cmd/dydxprotocold/cmd/config.go b/protocol/cmd/dydxprotocold/cmd/config.go index b5324551095..ff235a89279 100644 --- a/protocol/cmd/dydxprotocold/cmd/config.go +++ b/protocol/cmd/dydxprotocold/cmd/config.go @@ -101,8 +101,8 @@ func initTendermintConfig() *tmcfg.Config { // a users rate limit if the entry is evicted from the mempool cache as it would be possible for the transaction // to go through `CheckTx` again causing it to hit rate limit code against the users account. cfg.Mempool.CacheSize = 5000 * int(clobtypes.ShortBlockWindow) - cfg.Mempool.Size = 50000 - cfg.Mempool.TTLNumBlocks = 20 //nolint:staticcheck + cfg.Mempool.Size = 100000 + cfg.Mempool.TTLNumBlocks = 40 //nolint:staticcheck cfg.Mempool.KeepInvalidTxsInCache = true // Enable pex. diff --git a/protocol/x/clob/e2e/app_test.go b/protocol/x/clob/e2e/app_test.go index 20bacc5efae..dcd98477dbc 100644 --- a/protocol/x/clob/e2e/app_test.go +++ b/protocol/x/clob/e2e/app_test.go @@ -78,13 +78,13 @@ var ( }, testapp.DefaultGenesis(), )) - PlaceOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB27 = *clobtypes.NewMsgPlaceOrder(testapp.MustScaleOrder( + PlaceOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB47 = *clobtypes.NewMsgPlaceOrder(testapp.MustScaleOrder( clobtypes.Order{ OrderId: clobtypes.OrderId{SubaccountId: constants.Alice_Num0, ClientId: 0, ClobPairId: 0}, Side: clobtypes.Order_SIDE_BUY, Quantums: 5, Subticks: 10, - GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 27}, + GoodTilOneof: &clobtypes.Order_GoodTilBlock{GoodTilBlock: 47}, }, testapp.DefaultGenesis(), )) @@ -175,13 +175,13 @@ var ( }, 20, ) - CancelOrder_Alice_Num0_Id0_Clob0_GTB27 = *clobtypes.NewMsgCancelOrderShortTerm( + CancelOrder_Alice_Num0_Id0_Clob0_GTB47 = *clobtypes.NewMsgCancelOrderShortTerm( clobtypes.OrderId{ SubaccountId: constants.Alice_Num0, ClientId: 0, ClobPairId: 0, }, - 27, + 47, ) CancelOrder_Alice_Num0_Id0_Clob0_GTB23 = *clobtypes.NewMsgCancelOrderShortTerm( clobtypes.OrderId{ @@ -275,7 +275,7 @@ var ( }, 5, ) - BatchCancel_Alice_Num0_Clob0_1_2_3_GTB27 = *clobtypes.NewMsgBatchCancel( + BatchCancel_Alice_Num0_Clob0_1_2_3_GTB47 = *clobtypes.NewMsgBatchCancel( constants.Alice_Num0, []clobtypes.OrderBatch{ { @@ -283,7 +283,7 @@ var ( ClientIds: []uint32{1, 2, 3}, }, }, - 27, + 47, ) BatchCancel_Alice_Num0_Clob0_1_2_3_GTB20 = *clobtypes.NewMsgBatchCancel( constants.Alice_Num0, diff --git a/protocol/x/clob/e2e/rate_limit_test.go b/protocol/x/clob/e2e/rate_limit_test.go index 1c199c551fc..cc998f671c8 100644 --- a/protocol/x/clob/e2e/rate_limit_test.go +++ b/protocol/x/clob/e2e/rate_limit_test.go @@ -706,7 +706,7 @@ func TestRateLimitingShortTermOrders_GuardedAgainstReplayAttacks(t *testing.T) { }, }, replayLessGTB: &PlaceOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB5, - replayGreaterGTB: &PlaceOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB27, + replayGreaterGTB: &PlaceOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB47, firstValidGTB: &PlaceOrder_Alice_Num0_Id0_Clob0_Buy5_Price10_GTB20, secondValidGTB: &PlaceOrder_Alice_Num0_Id0_Clob1_Buy5_Price10_GTB20, }, @@ -720,7 +720,7 @@ func TestRateLimitingShortTermOrders_GuardedAgainstReplayAttacks(t *testing.T) { }, }, replayLessGTB: &CancelOrder_Alice_Num0_Id0_Clob0_GTB5, - replayGreaterGTB: &CancelOrder_Alice_Num0_Id0_Clob0_GTB27, + replayGreaterGTB: &CancelOrder_Alice_Num0_Id0_Clob0_GTB47, firstValidGTB: &CancelOrder_Alice_Num0_Id0_Clob0_GTB20, secondValidGTB: &CancelOrder_Alice_Num0_Id1_Clob0_GTB20, }, @@ -734,7 +734,7 @@ func TestRateLimitingShortTermOrders_GuardedAgainstReplayAttacks(t *testing.T) { }, }, replayLessGTB: &BatchCancel_Alice_Num0_Clob0_1_2_3_GTB5, - replayGreaterGTB: &BatchCancel_Alice_Num0_Clob0_1_2_3_GTB27, + replayGreaterGTB: &BatchCancel_Alice_Num0_Clob0_1_2_3_GTB47, firstValidGTB: &BatchCancel_Alice_Num0_Clob0_1_2_3_GTB20, secondValidGTB: &BatchCancel_Alice_Num0_Clob1_1_2_3_GTB20, }, diff --git a/protocol/x/clob/types/constants.go b/protocol/x/clob/types/constants.go index 069e7646e76..b3dbf79dc6a 100644 --- a/protocol/x/clob/types/constants.go +++ b/protocol/x/clob/types/constants.go @@ -6,7 +6,7 @@ import ( // ShortBlockWindow represents the maximum number of blocks past the current block height that a // `MsgPlaceOrder` or `MsgCancelOrder` message will be considered valid by the validator. -const ShortBlockWindow uint32 = 20 +const ShortBlockWindow uint32 = 40 // MaxMsgBatchCancelBatchSize represents the maximum number of cancels that a MsgBatchCancel // can have in one Msg.