Skip to content

Allow Configuration of it-length-prefixed MAX_DATA_LENGTH via PeerStreams Options #2880

@justin0mcateer

Description

@justin0mcateer

The PeerStreams class does not configure and does not allow for configuration of the it-length-prefixed 'decode' function. This causes it-length-prefixed to default to 4 MB (4 * 1024 * 1024). Sending messages over this size succeeds without issue. When the receiving side starts to decode the transmitted data, it throws if the encoded length is over 4MB.

  • Version:
    2.3.1

  • Platform:
    Linux master 6.11.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 01 Nov 2024 03:30:41 +0000 x86_64 GNU/Linux
    Brave Browser 130.1.71.123

  • Subsystem:
    pubsub

Severity:

Medium

Description:

Sending large messages using the PeerStreams class

Steps to reproduce the error:

Send any message over 4 megabytes (4 * 1024 * 1024).
Observe there is no error on the sending side
Observe the receiving side throws an error and does not receive the message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    exp/beginnerCan be confidently tackled by newcomersgood first issueGood issue for new contributorshelp wantedSeeking public contribution on this issuekind/enhancementA net-new feature or improvement to an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions