Skip to content

Commit

Permalink
GROW-784 Add Badge Generation protobuf to Lava (lavanet#521)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirtayeb authored May 28, 2023
1 parent bb8ef9b commit 1e5f347
Show file tree
Hide file tree
Showing 4 changed files with 603 additions and 67 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ require (
github.com/ghodss/yaml v1.0.0 // indirect
github.com/gogo/googleapis v1.4.0 // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/tools v0.7.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
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/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=
Expand Down
14 changes: 13 additions & 1 deletion proto/pairing/relay.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package lavanet.lava.pairing;
import "gogoproto/gogo.proto";
import "google/protobuf/wrappers.proto";
import "epochstorage/stake_entry.proto";

option go_package = "github.com/lavanet/lava/x/pairing/types";

Expand Down Expand Up @@ -55,6 +56,17 @@ message Badge {
bytes project_sig = 5;
}

message GenerateBadgeRequest {
string badge_address = 1;
string project_id = 2;
string spec_id = 3 [(gogoproto.nullable) = true];
}

message GenerateBadgeResponse {
Badge badge = 1;
repeated lavanet.lava.epochstorage.StakeEntry pairing_list = 2 [(gogoproto.nullable) = true];
}

message RelayReply {
bytes data = 1;
bytes sig = 2; // sign the data hash+query hash+nonce
Expand All @@ -80,4 +92,4 @@ message QualityOfServiceReport{
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec",
(gogoproto.nullable) = false
];
}
}
Loading

0 comments on commit 1e5f347

Please sign in to comment.