forked from statechannels/go-nitro
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement RPC API for voucher validation #18
Merged
ashwinphatak
merged 12 commits into
cerc-io:ts-interop
from
deep-stack:nv-validate-voucher
Oct 18, 2023
Merged
Implement RPC API for voucher validation #18
ashwinphatak
merged 12 commits into
cerc-io:ts-interop
from
deep-stack:nv-validate-voucher
Oct 18, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prathamesh0
force-pushed
the
nv-validate-voucher
branch
from
October 16, 2023 09:57
a67a08d
to
e033149
Compare
prathamesh0
force-pushed
the
nv-validate-voucher
branch
from
October 17, 2023 11:48
ce8db03
to
1a0c740
Compare
prathamesh0
force-pushed
the
nv-validate-voucher
branch
from
October 17, 2023 14:33
8200d8d
to
7190cfc
Compare
prathamesh0
changed the title
[WIP] Implement RPC API for voucher validation
Implement RPC API for voucher validation
Oct 18, 2023
nikugogoi
added a commit
that referenced
this pull request
Aug 20, 2024
* Add websocket transport in message service to connect with browser client (#2) * Use mplex muxer (#4) * Add workflow to publish `nitro-protocol` package (#5) * Add workflow to publish nitro-protocol * Set gas limit and gas price in ConnectToChain * Update workflow to use npm * Revert "Set gas limit and gas price in ConnectToChain" This reverts commit 8e11f0d. --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com> * Upgrade `nitro-protocol` package to `2.0.0-alpha.4-ts-port-0.1.1` (#7) * Upgrade @cerc-io/nitro-protocol to 2.0.0-alpha.4-ts-port-0.1.1 * Add WebSocket message port in reverse payment proxy test --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com> * Use Node version 18.15 for publishing package (#8) Co-authored-by: neeraj <neeraj.rtly@gmail.com> * Add back `receivePeerInfo` method for connecting with ts-nitro (#9) * Use receivePeerInfo for peer info exchange * Add WebSocket message port in rpc test --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com> * Use slog in receivePeerInfo and revert use of mplex (#10) * Use slog in receivePeerInfo * Revert "Use mplex muxer (#4)" This reverts commit 0472b96. * Fix logging in receivePeerInfo --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com> * Add WebSocket message port in InitializeNode method (#11) * Add WebSocket message port in InitializeNode method * Upgrade @cerc-io/nitro-protocol to 2.0.0-alpha.4-ts-port-0.1.3 --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com> * Disable compression in payment proxy transport and add proxy in the Dockerfile (#12) * Disable compression on reverse proxy transport to access content-length * Add jq to the Docker image * Add binary for reverse payment proxy to the Docker image * Add netcat to the Docker image * Listen on any IP for Message service ports * Check payment for listed methods in reverse payment proxy * Add flag filterrpcmethods to verify payments for selected RPC methods * Change flag name to enablepaidrpcmethods --------- Co-authored-by: Nabarun <nabarun@deepstacksoft.com> * Changes required for running proxy server and `nitro-rpc-client` in payments stack (#14) * Add eth_getBlockByNumber to paidRPCMethods * Fix payment proxy cmd name in Docker build * Add option to pass hostname in `nitro-rpc-client` cli (#13) * Add option to pass hostname in nitro-rpc-client cli * Rename variable host to rpcHost in rpc-nitro-client * Update yarn lock file --------- Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> --------- Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> * Parse RPC method from request body in proxy server (#15) * Parse RPC method from request body * Use handleError method to log error * Add todo to check for content type * Increase golangci-lint timeout to 5 min * Change error string to lower case * Parse RPC method from body if enablePaidRpcMethods is true --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com> * Improve filtering for paid RPC methods in payment proxy (#16) * Check for Content-Type and request fields for paid methods * Include the RPC method in response handler log * Setup a payments manager with voucher cache (#17) * Add payments manager * Use nitro node in payments manager * Add a placeholder HTTP middleware * Add voucher extraction and validation to the HTTP middleware * Use pointer for Nitro instance * Initialize quit channel * Fix signer recovery from payment header * Use strings for keys in voucher cache * Move ChainOpts to ETH chain service * Add comments and fix lint errors * Fix static checks * Removed commented out type * Implement RPC API for voucher validation (#18) * Add RPC method to validate voucher * Implement ValidateVoucher method in RemoteVoucherValidator * Fix log on payment not found * Fix payments manager initialization * Handle review comments * Add empty PaymentsManager in InitializeRpcServer method * Remove @cerc-io/nitro-protocol from yarn lock * Fix for initializing node without TLS * Add client support for non-secure Nitro connections * Add support for non-secure connections in js client * Fix lint errors * Fix certificates loading --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com> Co-authored-by: Nabarun <nabarun@deepstacksoft.com> * Reduce voucher check retry interval (#20) * Reduce voucher check retry interval to 1s * Remove unused variables * Add steps to run go-nitro nodes (#23) * Add steps to run go-nitro nodes * Update README * Handle review changes --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com> * Update steps to run go-nitro nodes and make payments (#24) * Update README to run nitro nodes * Update README to add example outputs * Fix lint errors * Install foundry of specific version in CI * Update README to use foundry of specific version * Add result outputs in README * Fix indentation --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com> * Revert change to remove default TLS cert in go-nitro node CLI (#14) * Upgrade nitro protocol version * Revert change to remove default TLS cert in go-nitro node CLI * Update websocket message ports --------- Co-authored-by: prathamesh0 <42446521+prathamesh0@users.noreply.github.com> Co-authored-by: neeraj <neeraj.rtly@gmail.com> Co-authored-by: Shreerang Kale <shreerangkale@gmail.com> Co-authored-by: neerajvijay1997 <111040298+neerajvijay1997@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of Implement RPC API for voucher validation in go-nitro
https://github.com/statechannels/go-nitro/actions/runs/6472385164/job/17572923861?pr=1819
ValidateVoucherResponse
to return boolean result along with a failure reason