Before elastic scaling, only a single group of validators was assigned to a parachain, so we assigned paraID to GroupID.
However, in elastic scaling, multiple groups of validators(core) will be assigned to a parachain. So now we have to change the type of GroupID from paraID to the CoreIndex, which is unique for assigned groups.
Change the type of groupID from paraID to CoreIndex and check all the methods to see if any changes are needed.
change assignment *parachaintypes.ParaID field to assignedCore *parachaintypes.CoreIndex in perRelayParentState which represents the core index assigned to the local validator at this relay parent. also figure out if we really need this a pointer type.
Introduce a new argument for the core index in the importStatement and importCandidate methods. (value of this core index can be found using #4324)
use core index in tableCtx.isMemberOf method instead of paraID.
use core index instead of paraID in the addCandidateVote method of the statement table.
Also, some fields have been introduced in the perRelayParentState structure of polkadot-sdk. check and add the fields we need.
Issue summary
Before elastic scaling, only a single group of validators was assigned to a parachain, so we assigned paraID to GroupID. However, in elastic scaling, multiple groups of validators(core) will be assigned to a parachain. So now we have to change the type of GroupID from paraID to the
CoreIndex
, which is unique for assigned groups.Change the type of groupID from
paraID
toCoreIndex
and check all the methods to see if any changes are needed.Summary
,tableContext
,attestedCandidate
,candidateData
.change
assignment *parachaintypes.ParaID
field toassignedCore *parachaintypes.CoreIndex
in perRelayParentState which represents the core index assigned to the local validator at this relay parent. also figure out if we really need this a pointer type.Introduce a new argument for the core index in the
importStatement
andimportCandidate
methods. (value of this core index can be found using #4324)addCandidateVote
method of the statement table.Also, some fields have been introduced in the
perRelayParentState
structure of polkadot-sdk. check and add the fields we need.