-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore replacing counters with CountedStorageMap
#1126
Comments
CountedStorageMap
CountedStorageMap
(post v0.9.38)
Hi @shannonwells, it's me again! I could probably address this issue. Regardless of the upgrade, can a pull-request be submitted? |
@allanperlee If you want to take a swing at it, feel free! We'll be upgrading to 0.9.41 soonish I think. |
Hi @wilwade, I am working full-time now, I want to still work this issue, but this will take me about two weeks, is that fine? |
@allanperlee (sorry for the lag) Yes and congratulations on the job! That is fine, but also make sure to take care. Starting new job can be a lot. |
Thanks, @wilwade! Let me attempt starting this weekend. A medical emergency is getting in the way too. 🤦♂️ |
CountedStorageMap
(post v0.9.38)CountedStorageMap
Unblocked with the update to 0.9.42 complete! |
Hi @wilwade! I resumed this issue and the |
Hi @allanperlee! glad to see you are back. A number of things to consider before working on this
I'm not sure if I answered your question but please let me know. |
Hi @aramikm! I am currently working on the schema pallet, and I misunderstood the issue with the trait binding; some storages can be easily converted. Addressing your concern for storage migration, since we aren't changing the values in the converted storages, is a migration necessary? |
I think so, the reason is that we would need to replace the both of these storages with one /// Storage type for current number of schemas
/// Useful for retrieving latest schema id
/// - Value: Last Schema Id
#[pallet::storage]
#[pallet::getter(fn get_current_schema_identifier_maximum)]
pub(super) type CurrentSchemaIdentifierMaximum<T: Config> =
StorageValue<_, SchemaId, ValueQuery>;
/// Storage for message schema struct data
/// - Key: Schema Id
/// - Value: [`Schema`](Schema)
#[pallet::storage]
#[pallet::getter(fn get_schema)]
pub(super) type Schemas<T: Config> = StorageMap<
_,
Twox64Concat,
SchemaId,
Schema<T::SchemaModelMaxBytesBoundedVecLimit>,
OptionQuery,
>; |
@aramikm I have a draft finished, but I am struggling with compilation errors upon reaching the polkadot-cli: I followed all steps for Ubuntu building including clang, curl, git, sudo updates, and everything is updated, What other steps can I take? Thanks! |
Hi @allanperlee , so we had a number of changes recently that might contribute to that.
Our team is moving fast and unfortunately this current ticket do not make sense anymore and I apologize if we were not able to communicate that effectively before your efforts. We have a number of other tickets that might be good starting tickets and still valid such as
please take a look and ask any related questions if needed. |
@allanperlee sure. |
Closing this per discussion in https://github.com/LibertyDSNP/frequency/pull/1743/files#r1391162531 |
We have a few counters for separate storage of items in storage.
CountedStorageMap
won't apply to all but we could see how well it works various storage likeCurrentSchemaIdentifierMaximum
,CurrentMsaIdentifierMaximum
,PublicKeyToMsaId
+PublicKeyCountForMsaId
, andPayloadSignatureBucketCount
.https://paritytech.github.io/substrate/master/frame_support/storage/types/struct.CountedStorageMap.html
The text was updated successfully, but these errors were encountered: