Problem
MevShareClient.on (and any SSE consumer) uses a fixed 8192-byte transfer buffer with takeDelimiterInclusive('\n'). Real MEV-Share mainnet hints with large logs/calldata arrays exceed one buffer and kill the stream with error.StreamTooLong. Reproduced live while building the backrunner example (#38): the stream connects and parses small events, then dies on the first oversized hint.
Fix
- Grow the transfer buffer, or
- Handle oversized lines by accumulating into a dynamic buffer until the delimiter is found, or
- Make the buffer size configurable on the SSE parser / MevShareClient
Pointers
src/sse_transport.zig (the parser) and src/mev_share.zig on() (the 8192 buffer). Add a unit test feeding a >8KB single line. Also worth extending the refAllDeclsRecursive guard pattern to sse_transport so consumer-path breakage is caught in CI.
Problem
MevShareClient.on(and any SSE consumer) uses a fixed 8192-byte transfer buffer withtakeDelimiterInclusive('\n'). Real MEV-Share mainnet hints with largelogs/calldataarrays exceed one buffer and kill the stream witherror.StreamTooLong. Reproduced live while building the backrunner example (#38): the stream connects and parses small events, then dies on the first oversized hint.Fix
Pointers
src/sse_transport.zig(the parser) andsrc/mev_share.zigon()(the 8192 buffer). Add a unit test feeding a >8KB single line. Also worth extending therefAllDeclsRecursiveguard pattern to sse_transport so consumer-path breakage is caught in CI.