From 002f4dc11b3476654cb765a5a5c9896f7994c821 Mon Sep 17 00:00:00 2001 From: gordsport Date: Tue, 6 Feb 2024 10:31:42 +0000 Subject: [PATCH 1/5] chore: add update team spam ACs Adds in ACs for also updating referral sets / teams and spam protection --- protocol/0062-SPAM-spam_protection.md | 2 ++ protocol/features.json | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/protocol/0062-SPAM-spam_protection.md b/protocol/0062-SPAM-spam_protection.md index a9a5da152..63f338749 100644 --- a/protocol/0062-SPAM-spam_protection.md +++ b/protocol/0062-SPAM-spam_protection.md @@ -122,6 +122,8 @@ 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 (0062-SPAM-031). - 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 (0062-SPAM-036). - 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. (0062-SPAM-037). +- A party holding less than spam.protection.referralProgram.min.funds x quantum should have any UpdateReferralSettransactions pre-block rejected (0062-SPAM-040). +- A party holding no less than spam.protection.referralProgram.min.funds x quantum and staking no less than referralProgram.minStakedVegaTokensshould not have any UpdateReferralSettransactions pre-block rejected (0062-SPAM-041). - 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 (0062-SPAM-038). - 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 (0062-SPAM-039). diff --git a/protocol/features.json b/protocol/features.json index 9d42b9c14..198990594 100644 --- a/protocol/features.json +++ b/protocol/features.json @@ -54,9 +54,12 @@ "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" ] }, "Fixed size amendments": { From 2cf003c5a090b6acd170a60cb677bac022bb9f26 Mon Sep 17 00:00:00 2001 From: gordsport Date: Tue, 6 Feb 2024 10:35:33 +0000 Subject: [PATCH 2/5] fix: spelling --- protocol/0062-SPAM-spam_protection.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/0062-SPAM-spam_protection.md b/protocol/0062-SPAM-spam_protection.md index 63f338749..90d1fdbc4 100644 --- a/protocol/0062-SPAM-spam_protection.md +++ b/protocol/0062-SPAM-spam_protection.md @@ -122,8 +122,8 @@ 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 (0062-SPAM-031). - 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 (0062-SPAM-036). - 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. (0062-SPAM-037). -- A party holding less than spam.protection.referralProgram.min.funds x quantum should have any UpdateReferralSettransactions pre-block rejected (0062-SPAM-040). -- A party holding no less than spam.protection.referralProgram.min.funds x quantum and staking no less than referralProgram.minStakedVegaTokensshould not have any UpdateReferralSettransactions pre-block rejected (0062-SPAM-041). +- A party holding less than `spam.protection.referralProgram.min.funds` x quantum should have any `UpdateReferralSettransactions` pre-block rejected (0062-SPAM-040). +- A party holding no less than `spam.protection.referralProgram.min.funds` x quantum and staking no less than `referralProgram.minStakedVegaTokens` should not have any `UpdateReferralSettransactions` pre-block rejected (0062-SPAM-041). - 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 (0062-SPAM-038). - 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 (0062-SPAM-039). From ae2c54b6ceea057e0f20fbd77c0b3b1b34da2847 Mon Sep 17 00:00:00 2001 From: Gordsport <83510148+gordsport@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:46:24 +0000 Subject: [PATCH 3/5] chore: Update protocol/0062-SPAM-spam_protection.md Co-authored-by: Jiajia-Cui <92106936+Jiajia-Cui@users.noreply.github.com> --- protocol/0062-SPAM-spam_protection.md | 1 + 1 file changed, 1 insertion(+) diff --git a/protocol/0062-SPAM-spam_protection.md b/protocol/0062-SPAM-spam_protection.md index 90d1fdbc4..195d8bb4c 100644 --- a/protocol/0062-SPAM-spam_protection.md +++ b/protocol/0062-SPAM-spam_protection.md @@ -122,6 +122,7 @@ 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 (0062-SPAM-031). - 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 (0062-SPAM-036). - 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. (0062-SPAM-037). +- A party holding 2 assets, and each of the assets are less than `spam.protection.referralProgram.min.funds` x quantum, but the sum of the 2 assets are greater than `spam.protection.referralProgram.min.funds` x quantum, then the party should not have any `UpdateReferralSettransactions` pre-block rejected (0062-SPAM-042). - A party holding less than `spam.protection.referralProgram.min.funds` x quantum should have any `UpdateReferralSettransactions` pre-block rejected (0062-SPAM-040). - A party holding no less than `spam.protection.referralProgram.min.funds` x quantum and staking no less than `referralProgram.minStakedVegaTokens` should not have any `UpdateReferralSettransactions` pre-block rejected (0062-SPAM-041). - 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 (0062-SPAM-038). From 4c118471c97a575b19fb2edb557fd64a04eacf8e Mon Sep 17 00:00:00 2001 From: Gordsport <83510148+gordsport@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:46:34 +0000 Subject: [PATCH 4/5] chore: Update protocol/features.json Co-authored-by: Jiajia-Cui <92106936+Jiajia-Cui@users.noreply.github.com> --- protocol/features.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol/features.json b/protocol/features.json index 198990594..3312a49d4 100644 --- a/protocol/features.json +++ b/protocol/features.json @@ -59,7 +59,8 @@ "0062-SPAM-038", "0062-SPAM-039", "0062-SPAM-040", - "0062-SPAM-041" + "0062-SPAM-041", + "0062-SPAM-042" ] }, "Fixed size amendments": { From 87f4cbf8193f69ae22ceb80166791680401f15cb Mon Sep 17 00:00:00 2001 From: gordsport Date: Tue, 6 Feb 2024 10:52:14 +0000 Subject: [PATCH 5/5] fix: net param name --- protocol/0062-SPAM-spam_protection.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protocol/0062-SPAM-spam_protection.md b/protocol/0062-SPAM-spam_protection.md index 195d8bb4c..fd5b559a6 100644 --- a/protocol/0062-SPAM-spam_protection.md +++ b/protocol/0062-SPAM-spam_protection.md @@ -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. (0062-PALAZZO-001) - A party staking less than `referralProgram.minStakedVegaTokens` should have any `CreateReferralSet` transactions **pre-block** rejected (0062-SPAM-026). - A party staking less than `referralProgram.minStakedVegaTokens` should have any `UpdateReferral` transactions **pre-block** rejected (0062-SPAM-027). -- A party holding less than `spam.protection.referralProgram.min.funds x quantum` should have any `CreateReferralSet` transactions **pre-block** rejected (0062-SPAM-033). -- A party holding no less than `spam.protection.referralProgram.min.funds x quantum` should not have any `CreateReferralSet` transactions **pre-block** rejected (0062-SPAM-035). +- A party holding less than `spam.protection.referralSet.min.funds x quantum` should have any `CreateReferralSet` transactions **pre-block** rejected (0062-SPAM-033). +- A party holding no less than `spam.protection.referralSet.min.funds x quantum` should not have any `CreateReferralSet` transactions **pre-block** rejected (0062-SPAM-035). - 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. (0062-SPAM-028). - 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 (0062-SPAM-029). - 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 (0062-SPAM-032). @@ -122,9 +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 (0062-SPAM-031). - 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 (0062-SPAM-036). - 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. (0062-SPAM-037). -- A party holding 2 assets, and each of the assets are less than `spam.protection.referralProgram.min.funds` x quantum, but the sum of the 2 assets are greater than `spam.protection.referralProgram.min.funds` x quantum, then the party should not have any `UpdateReferralSettransactions` pre-block rejected (0062-SPAM-042). +- 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 (0062-SPAM-042). - A party holding less than `spam.protection.referralProgram.min.funds` x quantum should have any `UpdateReferralSettransactions` pre-block rejected (0062-SPAM-040). -- A party holding no less than `spam.protection.referralProgram.min.funds` x quantum and staking no less than `referralProgram.minStakedVegaTokens` should not have any `UpdateReferralSettransactions` pre-block rejected (0062-SPAM-041). +- 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 (0062-SPAM-041). - 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 (0062-SPAM-038). - 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 (0062-SPAM-039).