Skip to content

XCM: Transactional Processing #490

Closed
paritytech/polkadot
#6951
@gavofyork

Description

@gavofyork

For XCM instructions which are unable to avoid any state changes on an error, use a storage transaction to ensure that changes are rolled back in the case of an error after changes have been made. Instructions which need this are:

  • WithdrawAsset
  • ReserveAssetDeposited
  • TransferAsset
  • TransferReserveAsset
  • ReceiveTeleportedAsset
  • DepositAsset
  • DepositReserveAsset
  • InitiateReserveWithdraw
  • InitiateTeleport
  • BuyExecution
  • ClaimAsset
  • ExportMessage
  • LockAsset
  • UnlockAsset
  • RequestUnlock

Each should have their implementations in XcmExecutor::process_instruction be wrapped in a storage transaction which reverts any changes in case an Err value is returned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I5-enhancementAn additional feature request.T6-XCMThis PR/Issue is related to XCM.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions