Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: tainted transaction reporting (#5310)
* feat: Handling of tainted transactions - Extended DepositChannelDetails with owner field - Added extrinsic to mark transaction as tainted - Handling deposit and save details for a refund if tx is tainted * tests: Added tests - Added tests to verify that tainted transactions can get detected for all possible swap types - Added tests to check that txs marked by other brokers are getting ignored * chore: Extended LpRegistration trait + Added to Ingress/Egress config * feat: Getting LP refund address * feature: ensure by lp and broker + added more tests * refactor: Don't error if tx is tainted * refactor: Using DoubleMap instead of Map * refactor: Using BadOrigin + Added unit test * refactor: Inline code + Add Deposit Witness to struct * refactor: Extended lp deposit with refund address - Taking refund address if we open a deposit channel as lp - Extended ChannelAction to take an optional refund address - Removed all dependencies regarding the LpRegistration trait (added last commit) - Refactored tests, benchmarks, etc * feature: Added benchmark * chore: Changes to benchmark * chore: generated mock weights * chore: only allow mark transactions for BTC * feature: expire tainted transaction * test: refactored tests * chore: Removed unused events * chore: Ensure only by broker * chore: removed broker from tainted tx struct * chore: Only clone owner * chore: Moved tx tainted check * feature: Added migration for DepositChannelLookup * refactor: Changed data structure + fixed migrations * chore: Handle LP refund address as requirement * chore: Made clippy happy 🙂 * chore: don't manipulate storage in place in iteration 🙅♂️ * test: Added migration test 🧪 * chore: changed pallet storage version 📀 * chore: bumped pallet storage version (again) * refactor: Changed accounting of expired transactions * refactor: using translate for migration * refactor: using append, refactored test * feature: Added handling of boost channels * feature: Marking txs when prewitness and reject when we process the depo * feat: pre-witnessed rejection handling * chore: Fixed logic + added tests * tests: Refactor/Rearranged tests * chore: Using SECONDS_PER_BLOCK instead of static block seconds * chore: Addressed comments * chore: Fixed clippy in CI * chore: update comments * fix: don't allow report overwrite * chore: Renamed event * feat: improvements: - mark boosted transactions as boosted instead of using channel status - allow pallet config instead of relying on chain - add event for tx reports - only allow reporting of unseen transactions - add doc comments - renaming of types/events - remove unused error * fix: migration * fix: made clippy happy --------- Co-authored-by: Daniel <daniel@chainflip.io> Co-authored-by: Maxim Shishmarev <maxim@chainflip.io>
- Loading branch information