Module: Ciri::DevP2P::RLPX

Included in:
Server
Defined in:
lib/ciri/devp2p/rlpx/node.rb,
lib/ciri/devp2p/rlpx/error.rb,
lib/ciri/devp2p/rlpx/message.rb,
lib/ciri/devp2p/rlpx/secrets.rb,
lib/ciri/devp2p/rlpx/frame_io.rb,
lib/ciri/devp2p/rlpx/connection.rb,
lib/ciri/devp2p/rlpx/protocol_messages.rb,
lib/ciri/devp2p/rlpx/protocol_handshake.rb,
lib/ciri/devp2p/rlpx/encryption_handshake.rb

Defined Under Namespace

Classes: AuthMsgV4, AuthRespV4, Cap, Connection, EncryptionHandshake, Error, FrameIO, Message, Node, NodeID, ProtocolHandshake, Secrets

Constant Summary collapse

MESSAGES =
{
  handshake: 0x00,
  discover: 0x01,
  ping: 0x02,
  pong: 0x03
}.freeze
BASE_PROTOCOL_VERSION =
5
BASE_PROTOCOL_LENGTH =
16
BASE_PROTOCOL_MAX_MSG_SIZE =
2 * 1024
SNAPPY_PROTOCOL_VERSION =
5
SHA_LENGTH =
32
SIGNATURE_LENGTH =
65
PUBLIC_KEY_LENGTH =
64
ECIES_OVERHEAD =
65 + 16 + 32
AUTH_MSG_LENGTH =
SIGNATURE_LENGTH + SHA_LENGTH + PUBLIC_KEY_LENGTH + SHA_LENGTH + 1
AUTH_RESP_MSG_LENGTH =
PUBLIC_KEY_LENGTH + SHA_LENGTH + 1
HANDSHAKE_TIMEOUT =
5
ENC_AUTH_MSG_LENGTH =
AUTH_MSG_LENGTH + ECIES_OVERHEAD
ENC_AUTH_RESP_MSG_LENGTH =
AUTH_RESP_MSG_LENGTH + ECIES_OVERHEAD