From bd521d3d9ff5d7918ffeb8aeb44f54603e2e8c24 Mon Sep 17 00:00:00 2001 From: talhadaar Date: Tue, 12 Mar 2024 13:00:49 +0500 Subject: [PATCH] Bugfix/rbac implement boundedvec (#205) * integrated BoundedVec changes from rbac pallet * introduce rbac bounded storage * reset rbac deps branch * updated BoundedDataLen in all runtimes --- precompiles/peaq-rbac/src/lib.rs | 2 ++ runtime/agung/src/lib.rs | 1 + runtime/krest/src/lib.rs | 1 + runtime/peaq-dev/src/lib.rs | 1 + runtime/peaq/src/lib.rs | 1 + 5 files changed, 6 insertions(+) diff --git a/precompiles/peaq-rbac/src/lib.rs b/precompiles/peaq-rbac/src/lib.rs index 3418da22..e454f346 100644 --- a/precompiles/peaq-rbac/src/lib.rs +++ b/precompiles/peaq-rbac/src/lib.rs @@ -42,6 +42,8 @@ pub fn err2str(error: &RbacError) -> &str { RbacError { typ: RbacErrorType::AssignmentDoesNotExist, .. } => "RbacError.AssignmentDoesNotExist", RbacError { typ: RbacErrorType::NameExceedMaxChar, .. } => "RbacError.NameExceedMaxChar", + RbacError { typ: RbacErrorType::StorageExceedsMaxBounds, .. } => + "RbacError.StorageExceedsMaxBounds", } } diff --git a/runtime/agung/src/lib.rs b/runtime/agung/src/lib.rs index 18c33fe3..e0d528a7 100644 --- a/runtime/agung/src/lib.rs +++ b/runtime/agung/src/lib.rs @@ -886,6 +886,7 @@ parameter_types! { impl peaq_pallet_rbac::Config for Runtime { type RuntimeEvent = RuntimeEvent; type EntityId = RbacEntityId; + type BoundedDataLen = ConstU32<262144>; type WeightInfo = peaq_pallet_rbac::weights::WeightInfo; } diff --git a/runtime/krest/src/lib.rs b/runtime/krest/src/lib.rs index b79016b2..4a52c9aa 100644 --- a/runtime/krest/src/lib.rs +++ b/runtime/krest/src/lib.rs @@ -883,6 +883,7 @@ parameter_types! { impl peaq_pallet_rbac::Config for Runtime { type RuntimeEvent = RuntimeEvent; type EntityId = RbacEntityId; + type BoundedDataLen = ConstU32<262144>; type WeightInfo = peaq_pallet_rbac::weights::WeightInfo; } diff --git a/runtime/peaq-dev/src/lib.rs b/runtime/peaq-dev/src/lib.rs index e12f8144..c02513c8 100644 --- a/runtime/peaq-dev/src/lib.rs +++ b/runtime/peaq-dev/src/lib.rs @@ -894,6 +894,7 @@ parameter_types! { impl peaq_pallet_rbac::Config for Runtime { type RuntimeEvent = RuntimeEvent; type EntityId = RbacEntityId; + type BoundedDataLen = ConstU32<262144>; type WeightInfo = peaq_pallet_rbac::weights::WeightInfo; } diff --git a/runtime/peaq/src/lib.rs b/runtime/peaq/src/lib.rs index 976d7c2b..dce93b10 100644 --- a/runtime/peaq/src/lib.rs +++ b/runtime/peaq/src/lib.rs @@ -882,6 +882,7 @@ parameter_types! { impl peaq_pallet_rbac::Config for Runtime { type RuntimeEvent = RuntimeEvent; type EntityId = RbacEntityId; + type BoundedDataLen = ConstU32<262144>; type WeightInfo = peaq_pallet_rbac::weights::WeightInfo; }