-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/PRO-1712/reject-tx #5332
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Extended DepositChannelDetails with owner field - Added extrinsic to mark transaction as tainted - Handling deposit and save details for a refund if tx is tainted
- 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
- 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
This reverts commit 67873ff.
- Removed not needed derives - Clippy
msgmaxim
reviewed
Oct 28, 2024
dandanlen
reviewed
Oct 28, 2024
dandanlen
reviewed
Oct 28, 2024
- use Utxo and remove BtcDepositDetails - use saturating_sub for egress fee subtraction - use ChainAccount instead of ForeignChainAddress in RejectCall - simplify definitions of RejectCall using default method
4 tasks
dandanlen
approved these changes
Oct 29, 2024
dandanlen
added a commit
that referenced
this pull request
Oct 31, 2024
* 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: Added POC for BTC swap rejecting. * chore: only allow mark transactions for BTC * feature: expire tainted transaction * test: refactored tests * chore: Extended RejectCall with DepositWitness * Revert "chore: Extended RejectCall with DepositWitness" This reverts commit 67873ff. * chore: added draft for eth refund implementation * 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) * chore: using ScheduledTxForReject for refunding * 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 * chore: removed not needed RefundParameters, added test * refactor: Rejecting - Changed trait - Refactor AllBatch build - LogOrPanic if reject failed and safe details * chore: fix compiler errors * chore: subtract fees * fix: using deposit address * fix: addressed problems - Introduced NoChangeTransfer ApiCall - Fire event when tx was broadcasted - Handle on_broadcast_ready with no-op * chore: small improvements - Removed not needed derives - Clippy * wip: change depositDetails for btc to utxo * Revert "wip: change depositDetails for btc to utxo" This reverts commit 55de221. * refactor: added current status of tx_id refactor * tests: Moved screening feature tests to own file and test against btc * refactor: - Fire event if we can not reject tx - Split amount and fees in trait - Fix UTXO construct * chore: rearranged imports * refactors: - use Utxo and remove BtcDepositDetails - use saturating_sub for egress fee subtraction - use ChainAccount instead of ForeignChainAddress in RejectCall - simplify definitions of RejectCall using default method --------- Co-authored-by: Daniel <daniel@chainflip.io> Co-authored-by: Maxim Shishmarev <maxim@chainflip.io>
dandanlen
added a commit
that referenced
this pull request
Oct 31, 2024
* 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: Added POC for BTC swap rejecting. * chore: only allow mark transactions for BTC * feature: expire tainted transaction * test: refactored tests * chore: Extended RejectCall with DepositWitness * Revert "chore: Extended RejectCall with DepositWitness" This reverts commit 67873ff. * chore: added draft for eth refund implementation * 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) * chore: using ScheduledTxForReject for refunding * 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 * chore: removed not needed RefundParameters, added test * refactor: Rejecting - Changed trait - Refactor AllBatch build - LogOrPanic if reject failed and safe details * chore: fix compiler errors * chore: subtract fees * fix: using deposit address * fix: addressed problems - Introduced NoChangeTransfer ApiCall - Fire event when tx was broadcasted - Handle on_broadcast_ready with no-op * chore: small improvements - Removed not needed derives - Clippy * wip: change depositDetails for btc to utxo * Revert "wip: change depositDetails for btc to utxo" This reverts commit 55de221. * refactor: added current status of tx_id refactor * tests: Moved screening feature tests to own file and test against btc * refactor: - Fire event if we can not reject tx - Split amount and fees in trait - Fix UTXO construct * chore: rearranged imports * refactors: - use Utxo and remove BtcDepositDetails - use saturating_sub for egress fee subtraction - use ChainAccount instead of ForeignChainAddress in RejectCall - simplify definitions of RejectCall using default method --------- Co-authored-by: Daniel <daniel@chainflip.io> Co-authored-by: Maxim Shishmarev <maxim@chainflip.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Closes: PRO-1712
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
Please include a succinct description of the purpose and content of the PR. What problem does it solve, and how? Link issues, discussions, other PRs, and anything else that will help the reviewer.
Non-Breaking changes
If this PR includes non-breaking changes, select the
non-breaking
label. On merge, CI will automatically cherry-pick the commit to a PR against the release branch.