chainflip-io / chainflip-backend

The Chainflip backend repo, including the Chainflip Node and CFE.
52 stars 15 forks source link

Feat: Boost Support for Vault Swaps #5437

Open msgmaxim opened 1 week ago

msgmaxim commented 1 week ago

Pull Request

Closes: PRO-1753

Summary

Edit: I might need to check unit-tests/bouncer tests to see why they fail, but otherwise this PR should be read for review.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 82.06278% with 120 lines in your changes missing coverage. Please review.

Project coverage is 72%. Comparing base (0e02876) to head (92d1953).

Files with missing lines Patch % Lines
state-chain/pallets/cf-ingress-egress/src/lib.rs 92% 29 Missing and 4 partials :warning:
engine/src/witness/eth.rs 0% 27 Missing :warning:
engine/src/witness/arb.rs 0% 26 Missing :warning:
engine/src/witness/evm/vault.rs 0% 20 Missing :warning:
engine/src/witness/btc/deposits.rs 0% 13 Missing :warning:
state-chain/chains/src/lib.rs 80% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5437 +/- ## ====================================== - Coverage 72% 72% -0% ====================================== Files 490 490 Lines 87000 87188 +188 Branches 87000 87188 +188 ====================================== + Hits 62410 62517 +107 - Misses 21640 21739 +99 + Partials 2950 2932 -18 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

albert-llimos commented 1 week ago

channel_id is not needed and actually makes no sense outside of Bitcoin, as the premise of Vault swaps is to not need a channel. Therefore passing a channel_id as a mandatory parameter to vault_swap_request and arbitrarily hardcoding that to zero for other chains seems misleading to me. It could even be just wrong for chains were channels are reused as we could currently be using that channel. I'd suggest making that an Option. EDIT: Or if we can fit it into DepositDetails or some other parameter that could make sense.