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

feat: Add compact protobuf format #76

Merged
merged 4 commits into from
Jul 12, 2019
Merged

Conversation

mkg20001
Copy link
Member

This adds a significantly smaller (about 30%) protobuf format
It's smaller because .toJSON() encodes the binary keys as base64 which makes it bigger and is sometimes not needed - like when transferring the id over the network
Additionally an excludePriv option is added because the removal of the private key is not as easy as in json

@ghost ghost assigned mkg20001 Feb 16, 2018
@ghost ghost added the status/in-progress In progress label Feb 16, 2018
@mkg20001 mkg20001 requested a review from daviddias April 3, 2018 09:46
@daviddias
Copy link
Member

Why not use CBOR?

@mkg20001
Copy link
Member Author

mkg20001 commented Apr 3, 2018

Hmmm... which one is smaller?

Copy link
Contributor

@pgte pgte left a comment

Choose a reason for hiding this comment

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

Could you please add a test to cover this?

src/index.js Outdated Show resolved Hide resolved
@mkg20001
Copy link
Member Author

@pgte Requested changes applied. Could you please re-review?

pgte
pgte previously requested changes Jun 21, 2018
Copy link
Contributor

@pgte pgte left a comment

Choose a reason for hiding this comment

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

Could you also add some documentation?

src/index.js Outdated Show resolved Hide resolved
@pgte
Copy link
Contributor

pgte commented Jun 21, 2018

Also, Travis CI is complaining..

@mkg20001
Copy link
Member Author

@pgte Applied requested changes, additionally fixed some other things

@pgte
Copy link
Contributor

pgte commented Jun 22, 2018

@mkg20001 great, thank you!
CI is complaining, could you check that?

@mkg20001
Copy link
Member Author

@pgte Yes, although it's unclear to me what exactly is wrong with the commit message. It only shows it's not in the required format, not where exactly the error is

@pgte
Copy link
Contributor

pgte commented Jun 22, 2018

@victorbjelkholm could you help clarifying this question about the commit message?

@mkg20001
Copy link
Member Author

Updated this PR to async/await

Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

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

suggestions to fix linting

src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
Co-Authored-By: Jacob Heun <jacobheun@gmail.com>
@mkg20001
Copy link
Member Author

@jacobheun Thx, changes commited

@jacobheun jacobheun dismissed pgte’s stale review July 12, 2019 17:34

Review resolved and is stale.

Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

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

Looks good! ⛵️

@jacobheun jacobheun merged commit 7686418 into libp2p:master Jul 12, 2019
@jacobheun
Copy link
Contributor

released in 0.13.2

@mkg20001
Copy link
Member Author

Nice 🎉

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

Successfully merging this pull request may close these issues.

4 participants