-
Notifications
You must be signed in to change notification settings - Fork 78
[ETCM-215] faucet rpc client #798
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
Conversation
src/main/scala/io/iohk/ethereum/jsonrpc/security/SSLContextFactory.scala
Outdated
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/jsonrpc/security/SecureRandomBuilder.scala
Outdated
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/jsonrpc/security/SSLConfig.scala
Outdated
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/jsonrpc/security/KeyStoreUtils.scala
Outdated
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/faucet/jsonrpc/FaucetHandlerSelector.scala
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/jsonrpc/client/RpcBaseClient.scala
Outdated
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/jsonrpc/client/RpcBaseClient.scala
Outdated
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/jsonrpc/server/http/JsonRpcHttpServer.scala
Show resolved
Hide resolved
src/test/scala/io/iohk/ethereum/security/SSLContextFactorySpec.scala
Outdated
Show resolved
Hide resolved
| maybeSslContext.fold(Http().defaultClientHttpsContext)(ConnectionContext.httpsClient) | ||
|
|
||
| def shutdown(): Unit = { | ||
| Await.ready(system.terminate(), 5.seconds) |
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.
It will be better if e use timeout from config (ex. mantis.shutdown-timeout)
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.
BTW I can't find where it is used and I am not sure that this code should be able to terminate system passed to the class from outside.
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.
I am not sure if we need this function called “shutdown()”. What do you think? Do we need it?
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.
I think we don't need it. It should be done at some higher level class
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 function called “shutdown” was used only in the “mallet” module. But mallet now uses the class “RpcClientMallet”. This client needs the “shutdown” function.
But we have pending removal of this module in task “ETCM-423”. So I removed this function that is not used.
src/main/scala/io/iohk/ethereum/jsonrpc/server/http/JsonRpcHttpsServer.scala
Outdated
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/faucet/jsonrpc/FaucetSSLContextRpcClientBuilder.scala
Outdated
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/faucet/jsonrpc/WalletRpcClient.scala
Outdated
Show resolved
Hide resolved
src/main/scala/io/iohk/ethereum/faucet/jsonrpc/WalletService.scala
Outdated
Show resolved
Hide resolved
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.
only minors, excelent job! 🚀
Description
The faucet uses RpcClient to connect with the node. We had a RpcClient in the module “mallet”. This client is not async, it makes a “await” (blockin the threads) for all requests. Also it has not implemented the ssl behavior when connected with node secure (https).
Proposed Solution
Important Changes Introduced
Change the name of ssl properties. And add new ssl context used for rpc client from “faucet”.
Testing
ssl regression in faucet and node