|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## Spec 23 |
| 4 | + |
| 5 | +This release builds upon the permission delegation system with enhanced re-delegation capabilities, enabling more sophisticated hierarchical permission structures for curators and namespace management. |
| 6 | + |
| 7 | +### Major Features |
| 8 | + |
| 9 | +#### Curator Re-delegation |
| 10 | + |
| 11 | +Curators can now re-delegate their permissions to other agents, creating a hierarchical permission structure: |
| 12 | + |
| 13 | +- The implementation tracks parent-child relationships between permissions and enforces inheritance rules where child permissions cannot exceed parent permission scopes. |
| 14 | +- Enables more flexible governance structures where curators can delegate specific subsets of their permissions to trusted agents, creating delegation chains. |
| 15 | +- Particularly useful for scaling curator operations and distributing workload while maintaining accountability through the permission hierarchy. |
| 16 | +- Existing curator permissions are automatically migrated to the new structure with their flags mapped to a single entry with no parent permission ID. |
| 17 | + |
| 18 | +#### Namespace Re-delegation |
| 19 | + |
| 20 | +Added support for namespace permission re-delegation with depth limiting: |
| 21 | + |
| 22 | +- Agents can now delegate namespace permissions they've received to other agents, creating delegation chains up to 5 levels deep. |
| 23 | +- The system validates that child namespace paths exist and are properly owned before allowing delegation. |
| 24 | +- Allows namespace owners to create more complex delegation structures for namespace management. |
| 25 | +- Organizations can delegate namespace control to team leads who can further delegate to team members, enabling hierarchical namespace administration. |
| 26 | +- No migration needed for existing namespace permissions as they remain compatible with the new system. |
| 27 | + |
| 28 | +#### Permission Instance Tracking |
| 29 | + |
| 30 | +All permission types now support instance tracking through the instances parameter: |
| 31 | + |
| 32 | +- Allows delegators to specify how many times a permission can be used concurrently, providing better control over permission usage. |
| 33 | +- Prevents permission abuse by limiting concurrent usage and provides better resource management for delegated operations. |
| 34 | +- Particularly important for curator and namespace permissions where parallel operations could cause conflicts. |
| 35 | +- Existing permissions are migrated with a default instance count of 1, maintaining current behavior. |
| 36 | + |
| 37 | +### Infrastructure Changes |
| 38 | + |
| 39 | +#### Storage Migration v5 |
| 40 | + |
| 41 | +Migrated the CuratorScope structure to support the new hierarchical permission model: |
| 42 | + |
| 43 | +- The migration transforms the flat CuratorPermissions flags into a BoundedBTreeMap structure where existing permissions are mapped with no parent permission ID. |
| 44 | +- Ensures backward compatibility while enabling the new curator re-delegation features. |
| 45 | +- All existing curator permissions continue to work as before while gaining the ability to be re-delegated. |
| 46 | +- The migration runs automatically during runtime upgrade and is transparent to other pallets. |
| 47 | + |
| 48 | +### Configuration Updates |
| 49 | + |
| 50 | +- Added MaxCuratorSubpermissionsPerPermission parameter to limit the number of curator sub-permissions that can be delegated in a single permission contract (set to 16). |
| 51 | +- Added new error types to handle curator permission limits and namespace delegation depth restrictions. |
| 52 | + |
| 53 | +This release enhances the permission system's flexibility while maintaining security through proper validation and depth limiting, enabling more sophisticated governance and namespace management structures. |
| 54 | + |
| 55 | +## Spec 22 |
| 56 | + |
| 57 | +This release introduces a major redesign of the permission system from a grant-based to a delegation-based model, along with significant improvements to staking, agent registration, and emission distribution. |
| 58 | + |
| 59 | +### Major Features |
| 60 | + |
| 61 | +#### Permission Delegation System Redesign |
| 62 | + |
| 63 | +The entire permission system has been redesigned around delegation rather than granting: |
| 64 | + |
| 65 | +- All functions, events, and storage items renamed from "grant/grantor/grantee" to "delegate/delegator/recipient" terminology. |
| 66 | +- Better reflects the actual relationship between participants - one party delegates authority to another rather than simply granting permissions. |
| 67 | +- Improves the mental model for developers and users interacting with the permission system. |
| 68 | +- All client applications must update their calls to use the new extrinsic names and parameter names. |
| 69 | + |
| 70 | +#### Hierarchical Namespace Permissions |
| 71 | + |
| 72 | +Namespace permissions now support hierarchical delegation through a parent-child relationship system: |
| 73 | + |
| 74 | +- The NamespaceScope structure changed from a simple set of paths to a map of parent permission IDs to path sets. |
| 75 | +- Permission contracts now track children and have instance limits. |
| 76 | +- Enables sophisticated permission delegation chains where a recipient of namespace permissions can re-delegate subsets of those permissions to other parties. |
| 77 | +- The instance system prevents over-delegation by limiting how many active delegations can exist from a single permission. |
| 78 | + |
| 79 | +#### Staking System Overhaul |
| 80 | + |
| 81 | +The staking system now uses named reserves instead of withdrawing and issuing tokens: |
| 82 | + |
| 83 | +- Stakes are tracked using the Balances pallet's named reserve functionality with identifier "torstake". |
| 84 | +- Improves the economic model by ensuring staked tokens remain as part of the staker's balance but are properly reserved and cannot be spent. |
| 85 | +- Ensures the total issuance remains consistent and stakes are properly tracked by the underlying currency system. |
| 86 | +- The v6 migration automatically handles the conversion of existing stakes to the new reserve-based system. |
| 87 | + |
| 88 | +#### Agent Registration Simplification |
| 89 | + |
| 90 | +The register_agent extrinsic no longer takes a separate agent_key parameter: |
| 91 | + |
| 92 | +- The agent key is now always the transaction signer. |
| 93 | +- The registration process also now checks for duplicate agent names in addition to duplicate keys. |
| 94 | +- Simplifies the registration process and ensures stronger consistency between the transaction signer and the registered agent. |
| 95 | +- Name uniqueness prevents confusion and impersonation attempts. |
| 96 | + |
| 97 | +#### Enhanced Emission Distribution Tracking |
| 98 | + |
| 99 | +The emission distribution system now emits more granular events: |
| 100 | + |
| 101 | +- Individual EmissionDistribution events for each target and AccumulatedEmission events when tokens are accumulated for permissions. |
| 102 | +- Distribution functions now return DispatchResult and handle errors gracefully. |
| 103 | +- Provides better observability into the emission system, allowing external systems to track exactly how tokens flow through the network. |
| 104 | +- Error handling prevents the emission system from silently failing. |
| 105 | + |
| 106 | +#### Whitelist-Based Consensus Participation |
| 107 | + |
| 108 | +The emission system now considers agents to be eligible for consensus only if they are both registered and whitelisted: |
| 109 | + |
| 110 | +- The registered field in ConsensusMemberInput was renamed to whitelisted to reflect this dual requirement. |
| 111 | +- Provides finer-grained control over network participation. |
| 112 | +- Allows the governance system to temporarily restrict agents from consensus without full deregistration. |
| 113 | + |
| 114 | +#### Namespace Creation Event Granularity |
| 115 | + |
| 116 | +Namespace creation and deletion now emit individual events for each namespace path rather than batch events: |
| 117 | + |
| 118 | +- Provides more detailed tracking of namespace operations. |
| 119 | +- Better supports indexing and monitoring systems that need to track individual namespace state changes. |
| 120 | +- Applications listening to namespace events should expect multiple events per operation when multiple paths are involved. |
| 121 | + |
| 122 | +### API Changes |
| 123 | + |
| 124 | +- The Torus0Api stake_to method now returns DispatchResult instead of Result<(), Balance> for consistent error handling. |
| 125 | +- Added find_agent_by_name method to the Torus0Api to support name-based agent lookups. |
| 126 | +- Added agent_name method to NamespacePath to extract agent names from namespace paths. |
| 127 | + |
| 128 | +This release represents a fundamental shift in how permissions are conceptualized and managed within the Torus Network, providing clearer semantics and more powerful delegation capabilities. |
| 129 | + |
3 | 130 | ## Spec 21 |
4 | 131 |
|
5 | 132 | This release introduces major architectural changes to enable decentralized economic relationships, improved governance flexibility, and preparation for off-chain service integration. The changes span several months of development focused on creating a more sophisticated and scalable network. |
|
0 commit comments