rust-libp2p icon indicating copy to clipboard operation
rust-libp2p copied to clipboard

Remove usage of the `ls` command in multistream-select

Open dignifiedquire opened this issue 3 years ago • 2 comments

Summary

Currently, if there are more than 3 protocols listed, multistream-select uses a parallel approach which relies on the ls command. This command has been removed from go-multistream and so all dials to kubo or other nodes using newer go-libp2p will fail in this case.

References

  • https://github.com/ipfs/kubo/issues/8640#-ls--requests-for---multistream-100--are-removed
  • https://github.com/libp2p/rust-libp2p/blob/master/misc/multistream-select/src/dialer_select.rs#L319
  • https://github.com/multiformats/go-multistream/pull/76

Possible Solution

Make it either configurable or remove the usage of the ls command. I have a patch that just removes the parallel version, which is the simplest version. I am not sure how it could be avoided to not use ls.

Would you like to work on fixing this bug?

Yes

dignifiedquire avatar Sep 21 '22 14:09 dignifiedquire

I have a patch that just removes the parallel version, which is the simplest version. I am not sure how it could be avoided to not use ls.

So far no one raised objections. In case no-one does on https://github.com/multiformats/multistream-select/pull/22, I am in favor of your change and would appreciate a pull request.

mxinden avatar Sep 22 '22 15:09 mxinden

@mxinden created https://github.com/libp2p/rust-libp2p/pull/2934

dignifiedquire avatar Sep 23 '22 06:09 dignifiedquire