|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## Spec 25 |
| 4 | + |
| 5 | +This release refactors the permission system's internal architecture to improve efficiency and maintainability while preserving all external functionality. |
| 6 | + |
| 7 | +### Infrastructure Changes |
| 8 | + |
| 9 | +#### Permission Instance Management Refactoring |
| 10 | + |
| 11 | +Instance management has been restructured for better separation of concerns: |
| 12 | + |
| 13 | +- Instance limits and child tracking moved from the general `PermissionContract` into the specific scopes that need them (`CuratorScope` and `NamespaceScope`). |
| 14 | +- Stream permissions no longer carry unnecessary instance-related overhead, reducing storage costs. |
| 15 | +- The refactoring improves code maintainability by ensuring each permission type only manages the data it requires. |
| 16 | +- All existing permissions are automatically migrated through the v7 migration with no functional changes. |
| 17 | + |
| 18 | +This internal restructuring maintains the same external API while creating a cleaner, more efficient architecture that better reflects the actual usage patterns of different permission types. |
| 19 | + |
| 20 | +## Spec 24 |
| 21 | + |
| 22 | +This release introduces multi-recipient permissions, delegated management capabilities, and streamlines the terminology from "emissions" to "streams" throughout the permission system. |
| 23 | + |
| 24 | +### Major Features |
| 25 | + |
| 26 | +#### Multi-Recipient Stream Permissions |
| 27 | + |
| 28 | +Stream permissions now support distributing tokens to multiple recipients in a single permission contract: |
| 29 | + |
| 30 | +- Recipients are managed within the stream scope with individual weight allocations, enabling complex distribution patterns without requiring multiple permissions. |
| 31 | +- Individual recipients can opt-out without affecting others, providing autonomy while maintaining the overall distribution structure. |
| 32 | +- The system automatically handles recipient management through improved indexing with `BoundedBTreeSet` storage for better performance. |
| 33 | +- Existing single-recipient permissions are automatically migrated to the new structure. |
| 34 | + |
| 35 | +#### Delegated Permission Management |
| 36 | + |
| 37 | +Stream permissions can now designate specific accounts to manage operational aspects: |
| 38 | + |
| 39 | +- Permission creators can assign `recipient_manager` and `weight_setter` roles to trusted accounts, enabling separation of concerns between permission ownership and operational management. |
| 40 | +- Recipient managers can add or remove recipients from the distribution list without requiring the delegator's signature. |
| 41 | +- Weight setters can adjust distribution weights for existing recipients, allowing dynamic rebalancing based on performance or contribution. |
| 42 | +- Particularly useful for DAOs, automated systems, and multi-signature operations where different parties handle different aspects of permission management. |
| 43 | + |
| 44 | +#### Dynamic Namespace Instance Management |
| 45 | + |
| 46 | +Namespace permissions now support runtime adjustment of instance limits: |
| 47 | + |
| 48 | +- The new `update_namespace_permission` extrinsic allows delegators to modify maximum instances after creation. |
| 49 | +- Validates that changes don't violate parent permission limits or invalidate existing child permissions. |
| 50 | +- Enables adaptive permission management based on actual usage patterns without requiring revocation and re-creation. |
| 51 | + |
| 52 | +### API Changes |
| 53 | + |
| 54 | +#### Terminology Standardization |
| 55 | + |
| 56 | +All emission-related terminology has been renamed to "stream" for better clarity: |
| 57 | + |
| 58 | +- Functions like `delegate_emission_permission` are now `delegate_stream_permission`. |
| 59 | +- The `EmissionScope` type is now `StreamScope`, and `EmissionAllocation` is now `StreamAllocation`. |
| 60 | +- Events like `EmissionDistribution` are now `StreamDistribution` with `target` fields renamed to `recipient`. |
| 61 | +- Client applications must update to use the new function and type names. |
| 62 | + |
| 63 | +#### Simplified Event Structure |
| 64 | + |
| 65 | +Permission events have been streamlined for the multi-recipient model: |
| 66 | + |
| 67 | +- The `recipient` field has been removed from `PermissionDelegated`, `PermissionRevoked`, and `PermissionExpired` events. |
| 68 | +- Applications should query the permission contract directly to determine current recipients. |
| 69 | +- The `revoked_by` field in `PermissionRevoked` is now optional to handle system-automatic revocations. |
| 70 | + |
| 71 | +### Configuration Updates |
| 72 | + |
| 73 | +- Added `MaxRecipientsPerPermission` to control the number of recipients in a single stream permission. |
| 74 | +- Added `MaxControllersPerPermission` to limit the number of designated managers per permission. |
| 75 | +- Added `MaxBulkOperationsPerCall` to control batch operation sizes. |
| 76 | + |
| 77 | +This release significantly enhances the flexibility and efficiency of the permission system, enabling more sophisticated economic relationships and operational patterns while maintaining backward compatibility through automatic migrations. |
| 78 | + |
3 | 79 | ## Spec 23 |
4 | 80 |
|
5 | 81 | This release builds upon the permission delegation system with enhanced re-delegation capabilities, enabling more sophisticated hierarchical permission structures for curators and namespace management. |
|
0 commit comments