Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Amaury Chamayou ed28cbf632
Update Doxygen config (#4631) 2022-11-24 12:55:43 +00:00
Renato Golin 92fb195692
UDP enclave echo server (#3787)
* UDP enclave echo server

This is an end-to-end UDP echo server, which receives UDP packets from
multiple clients at the same time, passes them to the enclave with a
message type that is handled by a QUICEchoEndpoint (which just echoes
back the messages to the client) and send the message back through the
ring buffer to the host, which then send to the correct client.

The UDP packets, alongside their socket addresses, are passed to the
enclave as quic_inbound rung buffer messages and received back as
quic_outbound messages. For now, those are encoded as {long,long} to
avoid size issues in the serialization, but eventually, they'll be
broken down to their components {short,char[14]}.

UDP interfaces are created like their TCP counterparts, via a new
field in RPCInterface called 'protocol', with default to "tcp". If
the field is set to "udp", the host will listen on the UDP version
of RPCConnection and use the 'quic_*' messages, which connects to the
new QUICEchoEndpoint.

Also:
 * Renaming "service" to "port"
 * Refactoring TCPBehaviour into SocketBehaviour<ConnType>
 * Factor next_id out to share amongst all RPC connections
 * Use local ConnID in rpc_connections, same as tcp/udp
 * Factor some common logic into socket.h
 * Factor pending writes/reads into ds/pending_io.h

Issues:
 * There is an implicit 'quic_start' message but not a 'quic_close' one,
   which can be a problem for many connections, over time. It's not
   clear to me yet that this will create leaks / mismatches, but we have
   to make sure it doesn't on the next step.
 * The current RPCConnections is parametrized by TCPImpl/UDPImpl, which
   is handy for now but creates the implicit structural dependency
   between the two parameters. We need a common interface to derive
   from, so that the two structures can actually be checked at compile
   time.
 * To implement the step above, we need to fix 'proxy_ptr' and
   'close_ptr' to allow pointer checks (virtual inheritance). I tried
   implementing that first but it creates ripples throughout the code.
   We may never fix this, but then things like the auto-increment will
   have to continue being external, amongst other things.

Next Steps:

 1. To implement all services through unencrypted UDP, just like TCP, so
    we can test the longecity and stability of the UDP channel. We can
    ignore all TLS errors, and just make sure requests and responses are
    passed to the right services and back to the right clients. This
    will also need a UDP client, so that nodes can RPC each other in
    UDP.

 2. To implement QUICEndpoint using ngtcp2 and HTTP3Endpoint using nghttp3
    and test using proper TLS certificates and make sure the services are
    still available in the same way.

* Unnecessary uv dependency in quic_endpoint

* Increasing number of doxygen graph nodes

* Simplify UDP echo test

* Remove unnecessary FIXME workaround

* if constexpr isTCP/isUDP

* Fix sockaddr encoding to {short,char[14]}

* Testing multiple UDP messages
2022-05-10 16:48:33 +00:00
Eddy Ashton 6744feb727
Explicitly copy doxygen HTML output (#3564) 2022-02-17 17:16:54 +00:00
Eddy Ashton da9e4a7ed7
Include Doxygen html pages in docs (#3513) 2022-02-10 14:20:26 +00:00
Amaury Chamayou f3e2b06cdb
Make perf_client clients/perf (#3511) 2022-02-04 13:58:13 +00:00
Julien Maffre c1f55e6f19
Update Doxyfile to 1.9.3 (#3391) 2022-01-12 12:49:31 +00:00
Julien Maffre 2eb2ca375d
Fix Doyxgen warnings (#3374) 2022-01-10 17:06:10 +00:00
Amaury Chamayou cab373380c
Move documentation building to faster VMs (#3022) 2021-09-23 17:32:24 +01:00
Amaury Chamayou 0ef2694247
Remove VM creation scripts (#2889) 2021-08-11 15:07:35 +01:00
Eddy Ashton 4fd9f5f309
Historic queries: Range queries and app-dictated handles (#2233) 2021-03-01 16:19:14 +00:00
Amaury Chamayou 78e5d4925c
Fix some warnings and errors (#1317) 2020-06-18 16:20:20 +01:00
Amaury Chamayou b05da63d5c Initial file import 2019-04-26 16:27:27 +01:00