CoretimeAssignmentProvider¶
Storage functions¶
CoreDescriptors¶
Assignments which are currently active.
They will be picked from PendingAssignments
once we reach the scheduled block number in
PendingAssignments
.
Python¶
result = substrate.query(
'CoretimeAssignmentProvider', 'CoreDescriptors', ['u32']
)
Return value¶
{
'current_work': (
None,
{
'assignments': [('scale_info::374', 'scale_info::853')],
'end_hint': (None, 'u32'),
'pos': 'u16',
'step': 'u16',
},
),
'queue': (None, {'first': 'u32', 'last': 'u32'}),
}
CoreSchedules¶
Scheduled assignment sets.
Assignments as of the given block number. They will go into state once the block number is reached (and replace whatever was in there before).
Python¶
result = substrate.query(
'CoretimeAssignmentProvider', 'CoreSchedules', [('u32', 'u32')]
)
Return value¶
{
'assignments': [({'Idle': None, 'Pool': None, 'Task': 'u32'}, 'u16')],
'end_hint': (None, 'u32'),
'next_schedule': (None, 'u32'),
}
Errors¶
AssignmentsEmpty¶
AssignmentsNotSorted¶
Tried to add an unsorted set of assignments
DisallowedInsert¶
assign_core is only allowed to append new assignments at the end of already existing ones.
DuplicateInsert¶
Tried to insert a schedule for the same core and block number as an existing schedule
OverScheduled¶
Assignments together exceeded 57600.
UnderScheduled¶
Assignments together less than 57600