-
Notifications
You must be signed in to change notification settings - Fork 1.6k
guide: validation data refactoring #1576
Changes from 1 commit
0172f6c
e40689f
d9a3311
2caae65
f8aabf3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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>; | ||
| ``` |
This file was deleted.
This file was deleted.
| 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: | ||
rphmeier marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```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>; | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,9 +35,6 @@ fn update_configuration(f: impl FnOnce(&mut HostConfiguration)) { | |
| *pending = Some(x); | ||
| }) | ||
| } | ||
|
|
||
| /// Get the GlobalValidationData, assuming the context is the parent block. | ||
| fn global_validation_data() -> GlobalValidationData; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In the presented changes,
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| ``` | ||
|
|
||
| ## Entry-points | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.