openmina / openmina

Mina Rust Node
Apache License 2.0
61 stars 9 forks source link

[libp2p] Substraction with overflow is triggered in yamux reducer #379

Open akoptelov opened 1 month ago

akoptelov commented 1 month ago

When sending big messages via RPC, the following error is triggered in debug configuration:

thread 'block' panicked at p2p/src/network/yamux/p2p_network_yamux_reducer.rs:161:25:
attempt to subtract with overflow

See the code, and also the comment: https://github.com/openmina/openmina/blob/3ea843d65d1c6cd42991af464231e9129e12a909/p2p/src/network/yamux/p2p_network_yamux_reducer.rs#L158-L161

akoptelov commented 1 month ago

Can be reproduced using this branch: https://github.com/openmina/openmina/tree/task/test-p2p-rpc

cargo test --test rpc -- --ignored --exact block

To see debug tracing level, use OPENMINA_TRACING_LEVEL=debug.