Commit 80af423
authored
Spec 21 (#92)
# Torus Network v0.5 Changelog
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.
## Major Features
### Permission System (permission0 pallet)
A comprehensive permission framework that revolutionizes how agents
interact economically within the network:
- Agents can now share their token emissions with contributors through
recursive permission trees. Supports percentage-based streams or fixed
amounts, with flexible distribution controls (manual, automatic
threshold, scheduled).
- Permissions can be managed by arbiters (multi-sig groups) for enhanced
security and decentralized control.
- Governance powers are now granular with specific permissions for
application review, whitelist management, and penalty control. Replaces
the old curator system with a more flexible approach.
- Built-in protections against double-spending and infinite recursion
ensure tokenomics.
### Namespace System
A hierarchical naming system that functions as decentralized
DNS/capability listing for agent services:
- Agents can create dot-separated paths like `agent.alice.api.v2` to
organize their off-chain services.
- Owning a namespace gives control over all sub-paths, enabling
structured delegation of services.
- Base fees go to treasury while refundable deposits incentivize
efficient storage use.
- Namespaces can be delegated through the permission system, enabling
complex service architectures.
### Agent Management Improvements
- Agent names are automatically converted to namespace-compliant format
(lowercase, no spaces) during the upgrade.
- Curators can now freeze/unfreeze agents, adding a new governance tool
for spam control.
- Agent metadata updates now have cooldowns to prevent spam and ensure
stability.
- Burn parameters adjusted for better economic balance during high
registration activity.
### Economic Enhancements
- All transaction fees now flow to the treasury instead of being burned,
providing sustainable funding for network development.
- Only whitelisted agents receive emissions, ensuring quality
participants chosen by the DAO are rewarded.
- Permission holders can dynamically adjust how they distribute received
emissions.
- Distribution remainders are now properly accumulated, preventing token
loss.
### Developer Experience
- Proof-of-work based faucet for obtaining testnet tokens, preventing
abuse while maintaining accessibility.
- Comprehensive docs for all pallets now auto-published to GitHub Pages.
- New `torus0_namespacePathCreationCost` RPC for calculating namespace
fees upfront.
- Integrated coverage reporting with `cargo xtask coverage` for
maintaining code quality.
## Bug Fixes & Safety Improvements
- Critical fix ensuring stakes are properly refunded before clearing
storage during de-registration.
- Banned arithmetic side effects throughout the runtime, using
saturating operations to prevent overflows.
- All agents now automatically delegate weights to allocators,
simplifying the onboarding process.
## Governance Changes
- Instead of all-or-nothing curator status, specific permissions can be
granted.
- Improved with better event emissions and clearer execution flows.
- Now integrated with the permission system for more flexible control.
## Infrastructure
- Enhanced GitHub Actions for automated testing, documentation, and
Docker builds.
- Added development container configuration for consistent environments.
- Migrated CI infrastructure for better performance.
This release represents a fundamental evolution of the Torus Network,
creating the foundation for a truly decentralized economy where agents
can form complex relationships, share resources, and organize their
services in meaningful ways.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Summary by CodeRabbit
* **New Features**
* Introduced a comprehensive permission system enabling emission,
curator, and namespace permissions with fine-grained control,
revocation, and enforcement.
* Added namespace management: users can create and delete hierarchical
namespaces with associated economic and permission models.
* Added a testnet-only faucet feature allowing users to obtain test
tokens via proof-of-work.
* Expanded governance with freezing controls for agent/namespace
registration and more granular role/permission management.
* Added new RPC endpoints for permission and namespace queries.
* Enhanced agent management with update cooldowns and namespace
integration.
* **Improvements**
* Unified numeric types for emission calculations, improving precision
and consistency.
* Refined governance proposal lifecycle, voting, and reward distribution
with improved type safety and fixed-point math.
* Strengthened access controls and permission checks across emission,
governance, and agent operations.
* Improved documentation, developer guides, and user manuals for new
features and workflows.
* Expanded benchmarking and test coverage for new and existing modules.
* **Bug Fixes**
* Fixed edge cases in emission and permission logic, including overflow
handling and delegation validation.
* Addressed governance and agent update race conditions with improved
cooldown and permission enforcement.
* **Chores**
* Updated dependencies, development environment, CI workflows, and added
new workspace members for modularity.
* Upgraded Nix flake and build tooling for improved developer
experience.
* **Documentation**
* Added detailed docs covering permission system, namespaces, emission
mechanics, governance structure, deployment, and developer tooling.
* **Style/Refactor**
* Refactored imports, code organization, and type usage for clarity and
maintainability.
* Removed deprecated benchmarking and test files, replacing them with
updated implementations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->File tree
133 files changed
+16560
-4920
lines changed- .devcontainer
- .github
- workflows
- .vscode
- data/testnet
- docker
- docs
- node
- src
- cli
- command
- rpc
- pallets
- emission0
- api
- src
- src
- distribute
- tests
- faucet
- src
- tests
- governance
- api
- src
- src
- tests
- permission0
- api
- src
- rpc
- src
- src
- ext
- permission
- tests
- torus0
- api
- src
- rpc
- src
- src
- tests
- runtime
- src
- configs
- precompiles
- test-utils
- src
- xtask/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
133 files changed
+16560
-4920
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | | - | |
| 20 | + | |
17 | 21 | | |
18 | | - | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | 9 | | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
15 | 22 | | |
16 | 23 | | |
17 | 24 | | |
| |||
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
47 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
48 | 79 | | |
49 | 80 | | |
50 | 81 | | |
51 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
8 | 26 | | |
0 commit comments