multinode/payouts: EarnedPerSatellite added

private/multinodepb: multinode.proto updated

Change-Id: Iaeffd31ae124ac5b2716ca1b2d05e764372e2d94
This commit is contained in:
Qweder93 2021-02-04 17:44:31 +02:00
parent db3a3088f9
commit cdf58a1ffd
4 changed files with 301 additions and 54 deletions

View File

@ -768,6 +768,121 @@ func (m *EarnedResponse) GetTotal() int64 {
return 0
}
type EarnedPerSatelliteRequest struct {
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EarnedPerSatelliteRequest) Reset() { *m = EarnedPerSatelliteRequest{} }
func (m *EarnedPerSatelliteRequest) String() string { return proto.CompactTextString(m) }
func (*EarnedPerSatelliteRequest) ProtoMessage() {}
func (*EarnedPerSatelliteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9a45fd79b06f3a1b, []int{15}
}
func (m *EarnedPerSatelliteRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EarnedPerSatelliteRequest.Unmarshal(m, b)
}
func (m *EarnedPerSatelliteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EarnedPerSatelliteRequest.Marshal(b, m, deterministic)
}
func (m *EarnedPerSatelliteRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_EarnedPerSatelliteRequest.Merge(m, src)
}
func (m *EarnedPerSatelliteRequest) XXX_Size() int {
return xxx_messageInfo_EarnedPerSatelliteRequest.Size(m)
}
func (m *EarnedPerSatelliteRequest) XXX_DiscardUnknown() {
xxx_messageInfo_EarnedPerSatelliteRequest.DiscardUnknown(m)
}
var xxx_messageInfo_EarnedPerSatelliteRequest proto.InternalMessageInfo
func (m *EarnedPerSatelliteRequest) GetHeader() *RequestHeader {
if m != nil {
return m.Header
}
return nil
}
type EarnedPerSatelliteResponse struct {
EarnedSatellite []*EarnedSatellite `protobuf:"bytes,1,rep,name=earned_satellite,json=earnedSatellite,proto3" json:"earned_satellite,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EarnedPerSatelliteResponse) Reset() { *m = EarnedPerSatelliteResponse{} }
func (m *EarnedPerSatelliteResponse) String() string { return proto.CompactTextString(m) }
func (*EarnedPerSatelliteResponse) ProtoMessage() {}
func (*EarnedPerSatelliteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9a45fd79b06f3a1b, []int{16}
}
func (m *EarnedPerSatelliteResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EarnedPerSatelliteResponse.Unmarshal(m, b)
}
func (m *EarnedPerSatelliteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EarnedPerSatelliteResponse.Marshal(b, m, deterministic)
}
func (m *EarnedPerSatelliteResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_EarnedPerSatelliteResponse.Merge(m, src)
}
func (m *EarnedPerSatelliteResponse) XXX_Size() int {
return xxx_messageInfo_EarnedPerSatelliteResponse.Size(m)
}
func (m *EarnedPerSatelliteResponse) XXX_DiscardUnknown() {
xxx_messageInfo_EarnedPerSatelliteResponse.DiscardUnknown(m)
}
var xxx_messageInfo_EarnedPerSatelliteResponse proto.InternalMessageInfo
func (m *EarnedPerSatelliteResponse) GetEarnedSatellite() []*EarnedSatellite {
if m != nil {
return m.EarnedSatellite
}
return nil
}
type EarnedSatellite struct {
Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
SatelliteId NodeID `protobuf:"bytes,2,opt,name=satellite_id,json=satelliteId,proto3,customtype=NodeID" json:"satellite_id"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EarnedSatellite) Reset() { *m = EarnedSatellite{} }
func (m *EarnedSatellite) String() string { return proto.CompactTextString(m) }
func (*EarnedSatellite) ProtoMessage() {}
func (*EarnedSatellite) Descriptor() ([]byte, []int) {
return fileDescriptor_9a45fd79b06f3a1b, []int{17}
}
func (m *EarnedSatellite) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EarnedSatellite.Unmarshal(m, b)
}
func (m *EarnedSatellite) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EarnedSatellite.Marshal(b, m, deterministic)
}
func (m *EarnedSatellite) XXX_Merge(src proto.Message) {
xxx_messageInfo_EarnedSatellite.Merge(m, src)
}
func (m *EarnedSatellite) XXX_Size() int {
return xxx_messageInfo_EarnedSatellite.Size(m)
}
func (m *EarnedSatellite) XXX_DiscardUnknown() {
xxx_messageInfo_EarnedSatellite.DiscardUnknown(m)
}
var xxx_messageInfo_EarnedSatellite proto.InternalMessageInfo
func (m *EarnedSatellite) GetTotal() int64 {
if m != nil {
return m.Total
}
return 0
}
func init() {
proto.RegisterType((*RequestHeader)(nil), "multinode.RequestHeader")
proto.RegisterType((*DiskSpaceRequest)(nil), "multinode.DiskSpaceRequest")
@ -787,64 +902,71 @@ func init() {
proto.RegisterType((*TrustedSatellitesResponse_NodeURL)(nil), "multinode.TrustedSatellitesResponse.NodeURL")
proto.RegisterType((*EarnedRequest)(nil), "multinode.EarnedRequest")
proto.RegisterType((*EarnedResponse)(nil), "multinode.EarnedResponse")
proto.RegisterType((*EarnedPerSatelliteRequest)(nil), "multinode.EarnedPerSatelliteRequest")
proto.RegisterType((*EarnedPerSatelliteResponse)(nil), "multinode.EarnedPerSatelliteResponse")
proto.RegisterType((*EarnedSatellite)(nil), "multinode.EarnedSatellite")
}
func init() { proto.RegisterFile("multinode.proto", fileDescriptor_9a45fd79b06f3a1b) }
var fileDescriptor_9a45fd79b06f3a1b = []byte{
// 825 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xd1, 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 0x12, 0x1d, 0x6d,
0xde, 0x5a, 0x49, 0x7c, 0xfc, 0x7f, 0x56, 0xbb, 0x75, 0x09, 0xfa, 0x35, 0x9e, 0xd1, 0x98, 0xa3,
0x4f, 0x40, 0x97, 0x8b, 0x83, 0xb2, 0x4b, 0xb6, 0xb4, 0x8e, 0xe6, 0xc1, 0x8a, 0x8a, 0x24, 0x6a,
0x1f, 0x7f, 0x6f, 0x31, 0x4e, 0xa3, 0x1f, 0x6d, 0x8f, 0x36, 0xc5, 0x47, 0x33, 0x8c, 0xbc, 0x29,
0xe6, 0xa4, 0x99, 0xb6, 0x84, 0x83, 0x81, 0x2e, 0x6c, 0xf9, 0xf4, 0xdf, 0x00, 0x00, 0x00, 0xff,
0xff, 0xd9, 0x0f, 0xd3, 0x9c, 0x8f, 0x08, 0x00, 0x00,
// 895 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x5f, 0x73, 0xdb, 0x44,
0x10, 0x47, 0x49, 0x2c, 0xd7, 0x6b, 0x37, 0x4e, 0x8e, 0xce, 0xa0, 0x88, 0xa4, 0xee, 0xa8, 0x81,
0x86, 0x81, 0x91, 0xc1, 0x7d, 0x62, 0x06, 0x66, 0xa8, 0x49, 0x4b, 0x33, 0xb8, 0x10, 0xe4, 0xc0,
0x43, 0x99, 0xa9, 0xe7, 0x62, 0x6d, 0x1d, 0x51, 0x59, 0x27, 0x74, 0xa7, 0x40, 0xbe, 0x05, 0x9f,
0x83, 0x2f, 0xc1, 0xf0, 0xc2, 0xf0, 0x19, 0x78, 0x28, 0x1f, 0x83, 0x57, 0x46, 0x77, 0x27, 0x59,
0x8e, 0x65, 0x87, 0x31, 0x6f, 0xda, 0xdd, 0xdf, 0xfe, 0x76, 0x6f, 0xff, 0x09, 0xda, 0xd3, 0x34,
0x14, 0x41, 0xc4, 0x7c, 0x74, 0xe3, 0x84, 0x09, 0x46, 0x1a,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0x43, 0xc5, 0xfe, 0xd9,
0xef, 0xdc, 0x80, 0x52, 0x21, 0xfa, 0x87, 0xcf, 0x1d, 0x2e, 0x58, 0xf2, 0x83, 0x1b, 0xb0, 0xae,
0xfc, 0xe8, 0xc6, 0x49, 0x70, 0x49, 0x05, 0x76, 0x0b, 0xf7, 0xf8, 0xfc, 0xdc, 0x94, 0xbf, 0xc2,
0x87, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x3f, 0xac, 0xd3, 0x03, 0x0a, 0x00, 0x00,
}
// --- DRPC BEGIN ---
@ -1168,6 +1290,7 @@ type DRPCPayoutClient interface {
DRPCConn() drpc.Conn
Earned(ctx context.Context, in *EarnedRequest) (*EarnedResponse, error)
EarnedPerSatellite(ctx context.Context, in *EarnedPerSatelliteRequest) (*EarnedPerSatelliteResponse, error)
}
type drpcPayoutClient struct {
@ -1189,13 +1312,23 @@ func (c *drpcPayoutClient) Earned(ctx context.Context, in *EarnedRequest) (*Earn
return out, nil
}
func (c *drpcPayoutClient) EarnedPerSatellite(ctx context.Context, in *EarnedPerSatelliteRequest) (*EarnedPerSatelliteResponse, error) {
out := new(EarnedPerSatelliteResponse)
err := c.cc.Invoke(ctx, "/multinode.Payout/EarnedPerSatellite", in, out)
if err != nil {
return nil, err
}
return out, nil
}
type DRPCPayoutServer interface {
Earned(context.Context, *EarnedRequest) (*EarnedResponse, error)
EarnedPerSatellite(context.Context, *EarnedPerSatelliteRequest) (*EarnedPerSatelliteResponse, error)
}
type DRPCPayoutDescription struct{}
func (DRPCPayoutDescription) NumMethods() int { return 1 }
func (DRPCPayoutDescription) NumMethods() int { return 2 }
func (DRPCPayoutDescription) Method(n int) (string, drpc.Receiver, interface{}, bool) {
switch n {
@ -1208,6 +1341,15 @@ func (DRPCPayoutDescription) Method(n int) (string, drpc.Receiver, interface{},
in1.(*EarnedRequest),
)
}, DRPCPayoutServer.Earned, true
case 1:
return "/multinode.Payout/EarnedPerSatellite",
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return srv.(DRPCPayoutServer).
EarnedPerSatellite(
ctx,
in1.(*EarnedPerSatelliteRequest),
)
}, DRPCPayoutServer.EarnedPerSatellite, true
default:
return "", nil, nil, false
}
@ -1233,4 +1375,20 @@ func (x *drpcPayoutEarnedStream) SendAndClose(m *EarnedResponse) error {
return x.CloseSend()
}
type DRPCPayout_EarnedPerSatelliteStream interface {
drpc.Stream
SendAndClose(*EarnedPerSatelliteResponse) error
}
type drpcPayoutEarnedPerSatelliteStream struct {
drpc.Stream
}
func (x *drpcPayoutEarnedPerSatelliteStream) SendAndClose(m *EarnedPerSatelliteResponse) error {
if err := x.MsgSend(m); err != nil {
return err
}
return x.CloseSend()
}
// --- DRPC END ---

View File

@ -98,6 +98,7 @@ message TrustedSatellitesResponse {
service Payout {
rpc Earned(EarnedRequest) returns (EarnedResponse);
rpc EarnedPerSatellite(EarnedPerSatelliteRequest) returns (EarnedPerSatelliteResponse);
}
message EarnedRequest {
@ -107,3 +108,14 @@ message EarnedRequest {
message EarnedResponse {
int64 total = 1;
}
message EarnedPerSatelliteRequest {
RequestHeader header = 1;
}
message EarnedPerSatelliteResponse {
repeated EarnedSatellite earned_satellite = 1;
}
message EarnedSatellite {
int64 total = 1;
bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
}

View File

@ -51,3 +51,32 @@ func (payout *PayoutEndpoint) Earned(ctx context.Context, req *multinodepb.Earne
Total: earned,
}, nil
}
// EarnedPerSatellite returns total earned amount per satellite.
func (payout *PayoutEndpoint) EarnedPerSatellite(ctx context.Context, req *multinodepb.EarnedPerSatelliteRequest) (_ *multinodepb.EarnedPerSatelliteResponse, err error) {
defer mon.Task()(&ctx)(&err)
if err = authenticate(ctx, payout.apiKeys, req.GetHeader()); err != nil {
return nil, rpcstatus.Wrap(rpcstatus.Unauthenticated, err)
}
var resp multinodepb.EarnedPerSatelliteResponse
satelliteIDs, err := payout.db.GetPayingSatellitesIDs(ctx)
if err != nil {
return nil, rpcstatus.Wrap(rpcstatus.Internal, err)
}
for i := 0; i < len(satelliteIDs); i++ {
earned, err := payout.db.GetEarnedAtSatellite(ctx, satelliteIDs[i])
if err != nil {
return nil, rpcstatus.Wrap(rpcstatus.Internal, err)
}
resp.EarnedSatellite = append(resp.EarnedSatellite, &multinodepb.EarnedSatellite{
Total: earned,
SatelliteId: satelliteIDs[i],
})
}
return &resp, nil
}

View File

@ -0,0 +1,48 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
package multinode_test
import (
"testing"
"github.com/stretchr/testify/require"
"go.uber.org/zap/zaptest"
"storj.io/common/testcontext"
"storj.io/common/testrand"
"storj.io/storj/private/multinodepb"
"storj.io/storj/private/testplanet"
"storj.io/storj/storagenode/apikeys"
"storj.io/storj/storagenode/multinode"
"storj.io/storj/storagenode/payouts"
)
func TestEarnedPerSatellite(t *testing.T) {
testplanet.Run(t, testplanet.Config{
StorageNodeCount: 1,
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {
log := zaptest.NewLogger(t)
service := apikeys.NewService(planet.StorageNodes[0].DB.APIKeys())
endpoint := multinode.NewPayoutEndpoint(log, service, planet.StorageNodes[0].DB.Payout())
var amount int64 = 200
err := planet.StorageNodes[0].DB.Payout().StorePayStub(ctx, payouts.PayStub{
SatelliteID: testrand.NodeID(),
CompAtRest: amount,
})
require.NoError(t, err)
key, err := service.Issue(ctx)
require.NoError(t, err)
response, err := endpoint.EarnedPerSatellite(ctx, &multinodepb.EarnedPerSatelliteRequest{
Header: &multinodepb.RequestHeader{
ApiKey: key.Secret[:],
},
})
require.NoError(t, err)
require.Equal(t, response.EarnedSatellite[0].Total, amount)
})
}