Skip to content

[Nara] Module/Transaction Ordering #4891

@mnaamani

Description

@mnaamani

This is part of Nara devops release checklist:

Using https://github.com/polkadot-js/tools/tree/master/packages/metadata-cmp to compare epheus to new nara runtime metadata changes, primarily module and call index changes as well as changes to storage.

Output:

              [Spec] name: joystream-node
                     spec_version: 2001 -> 2002
                     transaction_version: 1
          [Metadata] version: 14
           [Modules] num: 41

                          [System] idx: 0 (calls: 9 -> 8, storage: 17)
                                   [-] calls: fillBlock
                                        [remark] idx: 1 -> 0 (args: 1)
                                                 (Bytes)
                                  [setHeapPages] idx: 2 -> 1 (args: 1)
                                                 (u64)
                                       [setCode] idx: 3 -> 2 (args: 1)
                                                 (Bytes)
                          [setCodeWithoutChecks] idx: 4 -> 3 (args: 1)
                                                 (Bytes)
                                    [setStorage] idx: 5 -> 4 (args: 1)
                                                 (Vec<(Bytes,Bytes)>)
                                   [killStorage] idx: 6 -> 5 (args: 1)
                                                 (Vec<Bytes>)
                                    [killPrefix] idx: 7 -> 6 (args: 2)
                                                 (Bytes, u32)
                               [remarkWithEvent] idx: 8 -> 7 (args: 1)
                                                 (Bytes)
                                   [blockWeight] type: FrameSupportWeightsPerDispatchClassU64 -> FrameSupportDispatchPerDispatchClassWeight

                            [Babe] idx: 2 (calls: 3, storage: 17 -> 18)
                                   [+] storage: skippedEpochs

                       [Timestamp] idx: 3 (calls: 1, storage: 3)

                      [Authorship] idx: 4 -> - (calls: 1 -> 0, storage: 4 -> 2)
                                   [-] calls: setUncles
                                   [-] storage: uncles, didSetUncles

                        [Balances] idx: 5 (calls: 6, storage: 6)
                                   [+] storage: inactiveIssuance
                                   [-] storage: storageVersion

      [ElectionProviderMultiPhase] idx: 7 (calls: 5, storage: 11)
                       [signedSubmissionIndices] type: BTreeMap<SpNposElectionsElectionScore, u32> -> Vec<(SpNposElectionsElectionScore,u32,u32)>

                         [Staking] idx: 8 (calls: 26, storage: 40 -> 38)
                                   [+] calls: setMinCommission
                                   [-] calls: setHistoryDepth
                                     [reapStash] idx: 21 -> 20 (args: 2)
                                                 (AccountId32, u32)
                                          [kick] idx: 22 -> 21 (args: 1)
                                                 (Vec<AccountId32>)
                             [setStakingConfigs] idx: 23 -> 22 (args: 6)
                                                 (PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpU32, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpPerbill)
                                    [chillOther] idx: 24 -> 23 (args: 1)
                                                 (AccountId32)
                       [forceApplyMinCommission] idx: 25 -> 24 (args: 1)
                                                 (AccountId32)
                                   [+] storage: minimumActiveStake
                                   [-] storage: historyDepth, earliestUnappliedSlash, storageVersion

                         [Session] idx: 9 (calls: 2, storage: 8)

                         [Grandpa] idx: 11 (calls: 3, storage: 7)

                        [ImOnline] idx: 13 (calls: 1, storage: 5)

                        [BagsList] idx: 16 (calls: 2, storage: 4)

                         [Vesting] idx: 17 (calls: 5, storage: 3)

                        [Multisig] idx: 18 (calls: 4, storage: 3 -> 2)
                                       [asMulti] idx: 1 (args: 6 -> 5)
                                                 (u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, WrapperKeepOpaque<Call>, bool, u64) -> (u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, Call, SpWeightsWeightV2Weight)
                                [approveAsMulti] idx: 2 (args: 5)
                                                 (u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, [u8;32], u64) -> (u16, Vec<AccountId32>, Option<PalletMultisigTimepoint>, [u8;32], SpWeightsWeightV2Weight)
                                   [-] storage: calls

                         [Council] idx: 19 (calls: 12, storage: 10)

                      [Referendum] idx: 20 (calls: 4, storage: 4)

                         [Members] idx: 21 (calls: 17, storage: 9)

                           [Forum] idx: 22 (calls: 16, storage: 9)

                    [Constitution] idx: 23 (calls: 1, storage: 2)

                          [Bounty] idx: 24 (calls: 15, storage: 6)

                [JoystreamUtility] idx: 25 (calls: 4, storage: 1)

                         [Content] idx: 26 (calls: 64 -> 62, storage: 34)
                                   [-] calls: deleteChannelAsModerator, deleteVideoAsModerator
               [setChannelVisibilityAsModerator] idx: 12 -> 11 (args: 4)
                                                 (PalletContentPermissionsContentActor, u64, bool, Bytes)
                                   [createVideo] idx: 13 -> 12 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, PalletContentVideoCreationParametersRecord)
                                   [updateVideo] idx: 14 -> 13 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, PalletContentVideoUpdateParametersRecord)
                                   [deleteVideo] idx: 15 -> 14 (args: 4)
                                                 (PalletContentPermissionsContentActor, u64, u64, Option<u32>)
                  [deleteVideoAssetsAsModerator] idx: 16 -> 15 (args: 5)
                                                 (PalletContentPermissionsContentActor, u64, u32, BTreeSet<u64>, Bytes)
                 [setVideoVisibilityAsModerator] idx: 18 -> 16 (args: 4)
                                                 (PalletContentPermissionsContentActor, u64, bool, Bytes)
                          [updateChannelPayouts] idx: 19 -> 17 (args: 2)
                                                 (PalletContentUpdateChannelPayoutsParametersRecord, AccountId32)
                            [claimChannelReward] idx: 20 -> 18 (args: 3)
                                                 (PalletContentPermissionsContentActor, Vec<PalletCommonMerkleTreeProofElementRecord>, PalletContentPullPaymentElement)
                    [withdrawFromChannelBalance] idx: 21 -> 19 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, u128)
                   [updateChannelStateBloatBond] idx: 22 -> 20 (args: 1)
                                                 (u128)
                     [updateVideoStateBloatBond] idx: 23 -> 21 (args: 1)
                                                 (u128)
                 [claimAndWithdrawChannelReward] idx: 24 -> 22 (args: 3)
                                                 (PalletContentPermissionsContentActor, Vec<PalletCommonMerkleTreeProofElementRecord>, PalletContentPullPaymentElement)
                                      [issueNft] idx: 25 -> 23 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, PalletContentNftTypesNftIssuanceParametersRecord)
                                    [destroyNft] idx: 26 -> 24 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)
                              [startOpenAuction] idx: 27 -> 25 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, PalletContentNftTypesOpenAuctionParamsRecord)
                           [startEnglishAuction] idx: 28 -> 26 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, PalletContentNftTypesEnglishAuctionParamsRecord)
                          [cancelEnglishAuction] idx: 29 -> 27 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)
                             [cancelOpenAuction] idx: 30 -> 28 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)
                                   [cancelOffer] idx: 31 -> 29 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)
                                  [cancelBuyNow] idx: 32 -> 30 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)
                             [updateBuyNowPrice] idx: 33 -> 31 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, u128)
                            [makeOpenAuctionBid] idx: 34 -> 32 (args: 3)
                                                 (u64, u64, u128)
                         [makeEnglishAuctionBid] idx: 35 -> 33 (args: 3)
                                                 (u64, u64, u128)
                          [cancelOpenAuctionBid] idx: 36 -> 34 (args: 2)
                                                 (u64, u64)
                          [settleEnglishAuction] idx: 37 -> 35 (args: 1)
                                                 (u64)
                         [pickOpenAuctionWinner] idx: 38 -> 36 (args: 4)
                                                 (PalletContentPermissionsContentActor, u64, u64, u128)
                                      [offerNft] idx: 39 -> 37 (args: 4)
                                                 (u64, PalletContentPermissionsContentActor, u64, Option<u128>)
                                  [slingNftBack] idx: 40 -> 38 (args: 2)
                                                 (u64, PalletContentPermissionsContentActor)
                           [acceptIncomingOffer] idx: 41 -> 39 (args: 2)
                                                 (u64, Option<u128>)
                                       [sellNft] idx: 42 -> 40 (args: 3)
                                                 (u64, PalletContentPermissionsContentActor, u128)
                                        [buyNft] idx: 43 -> 41 (args: 3)
                                                 (u64, u64, u128)
                               [toggleNftLimits] idx: 44 -> 42 (args: 1)
                                                 (bool)
                            [channelOwnerRemark] idx: 45 -> 43 (args: 2)
                                                 (u64, Bytes)
                            [channelAgentRemark] idx: 46 -> 44 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, Bytes)
                                [nftOwnerRemark] idx: 47 -> 45 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, Bytes)
                     [initializeChannelTransfer] idx: 48 -> 46 (args: 3)
                                                 (u64, PalletContentPermissionsContentActor, PalletContentInitTransferParameters)
                         [cancelChannelTransfer] idx: 49 -> 47 (args: 2)
                                                 (u64, PalletContentPermissionsContentActor)
                         [acceptChannelTransfer] idx: 50 -> 48 (args: 2)
                                                 (u64, PalletContentTransferCommitmentParametersBTreeMap)
                          [updateGlobalNftLimit] idx: 51 -> 49 (args: 2)
                                                 (PalletContentNftLimitPeriod, u64)
                         [updateChannelNftLimit] idx: 52 -> 50 (args: 4)
                                                 (PalletContentPermissionsContentActor, PalletContentNftLimitPeriod, u64, u64)
                             [issueCreatorToken] idx: 53 -> 51 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, PalletProjectTokenTokenIssuanceParameters)
                          [initCreatorTokenSale] idx: 54 -> 52 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, PalletProjectTokenTokenSaleParams)
                [updateUpcomingCreatorTokenSale] idx: 55 -> 53 (args: 4)
                                                 (PalletContentPermissionsContentActor, u64, Option<u32>, Option<u32>)
                    [creatorTokenIssuerTransfer] idx: 56 -> 54 (args: 4)
                                                 (PalletContentPermissionsContentActor, u64, PalletProjectTokenTransfersPaymentWithVesting, Bytes)
                [makeCreatorTokenPermissionless] idx: 57 -> 55 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)
             [reduceCreatorTokenPatronageRateTo] idx: 58 -> 56 (args: 3)
                                                 (PalletContentPermissionsContentActor, u64, Permill)
              [claimCreatorTokenPatronageCredit] idx: 59 -> 57 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)
                             [issueRevenueSplit] idx: 60 -> 58 (args: 4)
                                                 (PalletContentPermissionsContentActor, u64, Option<u32>, u32)
                          [finalizeRevenueSplit] idx: 61 -> 59 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)
                      [finalizeCreatorTokenSale] idx: 62 -> 60 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)
                           [deissueCreatorToken] idx: 63 -> 61 (args: 2)
                                                 (PalletContentPermissionsContentActor, u64)

                         [Storage] idx: 27 (calls: 35, storage: 20)

                    [ProjectToken] idx: 28 (calls: 7, storage: 10)

                 [ProposalsEngine] idx: 29 (calls: 4, storage: 6)

             [ProposalsDiscussion] idx: 30 (calls: 4, storage: 5)

                  [ProposalsCodex] idx: 31 (calls: 1, storage: 2)

               [ForumWorkingGroup] idx: 32 (calls: 19, storage: 11)

             [StorageWorkingGroup] idx: 33 (calls: 19, storage: 11)

             [ContentWorkingGroup] idx: 34 (calls: 19, storage: 11)

     [OperationsWorkingGroupAlpha] idx: 35 (calls: 19, storage: 11)

                 [AppWorkingGroup] idx: 36 (calls: 19, storage: 11)

          [MembershipWorkingGroup] idx: 37 (calls: 19, storage: 11)

      [OperationsWorkingGroupBeta] idx: 38 (calls: 19, storage: 11)

     [OperationsWorkingGroupGamma] idx: 39 (calls: 19, storage: 11)

        [DistributionWorkingGroup] idx: 40 (calls: 19, storage: 11)

Tried to filter with this script: https://github.com/paritytech/polkadot/blob/master/scripts/ci/github/extrinsic-ordering-filter.sh but either it is not working correct or output is just hard to read. We can still analyze it manually though.
See comments

Why is ordering important: https://github.com/paritytech/polkadot/blob/master/doc/release-checklist.md#extrinsic-ordering

Questions:

  • If it is safe to keep active proposals (we always drop them during a runtime upgrade because we were unsure if the encoded calls saved in storage were still 'valid' ie. they reference the expected module+call with correct arguments.

  • Similar question about calls saved in mutlti-sig pallet.

  • What about external applications like our joystream-cli offline-signing, used to prepare a signed transaction before nara, but was not yet broadcast..

Do we need to bump the runtime's transaction_version the transaction version number is part of the signed-extensions .. ie. the transaction signature covers that value.

┆Issue is synchronized with this Asana task by Unito

Metadata

Metadata

Assignees

Labels

devopsjipJoystream Improvement Proposals

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions