Commit Graph

9 Commits

Author SHA1 Message Date
Csaba Kiraly cdd5d6cd34 protocol: introduce sendResponse
This completes the Request/Response semantics.
2022-02-23 22:02:59 +01:00
Csaba Kiraly 70a06b5c44 rename protocol.sendMessage to sendRequest
This is a request part of a Request/Response, generating
also a reques ID. So call it what it is.
2022-02-23 22:02:51 +01:00
Csaba Kiraly d4af5b8a44 protocol.sendMessage: allow destination as (NodeId, Address) 2022-02-23 22:02:41 +01:00
Csaba Kiraly a7d8082fc7 transport.sendMessage: avoid passing address twice
Node already has the address, so it does not make sense to
pass it as a separate parameter.
2022-02-23 22:02:31 +01:00
Csaba Kiraly 8298acd410 attempt to clean up send proc names
- interface between Transport and Protocol is at the encoded Message
level
2022-02-23 21:59:01 +01:00
Csaba Kiraly b03d5eb3c7 fixup: fix imports in test_discoveryv5_encoding
Note that the test does not compile, but it was
also not compiling before

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-02-23 11:02:06 +01:00
Csaba Kiraly fd350b4fe5 splitting protocol in lower and upper half
Protocol was actually made of two sub-protocols.
  * a lower-half handling authentication, encryption,
key exchange, and request/response. This is now called
Transport.
  * an upper-half handling DHT messages. This is still
called Protocol.

Separation of these two reduces dependencies and simplifies
modifications to the protocol.
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-02-23 11:02:06 +01:00
Csaba Kiraly a33da803a5 move message encoding to separate file
Messages and message encoding has nothing
to do with the underlying authenticated
communications framework. Separate these
two.
2022-02-23 11:02:06 +01:00
Csaba Kiraly cfa97f4995 initial commit based on nim-eth@779d767b024175a51cf74c79ec7513301ebe2f46 2022-02-14 01:51:28 +01:00