Add ParachainHost version 3 runtime calls (#5270)
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
# CHANGELOG
|
||||
|
||||
## master
|
||||
|
||||
Changes:
|
||||
|
||||
- Add `ParachainHost` version 3 runtime calls
|
||||
|
||||
|
||||
## 9.5.1 Oct 8, 2022
|
||||
|
||||
- **Important** While the API witll detect and decorate the weight type based on V1 or V2, the default `Weight` type (used in runtime calls and RPCs) has not been swapped from the old `u64` variant. This means that on new chains using `WeightV2`, the TS decorated type will still reflect the old version.
|
||||
|
||||
@@ -134,54 +134,66 @@ const PH_V1_TO_V2: DefinitionsCallEntry['methods'] = {
|
||||
}
|
||||
};
|
||||
|
||||
const PH_V2_TO_V3: DefinitionsCallEntry['methods'] = {
|
||||
pvfs_require_precheck: {
|
||||
description: 'Returns code hashes of PVFs that require pre-checking by validators in the active set.',
|
||||
params: [],
|
||||
type: 'Vec<ValidationCodeHash>'
|
||||
},
|
||||
session_info: {
|
||||
description: 'Get the session info for the given session, if stored.',
|
||||
params: [
|
||||
{
|
||||
name: 'index',
|
||||
type: 'SessionIndex'
|
||||
}
|
||||
],
|
||||
type: 'Option<SessionInfo>'
|
||||
},
|
||||
submit_pvf_check_statement: {
|
||||
description: 'Submits a PVF pre-checking statement into the transaction pool.',
|
||||
params: [
|
||||
{
|
||||
name: 'stmt',
|
||||
type: 'PvfCheckStatement'
|
||||
},
|
||||
{
|
||||
name: 'signature',
|
||||
type: 'ValidatorSignature'
|
||||
}
|
||||
],
|
||||
type: 'Null'
|
||||
},
|
||||
validation_code_hash: {
|
||||
description: 'Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.',
|
||||
params: [
|
||||
{
|
||||
name: 'paraId',
|
||||
type: 'ParaId'
|
||||
},
|
||||
{
|
||||
name: 'assumption',
|
||||
type: 'OccupiedCoreAssumption'
|
||||
}
|
||||
],
|
||||
type: 'Option<ValidationCodeHash>'
|
||||
}
|
||||
};
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
ParachainHost: [
|
||||
{
|
||||
methods: objectSpread({
|
||||
pvfs_require_precheck: {
|
||||
description: 'Returns code hashes of PVFs that require pre-checking by validators in the active set.',
|
||||
disputes: {
|
||||
description: 'Returns all onchain disputes.',
|
||||
params: [],
|
||||
type: 'Vec<ValidationCodeHash>'
|
||||
},
|
||||
session_info: {
|
||||
description: 'Get the session info for the given session, if stored.',
|
||||
params: [
|
||||
{
|
||||
name: 'index',
|
||||
type: 'SessionIndex'
|
||||
}
|
||||
],
|
||||
type: 'Option<SessionInfo>'
|
||||
},
|
||||
submit_pvf_check_statement: {
|
||||
description: 'Submits a PVF pre-checking statement into the transaction pool.',
|
||||
params: [
|
||||
{
|
||||
name: 'stmt',
|
||||
type: 'PvfCheckStatement'
|
||||
},
|
||||
{
|
||||
name: 'signature',
|
||||
type: 'ValidatorSignature'
|
||||
}
|
||||
],
|
||||
type: 'Null'
|
||||
},
|
||||
validation_code_hash: {
|
||||
description: 'Fetch the hash of the validation code used by a para, making the given `OccupiedCoreAssumption`.',
|
||||
params: [
|
||||
{
|
||||
name: 'paraId',
|
||||
type: 'ParaId'
|
||||
},
|
||||
{
|
||||
name: 'assumption',
|
||||
type: 'OccupiedCoreAssumption'
|
||||
}
|
||||
],
|
||||
type: 'Option<ValidationCodeHash>'
|
||||
type: 'Vec<(SessionIndex, CandidateHash, DisputeState)>'
|
||||
}
|
||||
}, PH_V1_TO_V2),
|
||||
}, PH_V1_TO_V2, PH_V2_TO_V3),
|
||||
version: 3
|
||||
},
|
||||
{
|
||||
methods: objectSpread({}, PH_V1_TO_V2, PH_V2_TO_V3),
|
||||
version: 2
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user