Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@rphmeier
Copy link
Contributor

@rphmeier rphmeier commented Dec 18, 2019

Supersedes #4359

The finality-grandpa module needs two sets of functionalities from the
network:

  1. Everything gossip related, e.g. event_stream, write_notification, ...

  2. The ability to set a fork sync request for a specific block hash.

Instead of embedding (2) inside of (1) this patch extracts (2) from (1)
having finality-grandpa depend on a Network that fulfills the
network_gossip::Network trait and that can set block sync requests.

On the one hand this improves the overall structure splitting things
that don't logically belong together. On the other hand it does
reintroduce a lot of trait bounds within finality-grandpa.

The finality-grandpa module needs two sets of functionalities from the
network:

1. Everything gossip related, e.g. event_stream, write_notification, ...

2. The ability to set a fork sync request for a specific block hash.

Instead of embedding (2) inside of (1) this patch extracts (2) from (1)
having finality-grandpa depend on a `Network` that fulfills the
`network_gossip::Network` trait and that can set block sync requests.

On the one hand this improves the overall structure splitting things
that don't logically belong together. On the other hand it does
reintroduce a lot of trait bounds within finality-grandpa.
@rphmeier rphmeier added the A0-please_review Pull request needs code review. label Dec 18, 2019
Copy link
Contributor

@andresilva andresilva left a comment

Choose a reason for hiding this comment

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

On the other hand it does reintroduce a lot of trait bounds within finality-grandpa.

I don't we can work around this, the split makes sense to me. LGTM

@mxinden
Copy link
Contributor

mxinden commented Dec 19, 2019

Great, thanks for finishing this up @rphmeier.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants