mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 08:35:40 +00:00
Introduce new Runtime API endpoint for fetching the validation data (#3728)
* Introduce new Runtime API endpoint `persisted_validation_data_with_code_hash` that will be used by the candidate validation subsystem in order to decrease amount of runtime API requests. * Node-side part of new runtime API request * Define code hash getter via macro * Rename new endpoint to `assumed_validation_data` * Docs for runtime API impl of new endpoint * AssumedValidationData specialized request function * fmt
This commit is contained in:
@@ -997,6 +997,14 @@ sp_api::decl_runtime_apis! {
|
||||
fn persisted_validation_data(para_id: Id, assumption: OccupiedCoreAssumption)
|
||||
-> Option<PersistedValidationData<H, N>>;
|
||||
|
||||
/// Returns the persisted validation data for the given `ParaId` along with the corresponding
|
||||
/// validation code hash. Instead of accepting assumption about the para, matches the validation
|
||||
/// data hash against an expected one and yields `None` if they're not equal.
|
||||
fn assumed_validation_data(
|
||||
para_id: Id,
|
||||
expected_persisted_validation_data_hash: Hash,
|
||||
) -> Option<(PersistedValidationData<H, N>, ValidationCodeHash)>;
|
||||
|
||||
/// Checks if the given validation outputs pass the acceptance criteria.
|
||||
fn check_validation_outputs(para_id: Id, outputs: CandidateCommitments) -> bool;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user