-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Indexer-Grpc-V2] Add protos. #15701
Conversation
⏱️ 3h 5m total CI duration on this PR
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
import "aptos/transaction/v1/transaction.proto"; | ||
import "aptos/util/timestamp/timestamp.proto"; | ||
|
||
message StreamProgressSampleProto { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i feel Proto here is a little redundant; either remove or use unit
something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use here because in the rust code I have a corresponding struct called StreamProgressSample
. Just want to have a different name here.
} | ||
|
||
message StreamProgress { | ||
repeated StreamProgressSampleProto samples = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the intent behind collecting multiple samples here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calculate tps, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sync'ed offline; for monitoring purpose.
optional StreamInfo stream_info = 3; | ||
} | ||
|
||
message FullnodeInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should include validation here? like chain id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Done.
overall looks good; some nits/questions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a second pair of eyes 👀 overall looks good
also i see that the master address in the message; does election process leverage the proposed protos or you'll introduce new grpcs? |
It won't rely on this. (and based on the design review I will probably not implement it in the beginning, just configure one of them through config). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
you may need rebase |
Done |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
async fn ping( | ||
&self, | ||
_request: Request<PingFullnodeRequest>, | ||
) -> Result<Response<PingFullnodeResponse>, Status> { | ||
unimplemented!() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using unimplemented!()
will cause a panic at runtime. Consider returning a proper gRPC response instead:
Ok(Response::new(PingFullnodeResponse { info: None }))
This maintains the gRPC contract while indicating the endpoint is not yet implemented.
Spotted by Graphite Reviewer
Is this helpful? React 👍 or 👎 to let us know.
✅ Forge suite
|
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
Description
How Has This Been Tested?
Key Areas to Review
Type of Change
Which Components or Systems Does This Change Impact?
Checklist