3

I have a parachain currently running on a rococo-staging network. The leases are 1 day.

I'm making a sudo call > assignedSlots > assignTempParachainSlot(id, leasePeriodStart) to upgrade my chain to a temporary or permanent chain so that the lease is extended.

But i'm getting an error:

Result<Null, SpRuntimeDispatchError>
{
  Err: {
    Module: {
      index: 31
      error: 1
    }
  }
}

This is happening for both temporary and permanent calls.

How can i upgrade the parachain? and find out what this error means?

2 Answers 2

3

As Bruno's answer mentions, once your para is register for a temporary slot it will get onboarded and offboarded automatically following the pallet config.

Note that your para can only be registered ony for one, either temporary or permanent, type of slot at the same time. So if you are looking for changing your para from a temp slot to a permanent one you need to de-register it first from temporary slots so you can register it as a permanent one.

When it comes to detection of errors what you need to know is that the message shows the following info:

Err: {
    Module: {
      index: 31 --> Index of the pallet throwing the error 
      error: 1 --> Index of the error in such pallet
    }
  }

Index of a pallet is defined by its position in contruct_runtime! of the runtime. This value can also be defined explicitly like so


construct_runtime! {
    // -- snip
    XcmPallet: pallet_xcm = 99, --> index is 99 for this pallet
    // -- snip
}

source

3

Looks like your error is coming from the rococo pallet with index 31 so that would be the AssignedSlots pallet, and specifically Error 1 which is Cannot Onboard:

Para cannot be onboarded because it is already tracked by our system.

Which makes sense in your case because you mentioned that you are looking to extend therefore you're already in the system...

So the issue that I see is a couple things...

The sudo key is currently controlled by Parity Tech:

The Rococo sudo key is controlled by Parity tech at this time, so to have the operation required to get a slot, please place a request on the Parachain Technical matrix channel once you complete the above and are ready to connect! They will initiate the slot for you ASAP.

At this point, requesting a permanent or temporary parachain slot still a privileged (sudo) operation to be performed by the (Rococo) test chain's operator (using a call to the assignedSlots pallet's dispatchable functions) but the long-term plan is to make it a community-driven process via Rococo's governance framework.

Additionally, if you have already been approved and downgraded from your slot:

Please do note that when your temporary slot's lease ends, the parachain is automatically downgraded to a parathread. Registered and approved slots are cycled through automatically in a round-robin fashion, so you will expect to come back online as a parachain from time to time.

A note on Temporary Parachain Slots on Rococo:

Temporary slots are parachain slots that are dynamically allocated in a continuous rollover manner. Concretely, at every start of a lease period, a certain number of parathreads (up to a maximum defined in the relay chain's configuration) will be automatically upgraded to parachains for a certain duration. The parachains that were active during the ending lease period will be automatically downgraded to parathreads to free the slots for others to use in the subsequent one.

1
  • Is it possible for the Sudo team to use the proxy pallet on Rococo to give limited proxy permission to parachains if this extrinsic existed: sudo > paraSudoWrapper > sudoScheduleParaCleanupAndReinitialize(id, genesis)? So if a parachain team that had already been initialized with a parachain id purged their sole collator node, to then to restart it to generate and finalize blocks again, they could just run that extrinsic themselves to both de-register and re-register the same parachain id using their proxy permission on behalf of Sudo. This would avoid delays and prevent inconveniencing Sudo. Commented Mar 25, 2022 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.