This is a potential source of bugs due to val != "" checks returning invalid result.
To reproduce, run node for a while, then inspect the output of ipfs swarm limit all.
At some point, you will see protocol and service named "" (empty string).
I think I've seen error about empty PeerID suring --reset at some point too, but was not able to reproduce.
Could be a bug, or could be a malicious service that uses zero-length protocol to stay hidden.
Either way, we should not use "" and have "(empty)" or something, because "" leads to bugs.
"Protocols": {
"": {
"Conns": 1000000000,
"ConnsInbound": 1000000000,
"ConnsOutbound": 1000000000,
"FD": 1000000000,
"Memory": 1000000000,
"Streams": 1000000000,
"StreamsInbound": 1000000000,
"StreamsOutbound": 1000000000
},
"/ipfs/bitswap/1.2.0": {
"Conns": 1000000000,
"ConnsInbound": 1000000000,
"ConnsOutbound": 1000000000,
"FD": 1000000000,
"Memory": 1000000000,
"Streams": 1000000000,
"StreamsInbound": 1000000000,
"StreamsOutbound": 1000000000
},
...
"Services": {
"": {
"Conns": 1000000000,
"ConnsInbound": 1000000000,
"ConnsOutbound": 1000000000,
"FD": 1000000000,
"Memory": 1000000000,
"Streams": 1000000000,
"StreamsInbound": 1000000000,
"StreamsOutbound": 1000000000
},
"libp2p.autonat": {
"Conns": 0,
"ConnsInbound": 0,
"ConnsOutbound": 0,
"FD": 0,
"Memory": 20404224,
"Streams": 94,
"StreamsInbound": 94,
"StreamsOutbound": 94
},
...
cc #9417 (but not a hard blocker, we can fix this in 0.19)
This is a potential source of bugs due to
val != ""checks returning invalid result.To reproduce, run node for a while, then inspect the output of
ipfs swarm limit all.At some point, you will see protocol and service named
""(empty string).I think I've seen error about empty PeerID suring
--resetat some point too, but was not able to reproduce.Could be a bug, or could be a malicious service that uses zero-length protocol to stay hidden.
Either way, we should not use "" and have "(empty)" or something, because "" leads to bugs.
cc #9417 (but not a hard blocker, we can fix this in 0.19)