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

Switch to google protobuf generator #105

Merged
merged 3 commits into from
Oct 16, 2020

Conversation

hannahhoward
Copy link
Collaborator

Goals

Address LeastAuthority/go-graphsync#2

Implementation

After tracking down the error, it appears the bug is in the generated Unmarshal code from gogoprotobuf. I tracked this down to the source code generator and found that the code actually patched the error in places but not in others. And, it appears gogo-protobuf is in a state of less than frequent maintainence, with an open request to assist with getting the code compatable with googles latest libraries. With this in mind, I decided to switch the library to google's own protobuf generator, which is still seeing frequent updates and presumably has more contributions and monitoring around security. I've gone ahead and regenerated based off of this. It requires a few code changes plus a switch to libp2p's msgio library.

But I've verified the previously panic'ing input no longer panic's. So that is good.

after tracking down an error in Unmarshal code generate by gogoprotobuf, and verifying this is a
bug in the library, which appears unmaintained, try switching to google's own golang protobuf tools
Copy link

@schomatis schomatis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the right move. Someone else with actual knowledge of graphsync should look at this.

resolve bad message strings
@rvagg
Copy link
Member

rvagg commented Oct 15, 2020

import "github.com/gogo/protobuf/gogoproto/gogo.proto";
still pulls in gogo, I think maybe this line can just be deleted and then maybe all of gogo can go away?

Initialize extensions to map if nil
@hannahhoward hannahhoward merged commit 536970d into master Oct 16, 2020
@aschmahmann aschmahmann mentioned this pull request Feb 18, 2021
73 tasks
@mvdan mvdan deleted the feat/switch-to-google-protobuf branch December 15, 2021 14:16
marten-seemann pushed a commit that referenced this pull request Mar 2, 2023
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

Successfully merging this pull request may close these issues.

3 participants