Ensure data size of identity pallet is bounded (#9168)
* Ensure data size of identity pallet is bounded * Fix unit tests for identity pallet * Move identity pallet custom types into its own module * Make use of NoBound family traits * Fix identity pallet benchmarks * Enumerate type imports * Properly convert to BoundedVec in benchmarks * Re-export types * Use BoundedVec when storing sub identities * Add generate_storage_info * Manually implement MaxEncodedLen on select types * Use ConstU32 instead of parameter_type * Leverage DefaultNoBound and add some comments * Use max_encoded_len() instead of hardcoded constant * Use MaxEncodedLen in parity-scal-codec * Add get_mut method for WeakBoundedVec * Use expect on an infallible operation * Rewrite as for loop
Showing
- substrate/frame/identity/Cargo.toml 1 addition, 1 deletionsubstrate/frame/identity/Cargo.toml
- substrate/frame/identity/src/benchmarking.rs 7 additions, 7 deletionssubstrate/frame/identity/src/benchmarking.rs
- substrate/frame/identity/src/lib.rs 29 additions, 281 deletionssubstrate/frame/identity/src/lib.rs
- substrate/frame/identity/src/tests.rs 35 additions, 36 deletionssubstrate/frame/identity/src/tests.rs
- substrate/frame/identity/src/types.rs 318 additions, 0 deletionssubstrate/frame/identity/src/types.rs
- substrate/frame/support/src/storage/bounded_vec.rs 8 additions, 0 deletionssubstrate/frame/support/src/storage/bounded_vec.rs
- substrate/frame/support/src/storage/weak_bounded_vec.rs 8 additions, 0 deletionssubstrate/frame/support/src/storage/weak_bounded_vec.rs
Please register or sign in to comment