Skip to content
This repository was archived by the owner on Jul 1, 2021. It is now read-only.

Allow Ping, Pong, Disconnect Messages snappy compressible #171

Merged
merged 2 commits into from
Jan 15, 2019

Conversation

Bhargavasomu
Copy link
Contributor

@Bhargavasomu Bhargavasomu commented Jan 15, 2019

What was wrong?

Previously Ping, Pong, Disconnect messages weren't snappy compressible/decompressible by Trinity. But the other clients have compressed the messages coming out of those commands (If both our client and the other one have agreed on snappy compression).

Fixes #169

How was it fixed?

The base_protocol of the peer is initially created with snappy_support set to false. But after the handshake, when both of the clients agree on using snappy compression, then the base_protocol variable of the peer is recreated by setting the snappy_support variable to True. Further details can be seen in the code.

Cute Animal Picture

put a cute animal picture link inside the parentheses

@Bhargavasomu Bhargavasomu force-pushed the snappy_compression_bug branch from 6da7085 to 73d842e Compare January 15, 2019 13:29
@Bhargavasomu
Copy link
Contributor Author

Bhargavasomu commented Jan 15, 2019

@veox could you please apply this PR locally and then run it for some time (If I am not wrong, a solid 5 minutes should do), and let me know if the same errors are occurring.

Copy link
Member

@pipermerriam pipermerriam left a comment

Choose a reason for hiding this comment

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

Structurally this looks 👍

Sounds like a 👍 from @veox or at least someone verifying that this does indeed fix the parity issue would be desired.

@veox
Copy link
Contributor

veox commented Jan 15, 2019

Yes, parity sends a Ping message ASAP - it's a way to test encryption. There's nothing wrong with this IMO...

@veox
Copy link
Contributor

veox commented Jan 15, 2019

Works as expected.

@Bhargavasomu
Copy link
Contributor Author

@pipermerriam this can be merged I guess.

@veox
Copy link
Contributor

veox commented Jan 15, 2019

@Bhargavasomu In issue description, please change

Issue #169 

to

Fixes #169 

to use a bit of automation. ^_^

@carver
Copy link
Contributor

carver commented Jan 15, 2019

LGTM, merging to prepare for release of #174

@carver carver merged commit e6f5e4c into ethereum:master Jan 15, 2019
@Bhargavasomu Bhargavasomu deleted the snappy_compression_bug branch January 23, 2019 14:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants