-
Notifications
You must be signed in to change notification settings - Fork 573
Open
Description
Hi.
I'd like to introduce several new node types compatible with the Bitmessage protocol: NODE_MOBILE
and NODE_GATEWAY
. They are almost identical to the nodes described here: https://bitmessage.org/wiki/Mobile_Protocol_specification
But several PyBitmessage
quirks stop me:
PyBitmessage
doesn't checkservices
bitfield at all. This means that if I advertise node which uses non-TCP transport withservices = 4
(BE value),PyBitmessage
will constantly try to connect to it despite the fact the node hasn'tNODE_NETWORK
bit.I can't advertiseOops, I missed the factNODE_NETWORK
andNODE_GATEWAY
node as two differentaddr
entries with the same IP becauseknownNodes
structure is a host-ip/host-details map.knownNodes
is a host+port/host-details map now.- Even if I advertise
NODE_GATEWAY
as a separateaddr
entry, PyBitmessage won't be able to connect to it anyway soNODE_GATEWAY
addresses will propogate badly through the network because of the node alive checkings: https://github.com/Bitmessage/PyBitmessage/blob/master/src/class_receiveDataThread.py#L666 PyBitmessage
currently doesn't take into accountservices
field when it packs theaddr
message: https://github.com/Bitmessage/PyBitmessage/blob/master/src/class_receiveDataThread.py#L672, https://github.com/Bitmessage/PyBitmessage/blob/master/src/class_receiveDataThread.py#L275
So far I know one rather awkward solution: advertise NODE_NETWORK
and NODE_GATEWAY
fields (i.e. services = 5
) as single addr
entry and use hardcoded port for non-TCP transports (e.g. 18444) but this is rather tricky.
Metadata
Metadata
Assignees
Labels
enhancementNew featureNew feature