Open tony-iqlusion opened 3 months ago
Note: I'd like to move TMKMS to an async architecture, which would make it better at concurrency (e.g. supporting multiple YubiHSMs, and pipelining extension signing requests to multiple YubiHSMs) but that's difficult to do when the entire request layer is synchronous.
I thought I'd do this in an additive manner for now, rather than attempting to make any breaking changes to tendermint-p2p
.
This implementation is currently untested. I'd like to get some tests in to show it can at least interop against the synchronous SecretConnection
server.
Adds an
async
version ofSecretConnection
, currently specialized to TCP-based connections exclusively.This requires quite a bit of duplication, especially since the existing
SecretConnection
implementation is entirely built aroundstd::io
traits, which are unusable in an async context.The implementation returns whole chunks as a
Vec<u8>
, which avoids the need to "double buffer" incoming data as ownership of such data is passed directly to the caller upon completing a read..changelog/