diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 1eb8fe4593..139ee8110a 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -54013,6 +54013,9 @@ definitions: total_pending: type: string format: uint64 + value_within_window: + type: string + format: uint64 rate_limit_exceeded: type: boolean crosschainQueryMessagePassingProtocolFeeResponse: diff --git a/proto/crosschain/query.proto b/proto/crosschain/query.proto index b017e2c523..1ecd041c48 100644 --- a/proto/crosschain/query.proto +++ b/proto/crosschain/query.proto @@ -270,7 +270,8 @@ message QueryListPendingCctxWithinRateLimitRequest { message QueryListPendingCctxWithinRateLimitResponse { repeated CrossChainTx cross_chain_tx = 1; uint64 total_pending = 2; - bool rate_limit_exceeded = 3; + uint64 value_within_window = 3; + bool rate_limit_exceeded = 4; } message QueryLastZetaHeightRequest {} diff --git a/typescript/crosschain/query_pb.d.ts b/typescript/crosschain/query_pb.d.ts index 34b4a44f38..62e8fdfe3a 100644 --- a/typescript/crosschain/query_pb.d.ts +++ b/typescript/crosschain/query_pb.d.ts @@ -910,7 +910,12 @@ export declare class QueryListPendingCctxWithinRateLimitResponse extends Message totalPending: bigint; /** - * @generated from field: bool rate_limit_exceeded = 3; + * @generated from field: uint64 value_within_window = 3; + */ + valueWithinWindow: bigint; + + /** + * @generated from field: bool rate_limit_exceeded = 4; */ rateLimitExceeded: boolean; diff --git a/x/crosschain/keeper/grpc_query_cctx_rate_limit.go b/x/crosschain/keeper/grpc_query_cctx_rate_limit.go index 41ebd2aa65..287ebe1147 100644 --- a/x/crosschain/keeper/grpc_query_cctx_rate_limit.go +++ b/x/crosschain/keeper/grpc_query_cctx_rate_limit.go @@ -194,6 +194,7 @@ LoopForwards: return &types.QueryListPendingCctxWithinRateLimitResponse{ CrossChainTx: cctxs, TotalPending: totalPending, + ValueWithinWindow: totalCctxValueInZeta.TruncateInt().Uint64(), RateLimitExceeded: limitExceeded, }, nil } diff --git a/x/crosschain/keeper/grpc_query_cctx_rate_limit_test.go b/x/crosschain/keeper/grpc_query_cctx_rate_limit_test.go index 4e6b142329..8b53958ad3 100644 --- a/x/crosschain/keeper/grpc_query_cctx_rate_limit_test.go +++ b/x/crosschain/keeper/grpc_query_cctx_rate_limit_test.go @@ -406,11 +406,13 @@ func TestKeeper_ListPendingCctxWithinRateLimit(t *testing.T) { require.EqualValues(t, cctxsBTC, res.CrossChainTx[200:400]) require.EqualValues(t, uint64(400), res.TotalPending) require.False(t, res.RateLimitExceeded) + require.Equal(t, uint64(1500), res.ValueWithinWindow) // 500 * (2.5 + 0.5) }) t.Run("Set rate to a lower value (< 1200) to early break the LoopBackwards with criteria #2", func(t *testing.T) { k, ctx, cctxsETH, cctxsBTC, rlFlags := createKeeperForRateLimiterTest(t) - rlFlags.Rate = math.NewUint(1000) // 1000 ZETA + rate := uint64(1000) // 1000 ZETA + rlFlags.Rate = math.NewUint(rate) k.SetRateLimiterFlags(ctx, rlFlags) res, err := k.ListPendingCctxWithinRateLimit(ctx, &types.QueryListPendingCctxWithinRateLimitRequest{}) @@ -420,6 +422,7 @@ func TestKeeper_ListPendingCctxWithinRateLimit(t *testing.T) { require.EqualValues(t, cctxsBTC[:100], res.CrossChainTx[100:200]) require.EqualValues(t, uint64(400), res.TotalPending) require.True(t, res.RateLimitExceeded) + require.True(t, res.ValueWithinWindow >= rate) }) t.Run("Set high rate and big window to early to break inner loop with the criteria #1", func(t *testing.T) { k, ctx, cctxsETH, cctxsBTC, rlFlags := createKeeperForRateLimiterTest(t) @@ -436,6 +439,7 @@ func TestKeeper_ListPendingCctxWithinRateLimit(t *testing.T) { require.EqualValues(t, cctxsBTC, res.CrossChainTx[200:400]) require.EqualValues(t, uint64(400), res.TotalPending) require.False(t, res.RateLimitExceeded) + require.EqualValues(t, uint64(3450), res.ValueWithinWindow) // 1150 * (2.5 + 0.5) }) t.Run("Set lower request limit to early break the LoopForwards loop", func(t *testing.T) { k, ctx, cctxsETH, cctxsBTC, _ := createKeeperForRateLimiterTest(t) @@ -447,6 +451,7 @@ func TestKeeper_ListPendingCctxWithinRateLimit(t *testing.T) { require.EqualValues(t, cctxsBTC, res.CrossChainTx[100:300]) require.EqualValues(t, uint64(400), res.TotalPending) require.False(t, res.RateLimitExceeded) + require.EqualValues(t, uint64(1250), res.ValueWithinWindow) // 500 * 0.5 + 400 * 2.5 }) t.Run("Set rate to middle value (1200 < rate < 1500) to early break the LoopForwards loop with criteria #2", func(t *testing.T) { k, ctx, cctxsETH, cctxsBTC, rlFlags := createKeeperForRateLimiterTest(t) @@ -462,5 +467,6 @@ func TestKeeper_ListPendingCctxWithinRateLimit(t *testing.T) { require.EqualValues(t, cctxsBTC, res.CrossChainTx[120:320]) require.EqualValues(t, uint64(400), res.TotalPending) require.True(t, res.RateLimitExceeded) + require.True(t, res.ValueWithinWindow >= 1300) }) } diff --git a/x/crosschain/types/query.pb.go b/x/crosschain/types/query.pb.go index 879dcce901..4d7c826736 100644 --- a/x/crosschain/types/query.pb.go +++ b/x/crosschain/types/query.pb.go @@ -1638,7 +1638,8 @@ func (m *QueryListPendingCctxWithinRateLimitRequest) GetLimit() uint32 { type QueryListPendingCctxWithinRateLimitResponse struct { CrossChainTx []*CrossChainTx `protobuf:"bytes,1,rep,name=cross_chain_tx,json=crossChainTx,proto3" json:"cross_chain_tx,omitempty"` TotalPending uint64 `protobuf:"varint,2,opt,name=total_pending,json=totalPending,proto3" json:"total_pending,omitempty"` - RateLimitExceeded bool `protobuf:"varint,3,opt,name=rate_limit_exceeded,json=rateLimitExceeded,proto3" json:"rate_limit_exceeded,omitempty"` + ValueWithinWindow uint64 `protobuf:"varint,3,opt,name=value_within_window,json=valueWithinWindow,proto3" json:"value_within_window,omitempty"` + RateLimitExceeded bool `protobuf:"varint,4,opt,name=rate_limit_exceeded,json=rateLimitExceeded,proto3" json:"rate_limit_exceeded,omitempty"` } func (m *QueryListPendingCctxWithinRateLimitResponse) Reset() { @@ -1692,6 +1693,13 @@ func (m *QueryListPendingCctxWithinRateLimitResponse) GetTotalPending() uint64 { return 0 } +func (m *QueryListPendingCctxWithinRateLimitResponse) GetValueWithinWindow() uint64 { + if m != nil { + return m.ValueWithinWindow + } + return 0 +} + func (m *QueryListPendingCctxWithinRateLimitResponse) GetRateLimitExceeded() bool { if m != nil { return m.RateLimitExceeded @@ -2102,126 +2110,128 @@ func init() { func init() { proto.RegisterFile("crosschain/query.proto", fileDescriptor_65a992045e92a606) } var fileDescriptor_65a992045e92a606 = []byte{ - // 1901 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5a, 0xc1, 0x6f, 0xdc, 0x4a, - 0x19, 0xcf, 0x64, 0x9b, 0xf7, 0xd2, 0x49, 0xda, 0xbc, 0xcc, 0x0b, 0x25, 0xf8, 0x25, 0x9b, 0xd6, - 0xa1, 0x4d, 0x48, 0xc8, 0xfa, 0x25, 0x7d, 0xcd, 0xa3, 0x6d, 0x1e, 0x62, 0x93, 0xbe, 0xa4, 0x81, - 0xb4, 0x4d, 0x57, 0x41, 0x45, 0x45, 0xc8, 0x9a, 0x78, 0xa7, 0x5e, 0xab, 0x8e, 0x9d, 0xae, 0xbd, - 0xd5, 0xa6, 0x51, 0x2e, 0x3d, 0x70, 0x46, 0xea, 0x81, 0x0b, 0x57, 0x44, 0x0f, 0x1c, 0x38, 0x20, - 0x38, 0x20, 0x15, 0x21, 0xa0, 0xf4, 0x58, 0x09, 0x81, 0x10, 0x48, 0x08, 0xb5, 0xfc, 0x05, 0xfc, - 0x05, 0xc8, 0xe3, 0xcf, 0xbb, 0x63, 0xaf, 0xbd, 0x3b, 0xd9, 0x6c, 0x0f, 0x3d, 0x75, 0xed, 0x99, - 0xef, 0x9b, 0xdf, 0xef, 0x9b, 0x6f, 0x3e, 0x7f, 0xf3, 0x6b, 0xf0, 0x39, 0xa3, 0xea, 0x7a, 0x9e, - 0x51, 0xa1, 0x96, 0xa3, 0x3d, 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x14, 0xf4, 0xcb, 0xf1, 0x3f, 0x7f, 0x90, - 0x3b, 0x01, 0xa9, 0x7f, 0x50, 0xa1, 0x5c, 0xeb, 0xc6, 0x54, 0xb2, 0x95, 0x79, 0x12, 0x47, 0x19, - 0x00, 0x8f, 0xeb, 0x2e, 0x72, 0xc0, 0x53, 0x95, 0x1c, 0x39, 0xe0, 0xe9, 0x32, 0x4f, 0x47, 0xe0, - 0x76, 0x1c, 0x65, 0xd0, 0x2a, 0x24, 0x65, 0x01, 0xb9, 0x56, 0x21, 0x43, 0xc0, 0x90, 0x6b, 0x15, - 0xb2, 0xc4, 0x8d, 0x8e, 0xad, 0x42, 0x52, 0xaa, 0x58, 0xfd, 0xde, 0xab, 0x37, 0x79, 0xf4, 0xfa, - 0x4d, 0x1e, 0xfd, 0xe7, 0x4d, 0x1e, 0xfd, 0xe4, 0x6d, 0xbe, 0xef, 0xf5, 0xdb, 0x7c, 0xdf, 0x3f, - 0xde, 0xe6, 0xfb, 0xee, 0x2f, 0x9a, 0x96, 0x5f, 0xa9, 0xed, 0x16, 0x0c, 0x77, 0x4f, 0x74, 0x16, - 0x61, 0xd2, 0xea, 0xa2, 0x5f, 0xff, 0x60, 0x9f, 0x79, 0xbb, 0x1f, 0xf0, 0x6f, 0xf7, 0xe5, 0xff, - 0x07, 0x00, 0x00, 0xff, 0xff, 0x25, 0x12, 0xcf, 0x1a, 0x2c, 0x25, 0x00, 0x00, + // 1931 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x5a, 0x41, 0x6f, 0xdc, 0xc6, + 0x15, 0xf6, 0x68, 0xed, 0x44, 0x1e, 0xc9, 0x56, 0x34, 0x51, 0x5d, 0x95, 0x91, 0x56, 0x36, 0x55, + 0x5b, 0xaa, 0x54, 0x2d, 0x23, 0x39, 0x56, 0x6a, 0x5b, 0x29, 0xba, 0x92, 0x23, 0x45, 0xad, 0x92, + 0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0x8b, 0x67, 0x45, 0xf4, + 0x9f, 0x67, 0x45, 0xf4, 0xd3, 0xe7, 0xc5, 0x73, 0x5f, 0x3c, 0x2f, 0x9e, 0xfb, 0xc7, 0xf3, 0xe2, + 0xb9, 0x07, 0xcb, 0xb6, 0xc3, 0x6b, 0x8d, 0xfd, 0x92, 0xe5, 0x1f, 0xc8, 0xce, 0x62, 0x4c, 0x46, + 0x53, 0xf6, 0xcb, 0x8f, 0x0e, 0x59, 0xb0, 0xff, 0x92, 0xf8, 0x76, 0xdf, 0xfc, 0x7f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xc1, 0x55, 0xea, 0xa0, 0x5c, 0x25, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4382,6 +4392,11 @@ func (m *QueryListPendingCctxWithinRateLimitResponse) MarshalToSizedBuffer(dAtA dAtA[i] = 0 } i-- + dAtA[i] = 0x20 + } + if m.ValueWithinWindow != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ValueWithinWindow)) + i-- dAtA[i] = 0x18 } if m.TotalPending != 0 { @@ -5169,6 +5184,9 @@ func (m *QueryListPendingCctxWithinRateLimitResponse) Size() (n int) { if m.TotalPending != 0 { n += 1 + sovQuery(uint64(m.TotalPending)) } + if m.ValueWithinWindow != 0 { + n += 1 + sovQuery(uint64(m.ValueWithinWindow)) + } if m.RateLimitExceeded { n += 2 } @@ -8535,6 +8553,25 @@ func (m *QueryListPendingCctxWithinRateLimitResponse) Unmarshal(dAtA []byte) err } } case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValueWithinWindow", wireType) + } + m.ValueWithinWindow = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValueWithinWindow |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field RateLimitExceeded", wireType) } diff --git a/zetaclient/interfaces/interfaces.go b/zetaclient/interfaces/interfaces.go index 0fbaba26b3..a122a19131 100644 --- a/zetaclient/interfaces/interfaces.go +++ b/zetaclient/interfaces/interfaces.go @@ -98,7 +98,7 @@ type ZetaCoreBridger interface { GetZetaBlockHeight() (int64, error) GetLastBlockHeightByChain(chain chains.Chain) (*crosschaintypes.LastBlockHeight, error) ListPendingCctx(chainID int64) ([]*crosschaintypes.CrossChainTx, uint64, error) - ListPendingCctxWithinRatelimit() ([]*crosschaintypes.CrossChainTx, uint64, bool, error) + ListPendingCctxWithinRatelimit() ([]*crosschaintypes.CrossChainTx, uint64, uint64, bool, error) GetPendingNoncesByChain(chainID int64) (observertypes.PendingNonces, error) GetCctxByNonce(chainID int64, nonce uint64) (*crosschaintypes.CrossChainTx, error) GetOutTxTracker(chain chains.Chain, nonce uint64) (*crosschaintypes.OutTxTracker, error) diff --git a/zetaclient/testutils/stub/core_bridge.go b/zetaclient/testutils/stub/core_bridge.go index e66c309cc6..ca3f45a16b 100644 --- a/zetaclient/testutils/stub/core_bridge.go +++ b/zetaclient/testutils/stub/core_bridge.go @@ -121,11 +121,11 @@ func (z *MockZetaCoreBridge) ListPendingCctx(_ int64) ([]*cctxtypes.CrossChainTx return []*cctxtypes.CrossChainTx{}, 0, nil } -func (z *MockZetaCoreBridge) ListPendingCctxWithinRatelimit() ([]*cctxtypes.CrossChainTx, uint64, bool, error) { +func (z *MockZetaCoreBridge) ListPendingCctxWithinRatelimit() ([]*cctxtypes.CrossChainTx, uint64, uint64, bool, error) { if z.paused { - return nil, 0, false, errors.New(ErrMsgPaused) + return nil, 0, 0, false, errors.New(ErrMsgPaused) } - return []*cctxtypes.CrossChainTx{}, 0, false, nil + return []*cctxtypes.CrossChainTx{}, 0, 0, false, nil } func (z *MockZetaCoreBridge) GetPendingNoncesByChain(_ int64) (observerTypes.PendingNonces, error) { diff --git a/zetaclient/zetabridge/query.go b/zetaclient/zetabridge/query.go index 09d3b20e82..afed840fef 100644 --- a/zetaclient/zetabridge/query.go +++ b/zetaclient/zetabridge/query.go @@ -139,7 +139,7 @@ func (b *ZetaCoreBridge) ListPendingCctx(chainID int64) ([]*types.CrossChainTx, // ListPendingCctxWithinRatelimit returns a list of pending cctxs that do not exceed the outbound rate limit // - The max size of the list is crosschainkeeper.MaxPendingCctxs // - The returned `rateLimitExceeded` flag indicates if the rate limit is exceeded or not -func (b *ZetaCoreBridge) ListPendingCctxWithinRatelimit() ([]*types.CrossChainTx, uint64, bool, error) { +func (b *ZetaCoreBridge) ListPendingCctxWithinRatelimit() ([]*types.CrossChainTx, uint64, uint64, bool, error) { client := types.NewQueryClient(b.grpcConn) maxSizeOption := grpc.MaxCallRecvMsgSize(32 * 1024 * 1024) resp, err := client.ListPendingCctxWithinRateLimit( @@ -148,9 +148,9 @@ func (b *ZetaCoreBridge) ListPendingCctxWithinRatelimit() ([]*types.CrossChainTx maxSizeOption, ) if err != nil { - return nil, 0, false, err + return nil, 0, 0, false, err } - return resp.CrossChainTx, resp.TotalPending, resp.RateLimitExceeded, nil + return resp.CrossChainTx, resp.TotalPending, resp.ValueWithinWindow, resp.RateLimitExceeded, nil } func (b *ZetaCoreBridge) GetAbortedZetaAmount() (string, error) { diff --git a/zetaclient/zetacore_observer.go b/zetaclient/zetacore_observer.go index c66f15f50a..230e1ba894 100644 --- a/zetaclient/zetacore_observer.go +++ b/zetaclient/zetacore_observer.go @@ -134,10 +134,14 @@ func (co *CoreObserver) startCctxScheduler(appContext *appcontext.AppContext) { metrics.HotKeyBurnRate.Set(float64(co.ts.HotKeyBurnRate.GetBurnRate().Int64())) // query pending cctxs across all foreign chains with rate limit - cctxMap, err := co.getAllPendingCctxWithRatelimit() + cctxMap, valueWithinWindow, err := co.getAllPendingCctxWithRatelimit() if err != nil { co.logger.ZetaChainWatcher.Error().Err(err).Msgf("startCctxScheduler: queryPendingCctxWithRatelimit failed") } + // print value within rate limiter window every minute + if bn%10 == 0 { + co.logger.ZetaChainWatcher.Debug().Msgf("startCctxScheduler: value within rate limiter window is %d ZETA", valueWithinWindow) + } // schedule keysign for pending cctxs on each chain coreContext := appContext.ZetaCoreContext() @@ -190,10 +194,10 @@ func (co *CoreObserver) startCctxScheduler(appContext *appcontext.AppContext) { } // getAllPendingCctxWithRatelimit get pending cctxs across all foreign chains with rate limit -func (co *CoreObserver) getAllPendingCctxWithRatelimit() (map[int64][]*types.CrossChainTx, error) { - cctxList, totalPending, rateLimitExceeded, err := co.bridge.ListPendingCctxWithinRatelimit() +func (co *CoreObserver) getAllPendingCctxWithRatelimit() (map[int64][]*types.CrossChainTx, uint64, error) { + cctxList, totalPending, valueWithinWindow, rateLimitExceeded, err := co.bridge.ListPendingCctxWithinRatelimit() if err != nil { - return nil, err + return nil, 0, err } if rateLimitExceeded { co.logger.ZetaChainWatcher.Warn().Msgf("rate limit exceeded, fetched %d cctxs out of %d", len(cctxList), totalPending) @@ -209,7 +213,7 @@ func (co *CoreObserver) getAllPendingCctxWithRatelimit() (map[int64][]*types.Cro cctxMap[chainID] = append(cctxMap[chainID], cctx) } - return cctxMap, nil + return cctxMap, valueWithinWindow, nil } // scheduleCctxEVM schedules evm outtx keysign on each ZetaChain block (the ticker)