Skip to content

Instantly share code, notes, and snippets.

@gorbak25
Created May 1, 2023 14:45
Show Gist options
  • Save gorbak25/ccc23eb2245377f927c52f6cadff2a09 to your computer and use it in GitHub Desktop.
Save gorbak25/ccc23eb2245377f927c52f6cadff2a09 to your computer and use it in GitHub Desktop.
WWW19 Distributed Systems Workshops
syntax = "proto3";
package zad1;
enum MathOperation {
ADD = 0;
SUB = 1;
MUL = 2;
}
message AstBranch {
MathOperation op = 1;
Ast left = 2;
Ast right = 3;
}
message Ast {
oneof node {
int64 value = 1;
AstBranch branch = 2;
}
}
message Challenge {
uint64 timestamp = 1;
bytes signature = 2;
uint32 correct_answers = 3;
optional Ast chall = 4;
}
message ChallengeSolution {
int64 response = 1;
Challenge challenge = 2;
}
message GetChallengeRequest {
optional ChallengeSolution solution = 1;
}
message RegistrationRequest {
string name = 1;
string surname = 2;
Challenge challenge = 3;
}
message RegistrationResponse {
string result = 1;
}
service WWW19Registration {
rpc GetChallenge(GetChallengeRequest) returns (Challenge);
rpc RegisterForWorkshops(RegistrationRequest) returns (RegistrationResponse);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment