substrate
substrate copied to clipboard
Add a test to verify all pallet storage size is below 4 MB
Current output is:
running 1 test
test tests::print_all_storage_info ... FAILED
failures:
---- tests::print_all_storage_info stdout ----
| Pallet | Storage | Max Values | Max Size |
| --- | --- | --- | --- |
| "Contracts" | "DeletionQueue" | Some(1) | Some(20537014) |
| "ImOnline" | "ReceivedHeartbeats" | None | Some(10021032) |
| "Preimage" | "PreimageFor" | None | Some(4194340) |
| "Contracts" | "CodeStorage" | None | Some(393358) |
| "ImOnline" | "Keys" | Some(1) | Some(320002) |
| "Contracts" | "PristineCode" | None | Some(131108) |
| "Gilt" | "Queues" | None | Some(48022) |
| "Alliance" | "UnscrupulousWebsites" | Some(1) | Some(25702) |
| "NominationPools" | "SubPoolsStorage" | None | Some(24382) |
| "Alliance" | "Announcements" | Some(1) | Some(8702) |
| "Babe" | "UnderConstruction" | None | Some(8206) |
| "Identity" | "IdentityOf" | None | Some(7538) |
| "Gilt" | "QueueTotals" | Some(1) | Some(6002) |
| "Grandpa" | "PendingChange" | Some(1) | Some(4015) |
| "Babe" | "NextAuthorities" | Some(1) | Some(4002) |
| "Babe" | "Authorities" | Some(1) | Some(4002) |
| "Identity" | "SubsOf" | None | Some(3258) |
| "Alliance" | "Members" | None | Some(3211) |
| "Alliance" | "UnscrupulousAccounts" | Some(1) | Some(3202) |
| "AuthorityDiscovery" | "NextKeys" | Some(1) | Some(3202) |
| "AuthorityDiscovery" | "Keys" | Some(1) | Some(3202) |
| "TechnicalMembership" | "Members" | Some(1) | Some(3202) |
| "RandomnessCollectiveFlip" | "RandomMaterial" | Some(1) | Some(2594) |
| "Proxy" | "Announcements" | None | Some(2233) |
| "Balances" | "Locks" | None | Some(1299) |
| "Balances" | "Reserves" | None | Some(1249) |
| "Proxy" | "Proxies" | None | Some(1241) |
| "Identity" | "Registrars" | Some(1) | Some(1141) |
| "Vesting" | "Vesting" | None | Some(1057) |
| "StateTrieMigration" | "MigrationProcess" | Some(1) | Some(1054) |
| "Bounties" | "BountyApprovals" | Some(1) | Some(402) |
| "Treasury" | "Approvals" | Some(1) | Some(402) |
| "Recovery" | "ActiveRecoveries" | None | Some(389) |
| "Uniques" | "Attribute" | None | Some(364) |
| "Recovery" | "Recoverable" | None | Some(351) |
| "ChildBounties" | "ChildBountyDescriptions" | None | Some(314) |
| "Bounties" | "BountyDescriptions" | None | Some(314) |
| "NominationPools" | "Metadata" | None | Some(270) |
| "NominationPools" | "PoolMembers" | None | Some(237) |
| "Contracts" | "ContractInfoOf" | None | Some(218) |
| "Assets" | "Asset" | None | Some(210) |
| "Uniques" | "Class" | None | Some(178) |
| "Bounties" | "Bounties" | None | Some(177) |
| "NominationPools" | "BondedPools" | None | Some(164) |
| "BagsList" | "ListNodes" | None | Some(154) |
| "Assets" | "Approvals" | None | Some(148) |
| "ChildBounties" | "ChildBounties" | None | Some(145) |
| "Assets" | "Metadata" | None | Some(140) |
| "Uniques" | "Asset" | None | Some(122) |
| "Identity" | "SuperOf" | None | Some(114) |
| "Balances" | "Account" | None | Some(112) |
| "Babe" | "Initialized" | Some(1) | Some(110) |
| "Uniques" | "InstanceMetadataOf" | None | Some(108) |
| "Treasury" | "Proposals" | None | Some(108) |
| "RankedCollective" | "VotingCleanup" | None | Some(104) |
| "Assets" | "Account" | None | Some(102) |
| "BagsList" | "ListBags" | None | Some(90) |
| "Uniques" | "ClassMetadataOf" | None | Some(88) |
| "Uniques" | "Account" | None | Some(88) |
| "Contracts" | "OwnerInfoOf" | None | Some(88) |
| "Alliance" | "Rule" | Some(1) | Some(87) |
| "Preimage" | "StatusFor" | None | Some(82) |
| "Gilt" | "Active" | None | Some(80) |
| "Recovery" | "Proxy" | None | Some(80) |
| "NominationPools" | "RewardPools" | None | Some(76) |
| "Indices" | "Accounts" | None | Some(69) |
| "Uniques" | "ClassAccount" | None | Some(68) |
| "RankedCollective" | "Voting" | None | Some(65) |
| "Lottery" | "Participants" | None | Some(65) |
| "Alliance" | "DepositOf" | None | Some(64) |
| "ImOnline" | "AuthoredBlocks" | None | Some(56) |
| "RankedCollective" | "IndexToId" | None | Some(54) |
| "RankedCollective" | "IdToIndex" | None | Some(54) |
| "Uniques" | "OwnershipAcceptance" | None | Some(52) |
| "Alliance" | "UpForKicking" | None | Some(49) |
| "Historical" | "HistoricalSessions" | None | Some(48) |
| "NominationPools" | "ReversePoolIdLookup" | None | Some(44) |
| "Lottery" | "Tickets" | None | Some(44) |
| "RankedCollective" | "Members" | None | Some(42) |
| "Whitelist" | "WhitelistedCall" | None | Some(40) |
| "Mmr" | "Nodes" | None | Some(40) |
| "Gilt" | "ActiveTotal" | Some(1) | Some(36) |
| "Babe" | "AuthorVrfRandomness" | Some(1) | Some(33) |
| "Mmr" | "RootHash" | Some(1) | Some(32) |
| "Sudo" | "Key" | Some(1) | Some(32) |
| "TechnicalMembership" | "Prime" | Some(1) | Some(32) |
| "Babe" | "NextRandomness" | Some(1) | Some(32) |
| "Babe" | "Randomness" | Some(1) | Some(32) |
| "Lottery" | "Lottery" | Some(1) | Some(29) |
| "ChildBounties" | "ChildrenCuratorFees" | None | Some(28) |
| "Uniques" | "CollectionMaxSupply" | None | Some(24) |
| "Lottery" | "CallIndices" | Some(1) | Some(21) |
| "Grandpa" | "SetIdSession" | None | Some(20) |
| "Babe" | "PendingEpochConfigChange" | Some(1) | Some(18) |
| "Babe" | "NextEpochConfig" | Some(1) | Some(17) |
| "Babe" | "EpochConfig" | Some(1) | Some(17) |
| "NominationPools" | "MinCreateBond" | Some(1) | Some(16) |
| "NominationPools" | "MinJoinBond" | Some(1) | Some(16) |
| "ChildBounties" | "ParentChildBounties" | None | Some(16) |
| "TransactionPayment" | "NextFeeMultiplier" | Some(1) | Some(16) |
| "Balances" | "TotalIssuance" | Some(1) | Some(16) |
| "RankedCollective" | "MemberCount" | None | Some(14) |
| "StateTrieMigration" | "AutoLimits" | Some(1) | Some(9) |
| "Grandpa" | "State" | Some(1) | Some(9) |
| "StateTrieMigration" | "SignedMigrationMaxLimits" | Some(1) | Some(8) |
| "Mmr" | "NumberOfLeaves" | Some(1) | Some(8) |
| "Historical" | "StoredRange" | Some(1) | Some(8) |
| "Contracts" | "Nonce" | Some(1) | Some(8) |
| "Grandpa" | "CurrentSetId" | Some(1) | Some(8) |
| "Grandpa" | "Stalled" | Some(1) | Some(8) |
| "Timestamp" | "Now" | Some(1) | Some(8) |
| "Babe" | "EpochStart" | Some(1) | Some(8) |
| "Babe" | "CurrentSlot" | Some(1) | Some(8) |
| "Babe" | "GenesisSlot" | Some(1) | Some(8) |
| "Babe" | "EpochIndex" | Some(1) | Some(8) |
| "NominationPools" | "CounterForReversePoolIdLookup" | Some(1) | Some(4) |
| "NominationPools" | "LastPoolId" | Some(1) | Some(4) |
| "NominationPools" | "CounterForMetadata" | Some(1) | Some(4) |
| "NominationPools" | "CounterForSubPoolsStorage" | Some(1) | Some(4) |
| "NominationPools" | "CounterForRewardPools" | Some(1) | Some(4) |
| "NominationPools" | "CounterForBondedPools" | Some(1) | Some(4) |
| "NominationPools" | "CounterForPoolMembers" | Some(1) | Some(4) |
| "NominationPools" | "MaxPoolMembersPerPool" | Some(1) | Some(4) |
| "NominationPools" | "MaxPoolMembers" | Some(1) | Some(4) |
| "NominationPools" | "MaxPools" | Some(1) | Some(4) |
| "ChildBounties" | "ChildBountyCount" | Some(1) | Some(4) |
| "BagsList" | "CounterForListNodes" | Some(1) | Some(4) |
| "Lottery" | "TicketsCount" | Some(1) | Some(4) |
| "Lottery" | "LotteryIndex" | Some(1) | Some(4) |
| "Bounties" | "BountyCount" | Some(1) | Some(4) |
| "ImOnline" | "HeartbeatAfter" | Some(1) | Some(4) |
| "Treasury" | "ProposalCount" | Some(1) | Some(4) |
| "Grandpa" | "NextForced" | Some(1) | Some(4) |
| "Staking" | "CounterForNominators" | Some(1) | Some(4) |
| "Staking" | "CounterForValidators" | Some(1) | Some(4) |
| "Babe" | "Lateness" | Some(1) | Some(4) |
| "Babe" | "SegmentIndex" | Some(1) | Some(4) |
| "Vesting" | "StorageVersion" | Some(1) | Some(1) |
| "TransactionPayment" | "StorageVersion" | Some(1) | Some(1) |
| "Balances" | "StorageVersion" | Some(1) | Some(1) |
| "Timestamp" | "DidUpdate" | Some(1) | Some(1) |
| "RankedPolls" | "DecidingCount" | None | None |
| "RankedPolls" | "TrackQueue" | None | None |
| "RankedPolls" | "ReferendumInfoFor" | None | None |
| "RankedPolls" | "ReferendumCount" | Some(1) | None |
| "AllianceMotion" | "Prime" | Some(1) | None |
| "AllianceMotion" | "Members" | Some(1) | None |
| "AllianceMotion" | "ProposalCount" | Some(1) | None |
| "AllianceMotion" | "Voting" | None | None |
| "AllianceMotion" | "ProposalOf" | None | None |
| "AllianceMotion" | "Proposals" | Some(1) | None |
| "ConvictionVoting" | "ClassLocksFor" | None | None |
| "ConvictionVoting" | "VotingFor" | None | None |
| "Referenda" | "DecidingCount" | None | None |
| "Referenda" | "TrackQueue" | None | None |
| "Referenda" | "ReferendumInfoFor" | None | None |
| "Referenda" | "ReferendumCount" | Some(1) | None |
| "TransactionStorage" | "ProofChecked" | Some(1) | None |
| "TransactionStorage" | "BlockTransactions" | Some(1) | None |
| "TransactionStorage" | "StoragePeriod" | Some(1) | None |
| "TransactionStorage" | "MaxBlockTransactions" | Some(1) | None |
| "TransactionStorage" | "MaxTransactionSize" | Some(1) | None |
| "TransactionStorage" | "EntryFee" | Some(1) | None |
| "TransactionStorage" | "ByteFee" | Some(1) | None |
| "TransactionStorage" | "ChunkCount" | None | None |
| "TransactionStorage" | "Transactions" | None | None |
| "Tips" | "Reasons" | None | None |
| "Tips" | "Tips" | None | None |
| "Multisig" | "Calls" | None | None |
| "Multisig" | "Multisigs" | None | None |
| "Scheduler" | "Lookup" | None | None |
| "Scheduler" | "Agenda" | None | None |
| "Society" | "MaxMembers" | Some(1) | None |
| "Society" | "DefenderVotes" | None | None |
| "Society" | "Defender" | Some(1) | None |
| "Society" | "Votes" | None | None |
| "Society" | "Strikes" | None | None |
| "Society" | "Payouts" | None | None |
| "Society" | "Vouching" | None | None |
| "Society" | "Bids" | Some(1) | None |
| "Society" | "SuspendedMembers" | None | None |
| "Society" | "Members" | Some(1) | None |
| "Society" | "Head" | Some(1) | None |
| "Society" | "Pot" | Some(1) | None |
| "Society" | "SuspendedCandidates" | None | None |
| "Society" | "Candidates" | Some(1) | None |
| "Society" | "Rules" | Some(1) | None |
| "Society" | "Founder" | Some(1) | None |
| "Offences" | "ReportsByKindIndex" | None | None |
| "Offences" | "ConcurrentReportsIndex" | None | None |
| "Offences" | "Reports" | None | None |
| "Elections" | "Voting" | None | None |
| "Elections" | "ElectionRounds" | Some(1) | None |
| "Elections" | "Candidates" | Some(1) | None |
| "Elections" | "RunnersUp" | Some(1) | None |
| "Elections" | "Members" | Some(1) | None |
| "TechnicalCommittee" | "Prime" | Some(1) | None |
| "TechnicalCommittee" | "Members" | Some(1) | None |
| "TechnicalCommittee" | "ProposalCount" | Some(1) | None |
| "TechnicalCommittee" | "Voting" | None | None |
| "TechnicalCommittee" | "ProposalOf" | None | None |
| "TechnicalCommittee" | "Proposals" | Some(1) | None |
| "Council" | "Prime" | Some(1) | None |
| "Council" | "Members" | Some(1) | None |
| "Council" | "ProposalCount" | Some(1) | None |
| "Council" | "Voting" | None | None |
| "Council" | "ProposalOf" | None | None |
| "Council" | "Proposals" | Some(1) | None |
| "Democracy" | "StorageVersion" | Some(1) | None |
| "Democracy" | "Cancellations" | None | None |
| "Democracy" | "Blacklist" | None | None |
| "Democracy" | "NextExternal" | Some(1) | None |
| "Democracy" | "LastTabledWasExternal" | Some(1) | None |
| "Democracy" | "VotingOf" | None | None |
| "Democracy" | "ReferendumInfoOf" | None | None |
| "Democracy" | "LowestUnbaked" | Some(1) | None |
| "Democracy" | "ReferendumCount" | Some(1) | None |
| "Democracy" | "Preimages" | None | None |
| "Democracy" | "DepositOf" | None | None |
| "Democracy" | "PublicProps" | Some(1) | None |
| "Democracy" | "PublicPropCount" | Some(1) | None |
| "Session" | "KeyOwner" | None | None |
| "Session" | "NextKeys" | None | None |
| "Session" | "DisabledValidators" | Some(1) | None |
| "Session" | "QueuedKeys" | Some(1) | None |
| "Session" | "QueuedChanged" | Some(1) | None |
| "Session" | "CurrentIndex" | Some(1) | None |
| "Session" | "Validators" | Some(1) | None |
| "Staking" | "ChillThreshold" | Some(1) | None |
| "Staking" | "StorageVersion" | Some(1) | None |
| "Staking" | "OffendingValidators" | Some(1) | None |
| "Staking" | "CurrentPlannedSession" | Some(1) | None |
| "Staking" | "EarliestUnappliedSlash" | Some(1) | None |
| "Staking" | "SpanSlash" | None | None |
| "Staking" | "SlashingSpans" | None | None |
| "Staking" | "NominatorSlashInEra" | None | None |
| "Staking" | "ValidatorSlashInEra" | None | None |
| "Staking" | "BondedEras" | Some(1) | None |
| "Staking" | "UnappliedSlashes" | None | None |
| "Staking" | "CanceledSlashPayout" | Some(1) | None |
| "Staking" | "SlashRewardFraction" | Some(1) | None |
| "Staking" | "ForceEra" | Some(1) | None |
| "Staking" | "ErasTotalStake" | None | None |
| "Staking" | "ErasRewardPoints" | None | None |
| "Staking" | "ErasValidatorReward" | None | None |
| "Staking" | "ErasValidatorPrefs" | None | None |
| "Staking" | "ErasStakersClipped" | None | None |
| "Staking" | "ErasStakers" | None | None |
| "Staking" | "ErasStartSessionIndex" | None | None |
| "Staking" | "ActiveEra" | Some(1) | None |
| "Staking" | "CurrentEra" | Some(1) | None |
| "Staking" | "MaxNominatorsCount" | Some(1) | None |
| "Staking" | "Nominators" | None | None |
| "Staking" | "MaxValidatorsCount" | Some(1) | None |
| "Staking" | "Validators" | None | None |
| "Staking" | "Payee" | None | None |
| "Staking" | "Ledger" | None | None |
| "Staking" | "MinCommission" | Some(1) | None |
| "Staking" | "MinValidatorBond" | Some(1) | None |
| "Staking" | "MinNominatorBond" | Some(1) | None |
| "Staking" | "Bonded" | None | None |
| "Staking" | "Invulnerables" | Some(1) | None |
| "Staking" | "MinimumValidatorCount" | Some(1) | None |
| "Staking" | "ValidatorCount" | Some(1) | None |
| "Staking" | "HistoryDepth" | Some(1) | None |
| "ElectionProviderMultiPhase" | "MinimumUntrustedScore" | Some(1) | None |
| "ElectionProviderMultiPhase" | "SignedSubmissionsMap" | None | None |
| "ElectionProviderMultiPhase" | "SignedSubmissionIndices" | Some(1) | None |
| "ElectionProviderMultiPhase" | "SignedSubmissionNextIndex" | Some(1) | None |
| "ElectionProviderMultiPhase" | "SnapshotMetadata" | Some(1) | None |
| "ElectionProviderMultiPhase" | "DesiredTargets" | Some(1) | None |
| "ElectionProviderMultiPhase" | "Snapshot" | Some(1) | None |
| "ElectionProviderMultiPhase" | "QueuedSolution" | Some(1) | None |
| "ElectionProviderMultiPhase" | "CurrentPhase" | Some(1) | None |
| "ElectionProviderMultiPhase" | "Round" | Some(1) | None |
| "Authorship" | "DidSetUncles" | Some(1) | None |
| "Authorship" | "Author" | Some(1) | None |
| "Authorship" | "Uncles" | Some(1) | None |
| "System" | "ExecutionPhase" | Some(1) | None |
| "System" | "UpgradedToTripleRefCount" | Some(1) | None |
| "System" | "UpgradedToU32RefCount" | Some(1) | None |
| "System" | "LastRuntimeUpgrade" | Some(1) | None |
| "System" | "EventTopics" | None | None |
| "System" | "EventCount" | Some(1) | None |
| "System" | "Events" | Some(1) | None |
| "System" | "Digest" | Some(1) | None |
| "System" | "ParentHash" | Some(1) | None |
| "System" | "Number" | Some(1) | None |
| "System" | "ExtrinsicData" | None | None |
| "System" | "BlockHash" | None | None |
| "System" | "AllExtrinsicsLen" | Some(1) | None |
| "System" | "BlockWeight" | Some(1) | None |
| "System" | "ExtrinsicCount" | Some(1) | None |
| "System" | "Account" | None | None |
thread 'tests::print_all_storage_info' panicked at 'assertion failed: test_pass', bin/node/runtime/src/lib.rs:2189:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
I think we should merge this by marking the test as extra or ignore, then we can close the MR.
PS: We could also integrate this into the construct_runtime macro with some (modifiable) default maximum PoV size.
That would also help other teams find large structs. I will create an issue if you like this.
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.
bot rebase
Rebased
bot fmt
@ggwpez https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2536152 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh". Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.
Comment bot cancel 69-92ca8294-f9e8-4de3-a846-59f8d4ef591b to cancel this command or bot cancel to cancel all commands in this pull request.
@ggwpez Command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh" has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2536152 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2536152/artifacts/download.
The CI pipeline was cancelled due to failure one of the required jobs. Job name: test-linux-stable Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2536166
Okay so the problem was that the test does not actually pass CI Line 362. However I think it is enough to add a whitelist for all the relay and testing pallets and exclude those. Will add.
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.