go-multiaddr
go-multiaddr copied to clipboard
Onion addresses need 12 bytes, not 10
In codec.go you append the onion address to the port, which results in 12 bytes, but according to your spec, onion addresses are only 10 bytes (80 bits)
This mismatch results in being unable to decode the onion addresses correctly, since you can't get the port number back.
Should the spec be updated to be 12 bytes, or is prepending a varint to the (addr, port) bytes better?
Is this still an issue?
cc @david415 @cpacia
it's true that we need to use 12 bytes... but i thought we fixed that a while ago. i guess we missed this bug. good catch!