-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add ws support for DI server #2604
Conversation
cc @BillyWooo @felixfaisal - once merged and deployed, we need to review the |
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.
Should we adjust usage of cli ?
Looks like link_identity
fails after this change
kziemianek@kziemianek:~/projects/litentry/litentry-parachain/tee-worker/bin$ ./litentry-cli trusted -d link-identity did:litentry:substrate:0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48 did:litentry:evm:0x0D9bFD1f18f5f4FD08247DC54aD3528909c4b3E9 bsc,ethereum
[2024-03-21T11:34:53.433Z ERROR ws::handler] WS Error <Io(Custom { kind: Other, error: "unexpected EOF" })>
thread 'main' panicked at 'Unable to retrieve MRENCLAVE from endpoint: MspcReceiver(RecvError)', cli/src/trusted_command_utils.rs:88:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Thanks! |
Context
As topic. It defines a
MaybeServerTlsStream
struct to wrap up the plain and rustls stream.Whether launching a ws or wss server will depend on the value of command line arg
--trusted-external-address
or--T
. Although it's called "external", I reckon it makes little sense when launching an "external" wss server while expecting a ws connection internally in our case. If this value is not present,wss
will be used as fallback.Similarly,
--untrusted-external-address
will fallback tows
.Now CI uses
ws
by default.I can see a potential refactoring of URL management, e.g. use
Url
by default, better stucture of "internal" and "external" addresses - but it's out of scope of this PR.