Skip to content

Commit

Permalink
chore: add update team spam ACs (#2159)
Browse files Browse the repository at this point in the history
* chore: add update team spam ACs

Adds in ACs for also updating referral sets / teams and spam protection

* fix: spelling

* chore: Update protocol/0062-SPAM-spam_protection.md

Co-authored-by: Jiajia-Cui <92106936+Jiajia-Cui@users.noreply.github.com>

* chore: Update protocol/features.json

Co-authored-by: Jiajia-Cui <92106936+Jiajia-Cui@users.noreply.github.com>

* fix: net param name

---------

Co-authored-by: Jiajia-Cui <92106936+Jiajia-Cui@users.noreply.github.com>
  • Loading branch information
gordsport and Jiajia-Cui committed Feb 6, 2024
1 parent ef7ec48 commit f889c67
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions protocol/0062-SPAM-spam_protection.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ More than 360 delegation changes in one epoch (or, respectively, the value of `s
- Issue a valid withdrawal bundle. Increase `spam.protection.minimumWithdrawalQuantumMultiple` to a value that would no longer allow the creation of the bundle. Ask for the bundle to be re-issued and verify that it's not rejected. (<a name="0062-PALAZZO-001" href="#0062-PALAZZO-001">0062-PALAZZO-001</a>)
- A party staking less than `referralProgram.minStakedVegaTokens` should have any `CreateReferralSet` transactions **pre-block** rejected (<a name="0062-SPAM-026" href="#0062-SPAM-026">0062-SPAM-026</a>).
- A party staking less than `referralProgram.minStakedVegaTokens` should have any `UpdateReferral` transactions **pre-block** rejected (<a name="0062-SPAM-027" href="#0062-SPAM-027">0062-SPAM-027</a>).
- A party holding less than `spam.protection.referralProgram.min.funds x quantum` should have any `CreateReferralSet` transactions **pre-block** rejected (<a name="0062-SPAM-033" href="#0062-SPAM-033">0062-SPAM-033</a>).
- A party holding no less than `spam.protection.referralProgram.min.funds x quantum` should not have any `CreateReferralSet` transactions **pre-block** rejected (<a name="0062-SPAM-035" href="#0062-SPAM-035">0062-SPAM-035</a>).
- A party holding less than `spam.protection.referralSet.min.funds x quantum` should have any `CreateReferralSet` transactions **pre-block** rejected (<a name="0062-SPAM-033" href="#0062-SPAM-033">0062-SPAM-033</a>).
- A party holding no less than `spam.protection.referralSet.min.funds x quantum` should not have any `CreateReferralSet` transactions **pre-block** rejected (<a name="0062-SPAM-035" href="#0062-SPAM-035">0062-SPAM-035</a>).
- Given longer than `spam.protection.balanceSnapshotFrequency` has elapsed since a party deposited or transferred funds, a party who has less then `spam.protection.applyReferral.min.funds` in their accounts should have any `ApplyReferralCode` transactions **pre-block** rejected. All assets count towards this threshold and balances should be scaled appropriately by the assets quantum. (<a name="0062-SPAM-028" href="#0062-SPAM-028">0062-SPAM-028</a>).
- A party who has submitted strictly more than `spam.protection.max.CreateReferralSet` `CreateReferralSet` transactions in an epoch should have any future `CreateReferralSet` transactions in that epoch **pre-block** rejected (<a name="0062-SPAM-029" href="#0062-SPAM-029">0062-SPAM-029</a>).
- A party who has submitted more than `spam.protection.max.CreateReferralSet` transactions in the current epoch plus in the current block, should have their transactions submitted in the current block **pre-block** rejected (<a name="0062-SPAM-032" href="#0062-SPAM-032">0062-SPAM-032</a>).
Expand All @@ -122,6 +122,9 @@ More than 360 delegation changes in one epoch (or, respectively, the value of `s
- A party who has submitted strictly more than `spam.protection.max.applyReferralCode` `ApplyReferralCode` transactions in an epoch should have any future `ApplyReferralCode` transactions in that epoch **pre-block** rejected (<a name="0062-SPAM-031" href="#0062-SPAM-031">0062-SPAM-031</a>).
- A party who has submitted more than `spam.protection.max.applyReferralCode` transactions in the current epoch plus in the current block, should have their transactions submitted in the current block **pre-block** rejected (<a name="0062-SPAM-036" href="#0062-SPAM-036">0062-SPAM-036</a>).
- Given longer than `spam.protection.balanceSnapshotFrequency` has elapsed since a party deposited or transferred funds, a party who has less then `spam.protection.updatePartyProfile.min.funds` in their accounts should have any `UpdatePartyProfile` transactions **pre-block** rejected. All assets count towards this threshold and balances should be scaled appropriately by the assets quantum. (<a name="0062-SPAM-037" href="#0062-SPAM-037">0062-SPAM-037</a>).
- A party holding 2 assets, and each of the assets are less than `spam.protection.referralSet.min.funds` x quantum, but the sum of the 2 assets are greater than `spam.protection.referralSet.min.funds` x quantum, then the party should not have any `UpdateReferralSettransactions` pre-block rejected (<a name="0062-SPAM-042" href="#0062-SPAM-042">0062-SPAM-042</a>).
- A party holding less than `spam.protection.referralProgram.min.funds` x quantum should have any `UpdateReferralSettransactions` pre-block rejected (<a name="0062-SPAM-040" href="#0062-SPAM-040">0062-SPAM-040</a>).
- A party holding no less than `spam.protection.referralSet.min.funds` x quantum and staking no less than `referralProgram.minStakedVegaTokens` should not have any `UpdateReferralSettransactions` pre-block rejected (<a name="0062-SPAM-041" href="#0062-SPAM-041">0062-SPAM-041</a>).
- A party who has submitted strictly more than `spam.protection.max.updatePartyProfile` `UpdatePartyProfile` transactions in an epoch should have any future `UpdatePartyProfile` transactions in that epoch **pre-block** rejected (<a name="0062-SPAM-038" href="#0062-SPAM-038">0062-SPAM-038</a>).
- A party who has submitted more than `spam.protection.max.updatePartyProfile` `UpdatePartyProfile` transactions in the current epoch plus in the current block, should have their `UpdatePartyProfile` transactions submitted in the current block **pre-block** rejected (<a name="0062-SPAM-039" href="#0062-SPAM-039">0062-SPAM-039</a>).

Expand Down
6 changes: 5 additions & 1 deletion protocol/features.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@
"0088-PPRF-005",
"0062-SPAM-033",
"0062-SPAM-035",
"0062-SPAM-036",
"0062-SPAM-037",
"0062-SPAM-038",
"0062-SPAM-039"
"0062-SPAM-039",
"0062-SPAM-040",
"0062-SPAM-041",
"0062-SPAM-042"
]
},
"Fixed size amendments": {
Expand Down

0 comments on commit f889c67

Please sign in to comment.