Skip to content

Commit

Permalink
manual execution
Browse files Browse the repository at this point in the history
  • Loading branch information
aelmanaa committed Jan 16, 2024
1 parent 3f2e312 commit ddd8a52
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 23 deletions.
4 changes: 4 additions & 0 deletions src/config/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,10 @@ export const SIDEBAR: Partial<Record<Sections, SectionEntry[]>> = {
title: "Architecture",
url: "ccip/architecture",
},
{
title: "Manual Execution",
url: "ccip/concepts/manual-execution",
},
{
title: "Best Practices",
url: "ccip/best-practices",
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions src/content/ccip/concepts/manual-execution.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
section: ccip
date: Last Modified
title: "CCIP Manual Execution"
whatsnext: { "Learn CCIP best practices": "/ccip/best-practices" }
---

CCIP messages are eligible for manual execution if either of these conditions is met: if the execution on the receiver contract failed or the CCIP message timed out (the current timeout is set at 8 hours). The latter scenario might occur in extreme network congestion, where CCIP cannot deliver the message within the specified time frame. Consider the following important points:

- Ineffectiveness of Manual Execution for Business Logic Errors: If the failure is due to a flaw in the receiver contract's business logic, manual execution will not rectify the issue. In our example, the failure is attributed to an insufficient gas limit for message delivery. Therefore, increasing the gas limit would allow for successful manual execution of the message delivery.
- Decoupling CCIP Message Reception and Business Logic: We advise separating the reception of CCIP messages from the core business logic of the contract. Implementing 'escape hatches' or fallback mechanisms is recommended to gracefully manage situations where the business logic encounters issues. To explore this concept further, refer to the [Defensive example](/ccip/tutorials/programmable-token-transfers-defensive).
- Manual Execution by Any Account: Any account can manually execute a CCIP message that is eligible for manual execution, but the executing account must have sufficient native gas tokens (such as ETH on Ethereum or MATIC on Polygon) to cover the gas costs associated with the delivery of the CCIP message.
- Batching Support: In cases where a single transaction includes multiple CCIP messages, the system provides a convenient batching feature. This allows you to manually execute all failed CCIP messages within the transaction collectively rather than addressing each one individually.
- Time Limitations in CCIP Explorer: Currently, the [CCIP explorer](https://ccip.chain.link/) does not support the manual execution of CCIP messages older than 48 hours. Please get in touch with us for assistance if you need to manually execute messages older than 48 hours on mainnets.
2 changes: 1 addition & 1 deletion src/content/ccip/service-limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ import { Aside } from "@components"
| Maximum&nbsp;message&nbsp;`data`&nbsp;length | `data` payload sent within the [CCIP message](/ccip/api-reference/client#evm2anymessage) | 50&nbsp;kilobytes |
| Message&nbsp;Gas&nbsp;Limit | User specified [gas limit](/ccip/api-reference/client#evmextraargsv1) | 2,000,000 |
| Maximum&nbsp;number&nbsp;of&nbsp;tokens | Maximum number of distinct tokens a user can transfer in a single transaction | 1 |
| Timeout | Maximum duration for the execution of a [CCIP message](/ccip/api-reference/client#evm2anymessage) | 24 hours |
| Timeout | Maximum duration for the execution of a [CCIP message](/ccip/api-reference/client#evm2anymessage) | 8 hours |
22 changes: 0 additions & 22 deletions src/content/ccip/tutorials/manual-execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,6 @@ This tutorial is similar to the [programmable token transfers example](/ccip/tut
1. Manual Execution via CCIP Explorer: Using the [CCIP explorer](https://ccip.chain.link/), you will override the previously set gas limit and retry the execution. This process is referred to as _manual execution_.
1. Confirm Successful Execution: After manually executing the transaction with an adequate gas limit, you'll see that the status of your CCIP message is updated to successful. This indicates that the tokens and data were correctly transferred to the receiver contract.

<Aside type="note" title="Note on manual execution">
CCIP messages are eligible for manual execution if either of these conditions is met: if the execution on the receiver contract failed or the CCIP message timed out (the current timeout is set at 24 hours). The latter scenario might occur in extreme network congestion, where CCIP cannot deliver the message within the specified time frame. Consider the following important points:

- Ineffectiveness of Manual Execution for Business Logic Errors: If the failure is due to a flaw in the receiver contract's business logic, manual execution will not rectify the issue. In our example, the failure is attributed to an insufficient gas limit for message delivery. Therefore, increasing the gas limit would allow for successful manual execution of the message delivery.
- Decoupling CCIP Message Reception and Business Logic: We advise separating the reception of CCIP messages from the core business logic of the contract. Implementing 'escape hatches' or fallback mechanisms is recommended to gracefully manage situations where the business logic encounters issues. To explore this concept further, refer to the [Defensive example](/ccip/tutorials/programmable-token-transfers-defensive).
- Manual Execution by Any Account: Any account can manually execute a CCIP message that is eligible for manual execution, but the executing account must have sufficient native gas tokens (such as ETH on Ethereum or MATIC on Polygon) to cover the gas costs associated with the delivery of the CCIP message.
- Batching Support: In cases where a single transaction includes multiple CCIP messages, the system provides a convenient batching feature. This allows you to manually execute all failed CCIP messages within the transaction collectively rather than addressing each one individually.
- Time Limitations in CCIP Explorer: Currently, the [CCIP explorer](https://ccip.chain.link/) does not support the manual execution of CCIP messages older than 48 hours. Please get in touch with us for assistance if you need to manually execute messages older than 48 hours on mainnets.

</Aside>

<Aside type="note" title="Node Operator Rewards">
CCIP rewards the oracle node and Risk Management node operators in LINK.
</Aside>

<Aside type="caution" title="Transferring tokens">
This tutorial uses the term "transferring tokens" even though the tokens are not technically transferred. Instead,
they are locked or burned on the source chain and then unlocked or minted on the destination chain. Read the [Token
Pools](/ccip/architecture#token-pools) section to understand the various mechanisms that are used to transfer value
across chains.
</Aside>

## Before you begin

1. You should understand how to write, compile, deploy, and fund a smart contract. If you need to brush up on the basics, read this [tutorial](/quickstarts/deploy-your-first-contract), which will guide you through using the [Solidity programming language](https://soliditylang.org/), interacting with the [MetaMask wallet](https://metamask.io) and working within the [Remix Development Environment](https://remix.ethereum.org/).
Expand Down

0 comments on commit ddd8a52

Please sign in to comment.