-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Documentation] Add AppGateServer Docs #200
Conversation
RelayerOption parameter
- Fixed helpers for localnet regenesis - Added an application & supplier to the genesis file - Initializing appMap & supplierMap in E2E tests - Add support for the app's codec (for unmarshaling responses) in E2E tests - Adding a placeholder for `e2e/tests/relay.feature` --- Co-authored-by: harry <[email protected]>
* refactor: `MapFn`s receive context arg * feat: add `MapExpand` observable operator * refactor: `RelayerSessionsManager` to be more reactive * chore: add godoc comment * chore: review feedback improvements * trigger CI
Co-authored-by: Daniel Olshansky <[email protected]>
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 chage request and questions but this seems promising 👍
|
||
### Rings | ||
|
||
Rings are created using the application's on-chain state. This includes a list |
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.
Rings are created using the application's on-chain state. This includes a list | |
Rings are created using the application's on-chain state. In gateway mode, this includes a list |
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.
This will always include the gateways, it depends on whether the application has delegated or not, but if it has and it starts its own appgateserver to self sign it will still have those in its ring
pkg/partials/partial.go
Outdated
} | ||
return partialRequest.GetMethodWeighting() | ||
} | ||
|
||
// partiallyUnmarshalRequest unmarshals the payload into a partial request | ||
// that contains only the fields necessary to generate an error response and | ||
// handle accounting for the request's method. | ||
func partiallyUnmarshalRequest(payloadBz []byte) (PartialPayload, error) { |
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.
Curious to know how the RPCType is inferred when we'll have more than one
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.
Here will be sort of like a switch logic but instead but unmarshalling - the first example would fail if it was not a json request with at least one of those fields. If this is not the case we will get to the next type - once i have a better understanding of REST request format I will put it in it will make more sense how we add RPC types
The PartialPayload
interface has a GetRPCType()
method that returns the rpc type for the payload hardcoded, so all we need to do is the partial unmarshal and were good to go for accoutning and errors
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.
pkg/relayer/proxy/symmetric.go
Outdated
func NewJSONRPCServer( | ||
// NewSymmetricServer creates a new HTTP server that listens for incoming relay | ||
// requests and forwards them to the supported proxied service endpoint. | ||
// It takes the serviceId, endpointUrl, and the main RelayerProxy as arguments |
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.
The types are already getting outdated (e.g. serviced is incorrect), so lets remove that and just focus on the goal of the 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.
Little confused here - I renamed the method in the comment and havent touched the rest. What is outdated and how?
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.
@h5law I can appreciate merging in PRs to make building on top of main easier, but I still have not had a chance to review pkg/appgateserver/docs/server.md
(the documentation here), so I don't see a reason to rush it.
If there's code in this PR that we should get in ASAP, let's split it out.
@h5law Going to review this tomorrow. Thanks for the patience! |
@h5law Are we going to pick this PR up again? |
Summary
Human Summary
This PR:
appgateserver
AI Summary
Summary generated by Reviewpad on 23 Nov 23 19:32 UTC
This pull request includes changes to multiple files.
The file
relay_fixtures_test.go
has changes to the variablesmarshaledMinableRelaysHex
andmarshaledUnminableRelaysHex
. These variables have been updated with new values.The file
server.go
has changes to the functionrecordLocalToScalar
. The error messages returned by this function have been formatted to provide more information about the types involved.A new file
server.md
has been added to the package. It serves as comprehensive documentation for theAppGateServer
component, covering various aspects of its usage and functionality.The file
synchronous.go
in thepkg/relayer/proxy
package has changes to theserveHTTP
function. The changes involve using therelayRequest.Meta.SessionHeader
on therelayResponse
session header, along with an added log statement for debugging purposes.The file diff also shows changes to the dependency versions in a separate file.
If you need further assistance, please let me know.
Issue
Type of change
Select one or more:
Testing
make go_develop_and_test
Sanity Checklist