-
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
[AppGate] Implement the MVP AppGateServer #108
Conversation
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 a few comments on adding some TODO
s for me to pick up. But this is great work bringing over the MVP 10/10
I addressed most of the comments, but haven't touched the signature parts yet. As per @Olshansk comments signatures should go into |
"github.com/cometbft/cometbft/crypto" | ||
accounttypes "github.com/cosmos/cosmos-sdk/x/auth/types" | ||
"github.com/noot/ring-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.
Just FYI that this is finally happening @noot :)
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.
Big up @noot loving the ring library <3
…n and signing information handled by the creator func
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.
* pokt/relayer/cli: [AppGate] Implement the MVP AppGateServer (#108) chore: Improve comment about startig relayer proxy [Relayer] feat: Add Relayer struct (#172) feat: Use relay miner to start chore: Reflect responsibility changes of session manager [Miner] feat: add `Miner` component (#168) fix: Update Miner interface chore: update start mining comment chore: Remove unused RelayerOption parameter chore: Rename relay miner file chore: Rename to RelayMiner feat: Add Relayer struct
Summary
Human Summary
AppGateServer
implementation that supports JSONRPC over HTTP. Used to sign and sendRelayRequests
, verify the correspondingRelayResponse
's supplier signature and reply to the client with the original service response.The
appGateServer
will build rings for the application and cache them in order to send relays to the network signed. This PR also implements signature verification for theRelayerProxy
.This PR adds the cobra cmd to start the AppGateServer from the CLI.
Outstanding TODOs:
AI Summary
Summary generated by Reviewpad on 10 Nov 23 22:45 UTC
This pull request introduces various changes to several files. Here is a summary of the changes:
root.go: Adds support for an appgate server command to the existing root command.
go.sum: Adds new dependencies to the project.
simple_signer.go: Adds the implementation of the SimpleSigner type, which provides functionality for signing messages using a keyring and key name.
appgateserver.go: Provides logic related to creating and managing rings for signing relays in the appgateserver package.
relay_verifier.go: Makes changes related to verifying relay request and response signatures.
endpoint_selector.go: Adds functionality for selecting a relayer endpoint based on service ID and JSON RPC type.
errors.go: Defines error variables registered using sdkerrors.Register for the appgateserver and relayer packages.
interface.go: Introduces the Signer interface, which abstracts the signing of a message.
options.go: Adds functions for setting signing information and listening URL for the appgate server.
session.go: Adds functionality for retrieving the current session for a given service in the appgateserver package.
relay.go: Adds methods for generating signable bytes for relay requests and responses.
proxy package: Adds functions related to creating and managing rings for signing relays in the proxy package.
options.go: Adds functions for setting signing information and listening URL for the appgate server.
session.go: Adds functionality for retrieving the current session for a given service in the appgateserver package.
relay.go: Adds methods for generating signable bytes for relay requests and responses.
errors.go: Makes changes to error variables in the relayer/proxy package.
go.mod: Adds new dependencies to the project.
pkg/client/block/client.go: Updates the block client functionality and error handling.
prog.go: Deletes the file containing code for generating a package using GoMock reflections.
proxy.go: Adds new import statements and additional fields related to the application module and ring caching.
appGateServer.go: Contains the implementation of the appGateServer struct, which handles listening to application requests, signing and relaying them, and verifying response signatures.
Please review these changes for your pull request.
Type of change
Select one or more:
Testing
make go_develop_and_test
Sanity Checklist