go-libp2p
go-libp2p copied to clipboard
Round-trip additional fields in public keys.
We need to make sure we can decode and then re-encode public keys back into the same datastructure. That means preserving unknown fields (which I believe we don't currently do).
Is this the case @marten-seemann? I saw this issue mentioned in this test: https://github.com/ipfs/boxo/blob/dc731cae2345b8f1842e2595aeff9641db5f6ac3/ipns/validate_test.go#L145-L179
But if I remove the Skip, the test works. So I don't think this is an issue anymore.
I think it still is, since we're encoding it as a Protobuf, and the parser will ignore unknown fields. So if you want to preserve unknown fields, you'd need to save the serialized version as well.
Intriguing. I guess I would need more information about the original issue in the original test to understand the problem since the test passes. Maybe the problem was related to something else that was fixed in the meanwhile.