diff --git a/go.mod b/go.mod index 08acd70058..a3275c4b59 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( go.opentelemetry.io/otel/trace v1.9.0 golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 - google.golang.org/genproto v0.0.0-20230221151758-ace64dc21148 + google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 google.golang.org/grpc v1.53.0 google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v2 v2.4.0 @@ -94,6 +94,7 @@ require ( github.com/firefart/nonamedreturns v1.0.1 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/fzipp/gocyclo v0.5.1 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-critic/go-critic v0.6.3 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.0 // indirect @@ -140,6 +141,7 @@ require ( github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect diff --git a/go.sum b/go.sum index 37e7465027..7e576cf06d 100644 --- a/go.sum +++ b/go.sum @@ -340,6 +340,7 @@ github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3n github.com/fzipp/gocyclo v0.5.1 h1:L66amyuYogbxl0j2U+vGqJXusPF2IkduvXLnYD5TFgw= github.com/fzipp/gocyclo v0.5.1/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -595,6 +596,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 h1:gDLXvp5S9izjldquuoAhDzccbskOL6tDC5jMSyx3zxE= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2/go.mod h1:7pdNwVWBBHGiCxa9lAszqCJMbfTISJ7oMftp8+UGV08= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= @@ -1817,6 +1820,8 @@ google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2I google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20230221151758-ace64dc21148 h1:muK+gVBJBfFb4SejshDBlN2/UgxCCOKH9Y34ljqEGOc= google.golang.org/genproto v0.0.0-20230221151758-ace64dc21148/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= +google.golang.org/genproto v0.0.0-20230223222841-637eb2293923 h1:znp6mq/drrY+6khTAlJUDNFFcDGV2ENLYKpMq8SyCds= +google.golang.org/genproto v0.0.0-20230223222841-637eb2293923/go.mod h1:3Dl5ZL0q0isWJt+FVcfpQyirqemEuLAK/iFvg1UP1Hw= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= diff --git a/proto/oracle/query.proto b/proto/oracle/query.proto index 151878d33a..8d8c2a1126 100644 --- a/proto/oracle/query.proto +++ b/proto/oracle/query.proto @@ -58,6 +58,12 @@ service Query { option (google.api.http).get = "/sei-protocol/sei-chain/oracle/validators/aggregate_votes"; } + // SlashWindow returns slash window information + rpc SlashWindow(QuerySlashWindowRequest) returns (QuerySlashWindowResponse) { + option (google.api.http).get = + "/sei-protocol/sei-chain/oracle/slash_window"; + } + // Params queries all parameters. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/sei-protocol/sei-chain/oracle/params"; @@ -196,6 +202,18 @@ message QueryAggregateVotesResponse { repeated AggregateExchangeRateVote aggregate_votes = 1 [(gogoproto.nullable) = false]; } +// QuerySlashWindow is the request type for the +// Query/SlashWindow RPC method. +message QuerySlashWindowRequest {} + +// QuerySlashWindowResponse is response type for the +// Query/SlashWindow RPC method. +message QuerySlashWindowResponse { + // window_progress defines the number of voting periods + // since the last slashing event would have taken place. + uint64 window_progress = 1; +} + // QueryParamsRequest is the request type for the Query/Params RPC method. message QueryParamsRequest {} diff --git a/x/oracle/keeper/querier.go b/x/oracle/keeper/querier.go index 45e097d64f..ad038add9d 100755 --- a/x/oracle/keeper/querier.go +++ b/x/oracle/keeper/querier.go @@ -191,3 +191,20 @@ func (q querier) AggregateVotes(c context.Context, req *types.QueryAggregateVote AggregateVotes: votes, }, nil } + +func (q querier) SlashWindow( + goCtx context.Context, + req *types.QuerySlashWindowRequest, +) (*types.QuerySlashWindowResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(goCtx) + params := q.GetParams(ctx) + + return &types.QuerySlashWindowResponse{ + WindowProgress: (uint64(ctx.BlockHeight()) % params.SlashWindow) / + params.VotePeriod, + }, nil +} diff --git a/x/oracle/keeper/querier_test.go b/x/oracle/keeper/querier_test.go index a3c73335d4..931e0be90b 100755 --- a/x/oracle/keeper/querier_test.go +++ b/x/oracle/keeper/querier_test.go @@ -134,6 +134,23 @@ func TestQueryAggregateVotes(t *testing.T) { require.Equal(t, expectedVotes, res.AggregateVotes) } +func TestQuerySlashingWindow(t *testing.T) { + input := CreateTestInput(t) + querier := NewQuerier(input.OracleKeeper) + + input.Ctx = input.Ctx.WithBlockHeight(12502) + ctx := sdk.WrapSDKContext(input.Ctx) + res, err := querier.SlashWindow(ctx, &types.QuerySlashWindowRequest{}) + require.NoError(t, err) + require.Equal(t, 1250, int(res.WindowProgress)) + + input.Ctx = input.Ctx.WithBlockHeight(300501) + ctx = sdk.WrapSDKContext(input.Ctx) + res, err = querier.SlashWindow(ctx, &types.QuerySlashWindowRequest{}) + require.NoError(t, err) + require.Equal(t, 9890, int(res.WindowProgress)) +} + func TestQueryVoteTargets(t *testing.T) { input := CreateTestInput(t) ctx := sdk.WrapSDKContext(input.Ctx) diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 2543e42f43..1277f66b6c 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -931,6 +931,92 @@ func (m *QueryAggregateVotesResponse) GetAggregateVotes() []AggregateExchangeRat return nil } +// QuerySlashWindow is the request type for the +// Query/SlashWindow RPC method. +type QuerySlashWindowRequest struct { +} + +func (m *QuerySlashWindowRequest) Reset() { *m = QuerySlashWindowRequest{} } +func (m *QuerySlashWindowRequest) String() string { return proto.CompactTextString(m) } +func (*QuerySlashWindowRequest) ProtoMessage() {} +func (*QuerySlashWindowRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_562b782cb9ac197e, []int{21} +} +func (m *QuerySlashWindowRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySlashWindowRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySlashWindowRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySlashWindowRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySlashWindowRequest.Merge(m, src) +} +func (m *QuerySlashWindowRequest) XXX_Size() int { + return m.Size() +} +func (m *QuerySlashWindowRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySlashWindowRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySlashWindowRequest proto.InternalMessageInfo + +// QuerySlashWindowResponse is response type for the +// Query/SlashWindow RPC method. +type QuerySlashWindowResponse struct { + // window_progress defines the number of voting periods + // since the last slashing event would have taken place. + WindowProgress uint64 `protobuf:"varint,1,opt,name=window_progress,json=windowProgress,proto3" json:"window_progress,omitempty"` +} + +func (m *QuerySlashWindowResponse) Reset() { *m = QuerySlashWindowResponse{} } +func (m *QuerySlashWindowResponse) String() string { return proto.CompactTextString(m) } +func (*QuerySlashWindowResponse) ProtoMessage() {} +func (*QuerySlashWindowResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_562b782cb9ac197e, []int{22} +} +func (m *QuerySlashWindowResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QuerySlashWindowResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QuerySlashWindowResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QuerySlashWindowResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QuerySlashWindowResponse.Merge(m, src) +} +func (m *QuerySlashWindowResponse) XXX_Size() int { + return m.Size() +} +func (m *QuerySlashWindowResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QuerySlashWindowResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QuerySlashWindowResponse proto.InternalMessageInfo + +func (m *QuerySlashWindowResponse) GetWindowProgress() uint64 { + if m != nil { + return m.WindowProgress + } + return 0 +} + // QueryParamsRequest is the request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -939,7 +1025,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_562b782cb9ac197e, []int{21} + return fileDescriptor_562b782cb9ac197e, []int{23} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -978,7 +1064,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_562b782cb9ac197e, []int{22} + return fileDescriptor_562b782cb9ac197e, []int{24} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1036,6 +1122,8 @@ func init() { proto.RegisterType((*QueryAggregateVoteResponse)(nil), "seiprotocol.seichain.oracle.QueryAggregateVoteResponse") proto.RegisterType((*QueryAggregateVotesRequest)(nil), "seiprotocol.seichain.oracle.QueryAggregateVotesRequest") proto.RegisterType((*QueryAggregateVotesResponse)(nil), "seiprotocol.seichain.oracle.QueryAggregateVotesResponse") + proto.RegisterType((*QuerySlashWindowRequest)(nil), "seiprotocol.seichain.oracle.QuerySlashWindowRequest") + proto.RegisterType((*QuerySlashWindowResponse)(nil), "seiprotocol.seichain.oracle.QuerySlashWindowResponse") proto.RegisterType((*QueryParamsRequest)(nil), "seiprotocol.seichain.oracle.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "seiprotocol.seichain.oracle.QueryParamsResponse") } @@ -1043,80 +1131,84 @@ func init() { func init() { proto.RegisterFile("oracle/query.proto", fileDescriptor_562b782cb9ac197e) } var fileDescriptor_562b782cb9ac197e = []byte{ - // 1162 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x94, 0x36, 0xa5, 0xcf, 0x89, 0x13, 0x26, 0x06, 0xd2, 0x4d, 0xb0, 0xd3, 0x85, 0xaa, - 0x05, 0x14, 0x6f, 0x48, 0x93, 0xd0, 0xe6, 0x97, 0x70, 0x12, 0x10, 0x05, 0xa4, 0x24, 0x6e, 0x05, - 0x88, 0xcb, 0x6a, 0x62, 0x0f, 0xce, 0x2a, 0x8e, 0x67, 0xbb, 0xb3, 0x09, 0x8d, 0xaa, 0x1e, 0x40, - 0x39, 0x70, 0xac, 0xc4, 0x0d, 0x81, 0xd4, 0x0b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, 0x01, 0xfa, 0x94, 0x00, 0x3d, 0xee, 0xab, 0x74, 0x36, - 0xdd, 0xf5, 0x8e, 0x1d, 0x1c, 0xb4, 0xb9, 0x93, 0x15, 0xa3, 0xb8, 0x8f, 0x94, 0xb8, 0x35, 0xba, - 0x72, 0x0a, 0x71, 0x71, 0x23, 0x06, 0x7d, 0x42, 0xa0, 0x2f, 0x62, 0x91, 0x69, 0x3a, 0x6c, 0xdc, - 0x10, 0x91, 0xa6, 0xc3, 0xc6, 0x4e, 0x0b, 0xfa, 0x9a, 0xd2, 0xf6, 0x3e, 0xbd, 0x79, 0x0a, 0x6d, - 0x51, 0x2f, 0xa7, 0xbf, 0x12, 0xc8, 0x45, 0x8d, 0x9f, 0x76, 0x4b, 0xaf, 0xf5, 0x25, 0x5d, 0xef, - 0xbe, 0x10, 0x85, 0x95, 0x95, 0xb0, 0x59, 0x7a, 0x23, 0xbd, 0xb0, 0x23, 0x33, 0x09, 0xfd, 0x9a, - 0x40, 0x8f, 0x6f, 0xf4, 0x34, 0xc5, 0x17, 0x1d, 0x99, 0x32, 0xb4, 0xf1, 0xf4, 0x05, 0x48, 0x78, - 0x4c, 0x11, 0xbe, 0x42, 0x2f, 0x77, 0x20, 0xec, 0x0f, 0x1b, 0x8b, 0xef, 0x3d, 0xda, 0x2f, 0x90, - 0xc7, 0xfb, 0x05, 0xf2, 0xf7, 0x7e, 0x81, 0x3c, 0x38, 0x28, 0x64, 0x1e, 0x1f, 0x14, 0x32, 0xbf, - 0x1f, 0x14, 0x32, 0x9f, 0x8c, 0xd7, 0x2d, 0x77, 0x63, 0x7b, 0xbd, 0x54, 0x15, 0x5b, 0xed, 0xa0, - 0xee, 0x06, 0x60, 0xee, 0xae, 0xcd, 0xe5, 0x7a, 0x8f, 0x5a, 0x72, 0xed, 0xbf, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x9b, 0x01, 0x29, 0x98, 0xe7, 0x10, 0x00, 0x00, + // 1229 bytes of a gzipped FileDescriptorProto +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b, 0xdc, 0x9b, 0xe3, 0x2d, 0x6e, 0xa9, 0x66, 0x14, 0x29, 0x38, 0x0f, 0x85, 0x75, + 0xd6, 0xb2, 0x1b, 0xcc, 0x17, 0x9e, 0xc9, 0x1a, 0x0d, 0x0f, 0x3f, 0xc0, 0x81, 0x76, 0xb4, 0xda, + 0x68, 0x78, 0xb1, 0x66, 0xf3, 0x0e, 0xbc, 0xd2, 0x01, 0x10, 0x25, 0x95, 0x21, 0xff, 0x99, 0xca, + 0xc5, 0xe1, 0x20, 0x0c, 0x05, 0x58, 0xfa, 0x22, 0x94, 0xda, 0xf7, 0x67, 0x81, 0x3b, 0xac, 0xe5, + 0x6f, 0xce, 0x8a, 0x35, 0xc7, 0xe7, 0xde, 0x81, 0x49, 0x6d, 0x11, 0x28, 0x77, 0xc4, 0x44, 0x5e, + 0x0c, 0x8a, 0xea, 0x6a, 0xba, 0x61, 0xda, 0xac, 0x87, 0xf9, 0x4c, 0x7d, 0x30, 0x05, 0x96, 0xae, + 0xef, 0x8b, 0xe9, 0x1f, 0x61, 0x07, 0xac, 0x5a, 0x96, 0x17, 0x1c, 0x0b, 0x0f, 0xea, 0x0e, 0x2c, + 0xea, 0xf3, 0xa8, 0x27, 0xed, 0x81, 0x43, 0x3d, 0x75, 0x28, 0xb0, 0x28, 0x61, 0x06, 0x64, 0x50, + 0xc9, 0xd5, 0xae, 0x4a, 0xda, 0x58, 0xf1, 0xde, 0x11, 0xe0, 0x62, 0x73, 0x1c, 0x60, 0xf1, 0xcd, + 0xf4, 0x91, 0x34, 0x0a, 0xed, 0x4e, 0xb0, 0x45, 0x60, 0x38, 0x35, 0x8d, 0x14, 0x39, 0x0c, 0x26, + 0x29, 0x46, 0x17, 0xfc, 0x70, 0x1c, 0x0b, 0x09, 0x8e, 0xbb, 0xbd, 0x6a, 0xa9, 0xc5, 0x64, 0xf3, + 0x8e, 0xed, 0x34, 0xc4, 0x46, 0xc4, 0x70, 0x16, 0x7b, 0x55, 0x22, 0x85, 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 0xd6, 0x7f, 0x21, 0x0a, 0xab, 0x2a, 0x61, + 0x37, 0xe8, 0xf5, 0xec, 0xc2, 0xf6, 0x78, 0x1e, 0xfa, 0x03, 0x81, 0x7c, 0xcc, 0x80, 0x64, 0xe9, + 0xcb, 0xfb, 0xad, 0x4c, 0x96, 0xbe, 0x9c, 0xe2, 0x72, 0x32, 0xb7, 0x04, 0x19, 0xd4, 0x9a, 0xa1, + 0xf3, 0xa1, 0x5f, 0x13, 0x38, 0x1e, 0x5a, 0x13, 0x9a, 0xa1, 0x07, 0x25, 0x7c, 0x91, 0x36, 0x9e, + 0xbd, 0x00, 0x29, 0x8e, 0x29, 0x8a, 0x17, 0xe8, 0xf9, 0x1e, 0x14, 0x43, 0x7b, 0x34, 0xf3, 0xc1, + 0x93, 0xed, 0x12, 0x79, 0xba, 0x5d, 0x22, 0x7f, 0x6f, 0x97, 0xc8, 0xc3, 0x9d, 0x52, 0xee, 0xe9, + 0x4e, 0x29, 0xf7, 0xfb, 0x4e, 0x29, 0xf7, 0xe9, 0xb8, 0x65, 0xfb, 0xcd, 0xb5, 0xe5, 0x4a, 0x5d, + 0xac, 0x76, 0x82, 0xba, 0x17, 0x81, 0xf9, 0x9b, 0x2e, 0x97, 0xcb, 0xc7, 0xd5, 0x92, 0x4b, 0xff, + 0x06, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x11, 0xcf, 0x80, 0xf9, 0x11, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1150,6 +1242,8 @@ type QueryClient interface { AggregateVote(ctx context.Context, in *QueryAggregateVoteRequest, opts ...grpc.CallOption) (*QueryAggregateVoteResponse, error) // AggregateVotes returns aggregate votes of all validators AggregateVotes(ctx context.Context, in *QueryAggregateVotesRequest, opts ...grpc.CallOption) (*QueryAggregateVotesResponse, error) + // SlashWindow returns slash window information + SlashWindow(ctx context.Context, in *QuerySlashWindowRequest, opts ...grpc.CallOption) (*QuerySlashWindowResponse, error) // Params queries all parameters. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) } @@ -1252,6 +1346,15 @@ func (c *queryClient) AggregateVotes(ctx context.Context, in *QueryAggregateVote return out, nil } +func (c *queryClient) SlashWindow(ctx context.Context, in *QuerySlashWindowRequest, opts ...grpc.CallOption) (*QuerySlashWindowResponse, error) { + out := new(QuerySlashWindowResponse) + err := c.cc.Invoke(ctx, "/seiprotocol.seichain.oracle.Query/SlashWindow", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, "/seiprotocol.seichain.oracle.Query/Params", in, out, opts...) @@ -1282,6 +1385,8 @@ type QueryServer interface { AggregateVote(context.Context, *QueryAggregateVoteRequest) (*QueryAggregateVoteResponse, error) // AggregateVotes returns aggregate votes of all validators AggregateVotes(context.Context, *QueryAggregateVotesRequest) (*QueryAggregateVotesResponse, error) + // SlashWindow returns slash window information + SlashWindow(context.Context, *QuerySlashWindowRequest) (*QuerySlashWindowResponse, error) // Params queries all parameters. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) } @@ -1320,6 +1425,9 @@ func (*UnimplementedQueryServer) AggregateVote(ctx context.Context, req *QueryAg func (*UnimplementedQueryServer) AggregateVotes(ctx context.Context, req *QueryAggregateVotesRequest) (*QueryAggregateVotesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AggregateVotes not implemented") } +func (*UnimplementedQueryServer) SlashWindow(ctx context.Context, req *QuerySlashWindowRequest) (*QuerySlashWindowResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SlashWindow not implemented") +} func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } @@ -1508,6 +1616,24 @@ func _Query_AggregateVotes_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Query_SlashWindow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QuerySlashWindowRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SlashWindow(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/seiprotocol.seichain.oracle.Query/SlashWindow", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SlashWindow(ctx, req.(*QuerySlashWindowRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryParamsRequest) if err := dec(in); err != nil { @@ -1570,6 +1696,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "AggregateVotes", Handler: _Query_AggregateVotes_Handler, }, + { + MethodName: "SlashWindow", + Handler: _Query_SlashWindow_Handler, + }, { MethodName: "Params", Handler: _Query_Params_Handler, @@ -2225,6 +2355,57 @@ func (m *QueryAggregateVotesResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } +func (m *QuerySlashWindowRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySlashWindowRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySlashWindowRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QuerySlashWindowResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QuerySlashWindowResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QuerySlashWindowResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.WindowProgress != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.WindowProgress)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2554,6 +2735,27 @@ func (m *QueryAggregateVotesResponse) Size() (n int) { return n } +func (m *QuerySlashWindowRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QuerySlashWindowResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.WindowProgress != 0 { + n += 1 + sovQuery(uint64(m.WindowProgress)) + } + return n +} + func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -4176,6 +4378,125 @@ func (m *QueryAggregateVotesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QuerySlashWindowRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySlashWindowRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySlashWindowRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QuerySlashWindowResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QuerySlashWindowResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QuerySlashWindowResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WindowProgress", wireType) + } + m.WindowProgress = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WindowProgress |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index a3f0e9973c..502f07529e 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -375,6 +375,24 @@ func local_request_Query_AggregateVotes_0(ctx context.Context, marshaler runtime } +func request_Query_SlashWindow_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySlashWindowRequest + var metadata runtime.ServerMetadata + + msg, err := client.SlashWindow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_SlashWindow_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QuerySlashWindowRequest + var metadata runtime.ServerMetadata + + msg, err := server.SlashWindow(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest var metadata runtime.ServerMetadata @@ -629,6 +647,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_SlashWindow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_SlashWindow_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SlashWindow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -893,6 +934,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_SlashWindow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_SlashWindow_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_SlashWindow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -937,6 +998,8 @@ var ( pattern_Query_AggregateVotes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"sei-protocol", "sei-chain", "oracle", "validators", "aggregate_votes"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_SlashWindow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sei-protocol", "sei-chain", "oracle", "slash_window"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"sei-protocol", "sei-chain", "oracle", "params"}, "", runtime.AssumeColonVerbOpt(true))) ) @@ -961,5 +1024,7 @@ var ( forward_Query_AggregateVotes_0 = runtime.ForwardResponseMessage + forward_Query_SlashWindow_0 = runtime.ForwardResponseMessage + forward_Query_Params_0 = runtime.ForwardResponseMessage )