This repository has been 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
guide: validation data refactoring #1576
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0172f6c
guide: validation data refactoring
rphmeier e40689f
address grumbles from review
rphmeier d9a3311
Update roadmap/implementers-guide/src/types/candidate.md
pepyakin 2caae65
last comments from review
rphmeier f8aabf3
Merge branch 'rh-validation-data-refactor' of github.com:paritytech/p…
rphmeier 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 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 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 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 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 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
7 changes: 7 additions & 0 deletions
7
roadmap/implementers-guide/src/runtime-api/full-validation-data.md
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Full Validation Data | ||
|
||
Yields the full [`ValidationData`](../types/candidate.md#validationdata) at the state of a given block. | ||
|
||
```rust | ||
fn full_validation_data(at: Block, ParaId, OccupiedCoreAssumption) -> Option<ValidationData>; | ||
``` |
7 changes: 0 additions & 7 deletions
7
roadmap/implementers-guide/src/runtime-api/global-validation-data.md
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
roadmap/implementers-guide/src/runtime-api/local-validation-data.md
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
roadmap/implementers-guide/src/runtime-api/persisted-validation-data.md
This file contains 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Persisted Validation Data | ||
|
||
Yields the [`PersistedValidationData`](../types/candidate.md#persistedvalidationdata) for the given [`ParaId`](../types/candidate.md#paraid) along with an assumption that should be used if the para currently occupies a core: | ||
|
||
```rust | ||
/// Returns the persisted validation data for the given para and occupied core assumption. | ||
/// | ||
/// Returns `None` if either the para is not registered or the assumption is `Freed` | ||
/// and the para already occupies a core. | ||
fn persisted_validation_data(at: Block, ParaId, OccupiedCoreAssumption) -> Option<PersistedValidationData>; | ||
``` |
This file contains 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 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 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 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.
local_validation_data
was queried fromparas.md
.global_validation_data
was declared here, inconfiguration.md
.In the presented changes,
persisted_validation_data
is queried fromparas.md
but where do I queryfull_validation_data
to implement the runtime API call with the same name?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.
The runtime API will need to draw this information out from many different modules. It wasn't obvious where its home should be.
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 I actually was triggered by that: it wasn't for me where would be the home and then I thought that the chances are it might be not obvious for the implementer either.
but that's fine, we can figure out this later