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

refactor(p2p): JSON encoding to use protobuf instead #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LePremierHomme
Copy link

Closing opendexnetwork/opendex.network#34.

Changes:

  • p2p packets' checksum to utilize their protobuf encoding instead of generating a JSON string.
  • SessionInit p2p packet fields needed for signing to be encoded via the same protobuf's scheme of the entire packet, instead of JSON. Using a subset of the fields isn't a problem with protobuf - the used fields will be encoded while the remaining ones won't exist on the binary representation.

BREAKING CHANGE: JSON encoding to use protobuf instead

@LePremierHomme LePremierHomme self-assigned this Feb 22, 2021
Copy link
Contributor

@maybeast maybeast left a comment

Choose a reason for hiding this comment

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

As this is a breaking change can we bump the minCompatibleVersion in the package.json so that newer nodes will reject p2p connections with older versions.

@LePremierHomme
Copy link
Author

So should I bump package.json's version to 1.2.5 (and assign it to minCompatibleVersion as well)?

@maybeast
Copy link
Contributor

maybeast commented Mar 4, 2021

So should I bump package.json's version to 1.2.5 (and assign it to minCompatibleVersion as well)?

Good point. We'll need to bump minCompatibleVersion when we do the next release. I'll do it.

We can leave it out of this PR - sorry for the confusion. I'll do some manual testing on this branch in the coming days. Think we can get this in. Thanks.

@BitcoinOG BitcoinOG added P1 top priority and removed P1 top priority labels Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 top priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants