Skip to content

fix(pnet): Handle messages larger than the xsalsa wasm memory limit. - #3585

Open
saul-jb wants to merge 2 commits into
libp2p:mainfrom
saul-jb:fix/pnet-wasm-memory
Open

fix(pnet): Handle messages larger than the xsalsa wasm memory limit.#3585
saul-jb wants to merge 2 commits into
libp2p:mainfrom
saul-jb:fix/pnet-wasm-memory

Conversation

@saul-jb

@saul-jb saul-jb commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Sending large messages through connections protected by pnet throws:

WebAssembly.Memory.grow(): Maximum memory size exceeded

This PR windows the xsalsa xor so it never grows and exceeds its memory limits. There is also a test added that demonstrates this fix.

@saul-jb
saul-jb requested a review from a team as a code owner July 26, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant