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

[2.x.x] deserialization now protocol version aware #2824

Merged

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented May 14, 2019

This PR threads the protocol_version through from each active peer connection to the deserialization step when reading messages off the connection.

This allows us to deserialize messages based on different versions for each peer (based on the protocol version supported by the peer).

kernel.read() demonstrates how we would access the protocol_version to modify the deserialization logic.

  • ser::deserialize() is now "protocol version" aware
  • move ProtocolVersion from p2p crate to core crate (ser.rs)

@antiochp antiochp changed the title protocol version aware deserialization deserialization now protocol version aware May 14, 2019
@antiochp antiochp force-pushed the readable_protocol_version_aware branch from 58f939e to e3b7365 Compare May 14, 2019 14:53
@antiochp antiochp marked this pull request as ready for review May 15, 2019 16:47
@antiochp antiochp changed the title deserialization now protocol version aware [WIP] deserialization now protocol version aware May 16, 2019
@antiochp antiochp requested a review from ignopeverell May 16, 2019 13:42
@antiochp antiochp changed the title [WIP] deserialization now protocol version aware deserialization now protocol version aware May 16, 2019
@antiochp antiochp requested a review from hashmap May 17, 2019 14:46
@ignopeverell ignopeverell added this to the 1.1.1 milestone May 20, 2019
Copy link
Contributor

@ignopeverell ignopeverell left a comment

Choose a reason for hiding this comment

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

Good idea, looks good to me. Scheduled to merge right after 1.1.0 is cut.

@antiochp antiochp changed the base branch from master to milestone/2.x.x June 27, 2019 10:21
@antiochp antiochp force-pushed the readable_protocol_version_aware branch from 5ce6046 to 825a56f Compare June 27, 2019 15:00
@antiochp antiochp changed the title deserialization now protocol version aware [2.x.x] deserialization now protocol version aware Jun 27, 2019
@antiochp antiochp merged commit 5aaf2d0 into mimblewimble:milestone/2.x.x Jun 27, 2019
@antiochp antiochp deleted the readable_protocol_version_aware branch June 27, 2019 16:19
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.

2 participants