Commit Graph

7 Commits

Author SHA1 Message Date
Alexander Simmerl 9b9022f8df privVal: Improve SocketClient network code (#1315)
Follow-up to feedback from #1286, this change simplifies the connection
handling in the SocketClient and makes the communication via TCP more
robust. It introduces the tcpTimeoutListener to encapsulate accept and
i/o timeout handling as well as connection keep-alive, this type could
likely be upgraded to handle more fine-grained tuning of the tcp stack
(linger, nodelay, etc.) according to the properties we desire. The same
methods should be applied to the RemoteSigner which will be overhauled
when the priv_val_server is fleshed out.

* require private key
* simplify connect logic
* break out conn upgrades to tcpTimeoutListener
* extend test coverage and simplify component setup
2018-03-16 16:32:17 +04:00
Alexander Simmerl 589781721a
Invert privVal socket communication
Follow-up to #1255 aligning with the expectation that the external
signing process connects to the node. The SocketClient will block on
start until one connection has been established, support for multiple
signers connected simultaneously is a planned future extension.

* SocketClient accepts connection
* PrivValSocketServer renamed to RemoteSigner
* extend tests
2018-03-07 12:37:05 +01:00
Alexander Simmerl a14aab67de Integrate PrivValidator socket server 2018-02-19 19:20:01 +01:00
Alexander Simmerl a1020307a0 Clean up flags 2018-02-14 02:41:16 +01:00
Alexander Simmerl 7d71e702d8 Integrate privVal client with node secret 2018-02-09 16:54:43 -05:00
Alexander Simmerl fec541373d Correct server protocol 2018-02-09 16:53:17 -05:00
Ethan Buchman 23eb84db35 wip: priv val via sockets 2018-02-09 16:52:58 -05:00