-
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
feat: Solana CCM fallback #5316
Conversation
The witnessed result is now part of the SolanaElections. On Program execution error, fallback transfer is created. WIP: Add tests and storage migration for SolanaBroadcast and Elections
…lana-ccm * origin/main: chore: update polkadot sdk 1.15.2, rust to 2024-07-31 (#5306) chore: add sol min_prio_fee to ingress and egress estimation (#5323) docs: fix log filtering in readme (#5319) feat: cleanup aborted broadcasts (#5301) fix: increase init timeout for backup test (#5317) feat: minimum chunk size setting (#5314) chore: add egress fee for token account rent (#5315) fix: ensure unused sol deposit channels are closed (#5312)
Clear all egress-success election votes Migrated Broadcaster storage to newer version of ApiCall
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5316 +/- ##
======================================
Coverage 71% 71%
======================================
Files 490 492 +2
Lines 85209 85416 +207
Branches 85209 85416 +207
======================================
+ Hits 60659 60896 +237
+ Misses 21839 21790 -49
- Partials 2711 2730 +19 ☔ View full report in Codecov by Sentry. |
was successful. This ensures call data are cleared in the broadcaster pallet.
…lana-ccm * origin/main: ci: upgrade action version to supress deprecation warnings ⚙️ (#5330) feat: handle rotation tx construction failures (#5307) test(bouncer): add test for new utility (#5324) fix: keyholder check should use `HistoricalActiveEpochs` (#5325) feat: BTC contract swap encoding (#5311)
{ | ||
// Only Ccm calls support fallback. | ||
if let SolanaTransactionType::CcmTransfer { fallback } = ccm_tx.call_type { | ||
SolanaIngressEgress::do_ccm_fallback(broadcast_id, fallback); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we emit some event for the frontend to detect when a ccm transaction has reverted or we can rely on them understanding that when they see a CcmFallbackScheduled
event with a broadcast Id it means that the CCM has reverted even if the egress is succesful? I presume that they use egress success as a proxy for transaction has succeeded. @acdibble
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we have an event emitted when the fallback is triggered:
Event::<T, I>::CcmFallbackScheduled {
broadcast_id,
egress_details,
}
…5328) * fix: don't exit if we can't remove a file that already doesn't exist * Update localnet/common.sh Co-authored-by: anton-chain <anton@chainflip.io> --------- Co-authored-by: anton-chain <anton@chainflip.io>
e47b08a
to
73c973b
Compare
* origin/main: feat: broker can encode btc smart contract call (#5329) chore: localnet recreate script can use defaults (#5338) feat: witnessing btc smart contract swaps (#5331) feat: Solana CCM fallback (#5316) fix: scale types for pending ceremonies (#5286) chore: Prune historical values in Validator pallet (#5292) feat: expose deposit transaction hash from ingress-egress-tracker (#5320) # Conflicts: # Cargo.lock # engine/src/witness/btc/smart_contract.rs
…waps-close-accounts * origin/main: (44 commits) fix: expire all previous epochs (#5279) feat: add/update contract swaps parameters (#5343) chore: add address to solana logging (#5353) fix: ignore dust underflows in order fills rpc (#5352) chore: consistent naming prewitnessed (#5351) feat: engine-runner verifies gpg signature of old dylib when downloaded (#5339) feat: tainted transaction reporting (#5310) bug: change_utxo not always present (#5340) feat: structured error return types for rpcs (#5346) chore: unify dependencies to root cargo.toml (#5333) feat: Submit a slot number alongside nonce (#5297) chore: use node version from `.nvmrc` 📌 (#5336) chore: add engine account_info logging (#5347) chore: replace manual scale encoding for ts-scale (#5335) chore: more consistent params in Broker API (#5342) feat: broker can encode btc smart contract call (#5329) chore: localnet recreate script can use defaults (#5338) feat: witnessing btc smart contract swaps (#5331) feat: Solana CCM fallback (#5316) fix: scale types for pending ceremonies (#5286) ... # Conflicts: # Cargo.lock # state-chain/chains/src/sol/api.rs # state-chain/pallets/cf-broadcast/src/migrations.rs # state-chain/pallets/cf-environment/Cargo.toml
* We can now witness when Solana CCM transaction fails to execute. The witnessed result is now part of the SolanaElections. On Program execution error, fallback transfer is created. WIP: Add tests and storage migration for SolanaBroadcast and Elections * Added integration test for CCM fallback mechanism. * Added storage migration for sol ccm success witnessing. Clear all egress-success election votes Migrated Broadcaster storage to newer version of ApiCall * Corrected Migration in Runtime. * Call SolanaBroadcaster::egress_success() regardless of if call execution was successful. This ensures call data are cleared in the broadcaster pallet. * Commented out a print statement in the unit test * renamed a member field * Fixed bouncer test for Solana CCMs * Fixed bouncer lint * fix: don't exit if we can't remove a file that already doesn't exist (#5328) * fix: don't exit if we can't remove a file that already doesn't exist * Update localnet/common.sh Co-authored-by: anton-chain <anton@chainflip.io> --------- Co-authored-by: anton-chain <anton@chainflip.io> * fix --------- Co-authored-by: Maxim Shishmarev <msgmaxim@gmail.com> Co-authored-by: anton-chain <anton@chainflip.io> Co-authored-by: Daniel <daniel@chainflip.io>
* We can now witness when Solana CCM transaction fails to execute. The witnessed result is now part of the SolanaElections. On Program execution error, fallback transfer is created. WIP: Add tests and storage migration for SolanaBroadcast and Elections * Added integration test for CCM fallback mechanism. * Added storage migration for sol ccm success witnessing. Clear all egress-success election votes Migrated Broadcaster storage to newer version of ApiCall * Corrected Migration in Runtime. * Call SolanaBroadcaster::egress_success() regardless of if call execution was successful. This ensures call data are cleared in the broadcaster pallet. * Commented out a print statement in the unit test * renamed a member field * Fixed bouncer test for Solana CCMs * Fixed bouncer lint * fix: don't exit if we can't remove a file that already doesn't exist (#5328) * fix: don't exit if we can't remove a file that already doesn't exist * Update localnet/common.sh Co-authored-by: anton-chain <anton@chainflip.io> --------- Co-authored-by: anton-chain <anton@chainflip.io> * fix --------- Co-authored-by: Maxim Shishmarev <msgmaxim@gmail.com> Co-authored-by: anton-chain <anton@chainflip.io> Co-authored-by: Daniel <daniel@chainflip.io>
Pull Request
Closes: PRO-1621
Checklist
Please conduct a thorough self-review before opening the PR.
Summary
We can now witness when Solana transactions fail to execute.
The witnessed result is now part of the SolanaElections. On Program execution error, fallback transfer is created for CCMs.
Solana Ccms now require a "fallback" address as part of the cf_params.
Added integration test for the fallback mechanism.
Added storage migration: