-
Notifications
You must be signed in to change notification settings - Fork 205
Add remote signer endpoint for GetOrchestratorInfo #3791
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3791 +/- ##
===================================================
- Coverage 31.52544% 31.46184% -0.06360%
===================================================
Files 159 160 +1
Lines 47901 48001 +100
===================================================
+ Hits 15101 15102 +1
- Misses 31911 32009 +98
- Partials 889 890 +1
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
ad-astra-video
left a 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.
Some initial thoughts as I went through this PR:
-
We should add an Authorization secret to protect the remote signer endpoints. WDYT?
-
I think we should add a standard port at top of starter.go similar to other modes for go-livepeer
-
I think the signed Gateway address to send in GetOrchestrator request should be a GET request since no payload is required. We probably should cache this on the Gateway as well since it doesn't change and would lower the requests to the signer service.
- Seems like this request should be sent at Gateway startup and the Gateway should fail to startup if the request fails.
-
Need a POST request endpoint on remote signer expecting json payload of
{ nonces: [list of nonces to use], ticket_params: [orch-ticket-params]that returns list of "tickets" which is just a list ofTicketSenderParamsthat is nonce and signature for all requested nonces. -
Where should the
SenderandSender Monitorlive? I think the Gateway (or local SDK) should still be responsible for this since it is directly communicating with the Orchestrator. Keeping the remote signer lightweight will assist in payment services being built since it does one thing which is use a ethereum address to sign a specific payload. -
When we settle on the implementation we should add a
doc/remote_signer.mdfor basic instructions to run Remote Signer.
Auth will absolutely be needed for clearinghouses. A header in conjunction with webhooks is probably the way to go. But I would defer implementing auth for now until the clearinghouse requirements are clearer. Our other endpoints are unauthenticated and generally sit behind a layer of proxies, so they should never be exposed to the world. This specific mode is also opt-in via the
Not sure if that is necessary since you can still set the port that the remote signer uses with the -httpAddr flag, the same way we set the port for the other modes. Is there an issue with the current default port?
We’ll probably need payloads soon enough, since GetOrchestrator requests are parameterized (capabilities, etc). I just haven’t thought through that mapping yet, and will probably punt on that until after this PR.
Yes, that would be for ticket signing which isn't part of this PR.
My thinking is actually the opposite. There will probably be only one remote signer implementation - this one - but many SDK implementations. Livepeer payments are extremely complicated, and we don't want to require a Javascript or Python developer to wade through that. So we should handle as much in the remote signer as possible, and keep SDKs straightforward. |
TODO explain