Skip to content

Make all object types have the same size limits #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Make all object types have the same size limits #171

wants to merge 8 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 25, 2016

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 PeterSurda self-assigned this Jan 25, 2016
@PeterSurda
Copy link
Collaborator

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

mailchuck and others added 6 commits January 25, 2016 23:52
There could be cases where newly arrives message is not added correctly.
It won't necessarily go to the top, that depends on the sort.
Thread names for IPv6 contained ":". This caused problems in log
parsers.
When advertising nodes and when establishing connections, private IP
range checks were not done. This could cause private IPs to be
advertised across the network. Also, some of the checks weren't
IPv6-aware.
Fixes Bitmessage#768
singleton.py design was broken.
Fixed Bitmessage#775
@ghost
Copy link
Author

ghost commented Feb 13, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants