-
Notifications
You must be signed in to change notification settings - Fork 267
Update multi-signatures.md #589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GordonLtron
wants to merge
1
commit into
tronprotocol:master
Choose a base branch
from
GordonLtron:Account-Permission-Management
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Account Permission Management | ||
|
|
||
| The TRON network supports fine-grained control of account permissions. By configuring permissions (owner, witness, active), joint control of accounts, secure delegation, and functional permission separation can be achieved. The following document details the account permission model, contract structure, configuration methods, and common interface calls. | ||
| The TRON network supports Hierarchical Role-Based Access Control (RBAC) of account permissions. By configuring permissions (owner, witness, active), joint control of accounts, secure delegation, and functional permission separation can be achieved. The following document details the account permission model, contract structure, configuration methods, and common interface calls. | ||
|
|
||
|
|
||
|
|
||
|
|
@@ -73,7 +73,7 @@ Explanation: | |
| - `id`: Permission ID, automatically assigned by the system. | ||
| - `owner` = 0, `witness` = 1, `active` starts from 2 and increments. | ||
| - `permission_name`: Permission name, maximum 32 bytes. | ||
| - `threshold`: Permission threshold, operation is allowed only when the combined weight of the signing key ≥ this value. | ||
| - `threshold`: The operation is authorized only when the cumulative weight of valid signatures meets or exceeds the defined threshold. | ||
| - `operations`: Used only for Active permissions, specifies executable contract types. | ||
| - `keys`: Addresses and weights with this permission (up to 5). | ||
|
|
||
|
|
@@ -100,8 +100,9 @@ message AccountPermissionUpdateContract { | |
| } | ||
| ``` | ||
|
|
||
| - This contract is used to **update all account permission structures at once**. | ||
| - This contract is used to **update all account permission structures at once**, which is an "all-or-nothing" update. Even if modifying a single permission, the full permission set must be resubmitted to prevent accidental loss of access. | ||
| - Even if only one permission is modified, all other existing permissions must be fully specified in the contract. | ||
| - `AccountPermissionUpdateContract` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An extra line? |
||
|
|
||
| ### 5. Contract Type Enumeration: `ContractType` | ||
|
|
||
|
|
@@ -204,7 +205,7 @@ localwitness = [ | |
| - Permission IDs start from 2 and increment. | ||
| - When creating an account by default, one `active` permission is generated, with a default threshold of 1, containing only the account's own address. | ||
|
|
||
| ## Operation Fees | ||
| ## Fees and Constraints | ||
|
|
||
| | Operation | Fee Standard | | ||
| | -------------------------- | ------------ | | ||
|
|
@@ -260,7 +261,7 @@ POST http://{{host}}:{{port}}/wallet/accountpermissionupdate | |
|
|
||
| ### 2. Operations Value Calculation Example | ||
|
|
||
| `operations` is a 32-byte hexadecimal string (little-endian) representing executable contract permissions. | ||
| `operations` field is a 32-byte bitmask where each bit represents a specific `ContractType` , defining the functional scope of an Active permission. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest keeping the little-endian information. |
||
| The following Java example generates permissions for contracts (ID=0-45): | ||
|
|
||
| ``` | ||
|
|
@@ -278,7 +279,7 @@ System.out.println(ByteArray.toHexString(operations)); | |
| 2. Set `Permission_id` (default is 0, i.e., `owner` permission). | ||
| 3. User A signs and forwards to B. | ||
| 4. User B signs and forwards to C. | ||
| 5. ... | ||
| 5. (Under Asynchronous Multi-Sig Orchestration,transactions can be partially signed and passed between authorized parties until the threshold is met.) | ||
| 6. The last user signs and broadcasts. | ||
| 7. The node verifies if the total signature weight ≥ `threshold`; if yes, accepts the transaction. | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is recommended to stick with the original description; RBAC might not be entirely accurate for TRON.