mailchuck / PyBitmessage

This repository has been discontinued, please use the official PyBitmessage repository
https://github.com/Bitmessage/PyBitmessage
MIT License
28 stars 4 forks source link

Make all object types have the same size limits #171

Open ghost opened 8 years ago

ghost commented 8 years ago

The size limits of objects currently vary depending on their type. This makes it harder to create new versions of old object types as for instance a pubkey longer than 440 bytes will not be relayed. So I think the only limit should be the limit of 2**18 bytes.

PeterSurda commented 8 years ago

I can review the code but I need to discuss with other people if the limit removal is a good idea.

ghost commented 8 years ago

This should not be changed unless ACKs are simultaneously limited to only be of object type msg. But it might make sense to document the current behavior.

For reference these are the current limits as implemented by PyBitmessage:

getpubkey (0): 42 <= size <= 200
pubkey (1): 146 <= size <= 440
msg (2): size <= 2**18
broadcast (3): 180 <= size <= 2**18 and version >= 2
anything else: size <= 2**18