Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round-trip additional fields in public keys. #757

Open
Stebalien opened this issue Nov 14, 2018 · 3 comments
Open

Round-trip additional fields in public keys. #757

Stebalien opened this issue Nov 14, 2018 · 3 comments

Comments

@Stebalien
Copy link
Member

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).

@Stebalien Stebalien transferred this issue from libp2p/go-libp2p-crypto Dec 6, 2019
@hacdias
Copy link
Member

hacdias commented May 10, 2023

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.

@marten-seemann
Copy link
Contributor

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.

@hacdias
Copy link
Member

hacdias commented May 10, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants