This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand PoV Distribution section and improve candidate types #1294
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,10 +4,118 @@ This subsystem is responsible for distributing PoV blocks. For now, unified with | |||||
|
|
||||||
| ## Protocol | ||||||
|
|
||||||
| Handle requests for PoV block by candidate hash and relay-parent. | ||||||
| `ProtocolId`: `b"povd"` | ||||||
|
|
||||||
| Input: [`PoVDistributionMessage`](../../types/overseer-protocol.md#pov-distribution-message) | ||||||
|
|
||||||
|
|
||||||
| Output: | ||||||
|
|
||||||
| - NetworkBridge::RegisterEventProducer(`ProtocolId`) | ||||||
| - NetworkBridge::SendMessage(`[PeerId]`, `ProtocolId`, `Bytes`) | ||||||
| - NetworkBridge::ReportPeer(PeerId, cost_or_benefit) | ||||||
|
|
||||||
|
|
||||||
| ## Functionality | ||||||
|
|
||||||
| Implemented as a gossip system, where `PoV`s are not accepted unless we know a `Seconded` message. | ||||||
| This network protocol is responsible for distributing [`PoV`s](../../types/availability.md#proof-of-validity) by gossip. Since PoVs are heavy in practice, gossip is far from the most efficient way to distribute them. In the future, this should be replaced by a better network protocol that finds validators who have validated the block and connects to them directly. | ||||||
rphmeier marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| This protocol is described in terms of "us" and our peers, with the understanding that this is the procedure that any honest node will run. It has the following goals: | ||||||
| - We never have to buffer an unbounded amount of data | ||||||
| - PoVs will flow transitively across a network of honest nodes, stemming from the validators that originate them. | ||||||
|
||||||
| - PoVs will flow transitively across a network of honest nodes, stemming from the validators that originate them. | |
| - PoVs will flow transitively across a network of honest nodes, stemming from the collators that originate them. |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, I do mean validators, but the phrasing could be more clear. It's about seconding leading to dataflow, not collation.
rphmeier marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
rphmeier marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure, are we attaching a version to these protocol ids somewhere? I.e. something along the lines of
b"povd/1"?That would help tremendously evolving the protocol later in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are attached to the network bridge. I figure these can handle versioning internally since the network bridge protocol is so generic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. The network bridge would treats the protocol ids as opaque strings. Thereby later a subsystem could even just listen for both
povdandpovd/2during the transition period, correct?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's right