Add MaxTipAmount for pallet-tips (#1709)

Last week we experienced a governance attack.
Surprisingly, there was no upper limit on the tip amount.

Due to the mechanism of pallet-fragment-election, the council members
will be refreshed immediately. Attacker is easy to control the council
and give a large tip amount.
This commit is contained in:
Xavier Lau authored and GitHub committed 2023-09-28 21:08:05 +10:00
1 parent b50d8e6f7f
commit de71fecc4e
4 files changed
+34 -1

No files matched your search

+1
View File
@@ -1289,6 +1289,7 @@ impl pallet_tips::Config for Runtime {
type TipCountdown = TipCountdown;
type TipFindersFee = TipFindersFee;
type TipReportDepositBase = TipReportDepositBase;
type MaxTipAmount = ConstU128<{ 500 * DOLLARS }>;
type WeightInfo = pallet_tips::weights::SubstrateWeight<Runtime>;
}