-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use gRPC client connection #257
Conversation
Discussed offline. Going to wait for this PR to be split per the discussion here: pokt-network/helm-charts#15 (comment) |
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.
Overall great PR, love to see this is a possibility great discovery! Mostly some spelling errors, overall looks good. Let's see how it goes once the helm charts are updated
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.
Nice one @red-0ne! 🙌
I had a few suggestions and questions but otherwise, this is looking really good, thanks for the improvements. 🦾
Thanks for the review @bryanchriswhite, having a stricter assertion on the test errors helped spotting a missing case |
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.
Preemptively approving; I had a couple questions/assumptions, and a few NITs but otherwise let's 🚢!
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.
Left one comment, after Bryan's comments are addressed I think this is good to go! 🔥
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.
@red-0ne Left a couple last-minute comments so PTAL before merging but otherwise approving!
Closing this one as it's already handled by #284 |
Summary
Human Summary
FlagGRPC
andFlagGRPCInsecure
toAppGateServer
andRelayMiner
cmd.go
to makecosmosClient.Context
build a gRPC client.AppGateServer
config files to acceptquery_node_grpc_url
to be used byQueryClient
squery_node_rpc_url
to be used byBlockClient
andEventsQueryClient
RelayMiner
config files to acceptquery_node_grpc_url
forQueryClient
s usagetx_node_grpc_url
for transactions usagequery_node_rpc_url
forBlockClient
andEventsQueryClient
deps/config/supplier.go
to handle these changesNote: e2e tests for this change need changes from
helm-charts
repo to enable gRPC connectionsAI Summary
Summary generated by Reviewpad on 21 Dec 23 01:11 UTC
This pull request modifies multiple files in the codebase. Here is a summary of the changes:
values-relayminer.yaml
:query_node_url
andnetwork_node_url
properties withquery_node_rpc_url
,query_node_grpc_url
, andtx_node_grpc_url
.relayminer_config.yaml
:query_node_rpc_url
,query_node_grpc_url
, andtx_node_grpc_url
properties for Pocket node URLs.network_node_url
property.query_node_url
property totcp://poktroll-sequencer:36657
.smt_store_path
property.proxied_service_endpoints
section.svc1
endpoint from theproxied_service_endpoints
section.RelayMinerConfig
structure and its related functionality:QueryNodeUrl
field toQueryNodeRPCUrl
.QueryNodeGRPCUrl
andTxNodeGRPCUrl
.ProxiedServiceEndpoints
field type frommap[string]string
tomap[string]*url.URL
.appgate_configs_reader.go
:QueryNodeRPCUrl
andQueryNodeGRPCUrl
of typestring
to theYAMLAppGateServerConfig
struct.YAMLAppGateServerConfig
struct.QueryNodeRPCUrl
andQueryNodeGRPCUrl
of type*url.URL
to theAppGateServerConfig
struct.AppGateServerConfig
struct.ParseAppGateServerConfigs
function to handle the newly added fields.SigningKey
,ListeningEndpoint
, andQueryNodeGRPCUrl
fields.QueryNodeUrl
field from theAppGateServerConfig
struct.Changes to error variables in
errors.go
:ErrRelayMinerConfigInvalidQueryNodeUrl
toErrRelayMinerConfigInvalidQueryNodeGRPCUrl
.ErrRelayMinerConfigInvalidNetworkNodeUrl
toErrRelayMinerConfigInvalidTxNodeGRPCUrl
.ErrRelayMinerConfigInvalidSmtStorePath
toErrRelayMinerConfigInvalidQueryNodeRPCUrl
.ErrRelayMinerConfigInvalidQueryNodeRPCUrl
.ErrRelayMinerConfigEmpty
error.Changes to error variables in
errors.go
within thepkg/appgateserver/config
directory:ErrAppGateConfigInvalidQueryNodeGRPCUrl
error for an invalid query node gRPC URL in theAppGateServer
config.ErrAppGateConfigInvalidQueryNodeRPCUrl
error for an invalid query node RPC URL in theAppGateServer
config.ErrAppGateConfigEmpty
error for an emptyAppGateServer
config.Summary of overall file diff:
self_signing
field.query_node_url
field.values-appgateserver.yaml
:query_node_url
withquery_node_rpc_url
.query_node_grpc_url
.cmd.go
:flagAppGateConfig
to store the AppGate config filepath.flagNodeRPCURL
andflagNodeGRPCURL
to store the Cosmos node RPC URL and GRPC URL.flagCosmosNodeURL
variable.setupAppGateServerDependencies
to override certain config values based on command-line flags.Changes to
appgate_configs_reader_test.go
:Changes to
cmd.go
:flagRelayMinerConfig
for the relay miner config filepath.flagNodeRPCURL
andflagNodeGRPCURL
for the Cosmos node RPC URL and GRPC URL.flagCosmosNodeURL
variable.RelayerCmd
function to include the new flag variable assignments.setupRelayerDependencies
function to handle the new flag variable values.config
functions with the new flag variable values.Changes to
pkg/appgateserver/config/depinject.go
:grpc.ClientConn
.Changes to
supplierquerier.go
:NewSupplierQuerier
function to include a required dependency calledgrpc.ClientConn
.Changes to dependencies in
go.mod
:Let me know if you need any further assistance with this code review.
Type of change
Select one or more:
Testing
make go_develop_and_test
make test_e2e
: Add the
devnet-test-e2e` label to the PR. This is VERY expensive, o only do it after all the reviews are complete.Sanity Checklist