Skip to content

Commit

Permalink
feat: add anti alias squatting feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cdummett committed Jan 23, 2024
1 parent 9cb45b6 commit 6c3f548
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions protocol/0088-PPRF-party_profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@ If an alias is specified, it must adhere to the following rules:
**Note:**
In order to validate uniqueness of an alias, core must keep a record of the aliases associated with each party. If a party is no longer active.

### Alias Squatting

To prevent alias squatting the network will track the number of consecutive epochs each party has funds totalling less than `spam.protection.updatePartyProfile.min.funds` (quantum) across all their accounts.

If the number of consecutive epochs is greater than or equal to `spam.protection.updatePartyProfile.maxInactiveEpochs` the network will no longer associate the alias and metadata with the key.

### Acceptance Criteria

- If a party updates there profile with an alias of a length greater than 32 characters, the transaction is rejected. (<a name="0088-PPRF-001" href="#0088-PPRF-001">0088-PPRF-001</a>)
- If a party updates there profile with an alias which is already associated with another key, the transaction is rejected. (<a name="0088-PPRF-002" href="#0088-PPRF-002">0088-PPRF-002</a>)
- If a party update there profile with metadata with more then 10 key pairs, the transaction is rejected. (<a name="0088-PPRF-003" href="#0088-PPRF-003">0088-PPRF-003</a>)
- If a party update there profile with metadata with a key of a length more than 33 characters, the transaction is rejected. (<a name="0088-PPRF-004" href="#0088-PPRF-004">0088-PPRF-004</a>)
- If a party update there profile with metadata with a value of a length more than 256 characters, the transaction is rejected. (<a name="0088-PPRF-005" href="#0088-PPRF-005">0088-PPRF-005</a>)
- If a parties balance across all accounts is less than `spam.protection.updatePartyProfile.min.funds` for `spam.protection.updatePartyProfile.maxInactiveEpochs` consecutive epochs, then the network no longer stores their alias and it becomes available to any other party. (<a name="0088-PPRF-006" href="#0088-PPRF-006">0088-PPRF-006</a>).
1 change: 1 addition & 0 deletions protocol/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"0088-PPRF-003",
"0088-PPRF-004",
"0088-PPRF-005",
"0088-PPRF-006",
"0062-SPAM-037",
"0062-SPAM-038",
"0062-SPAM-039"
Expand Down

0 comments on commit 6c3f548

Please sign in to comment.