File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -425,7 +425,18 @@ interface IHub is IBatchedMulticall {
425425 /// @param credits Array of credit journal entries
426426 function updateJournal (PoolId poolId , JournalEntry[] memory debits , JournalEntry[] memory credits ) external payable ;
427427
428- /// @notice Set adapters for a pool in another chain
428+ /// @notice Set adapters for a pool in another chain.
429+ /// @dev Changing adapters increments the session ID, which invalidates any messages that were sent
430+ /// before the update but not yet delivered. To avoid failed deliveries, block outgoing messages on all
431+ /// affected chains before calling this function, and unblock after the new configuration has been delivered:
432+ ///
433+ /// 1. Grant gateway manager role on each affected chain via `updateGatewayManager`
434+ /// 2. Call `gateway.blockOutgoing(canSend=false)` on each affected chain to pause outgoing messages
435+ /// 3. Wait for all pending message deliveries to complete
436+ /// 4. Call `setAdapters` with the new configuration
437+ /// 5. Wait for the adapter update to be delivered
438+ /// 6. Call `gateway.blockOutgoing(canSend=true)` on each affected chain to resume
439+ ///
429440 /// @param poolId Pool associated to this configuration
430441 /// @param centrifugeId Chain where to perform the adapter configuration
431442 /// @param localAdapters Adapter addresses in this chain
Original file line number Diff line number Diff line change @@ -119,7 +119,9 @@ interface IGateway is IMessageHandler, IRecoverable {
119119 /// @param canManage If enabled as manager
120120 function updateManager (PoolId poolId , address who , bool canManage ) external ;
121121
122- /// @notice Indicates if the gateway for a determined pool can send messages or not
122+ /// @notice Block or unblock outgoing messages for a pool on a specific chain.
123+ /// @dev Used during adapter migrations to ensure no messages are in-flight while the adapter
124+ /// configuration is being updated. See `IHub.setAdapters` for the full procedure.
123125 /// @param centrifugeId Centrifuge ID associated to this block
124126 /// @param poolId PoolId associated to this block
125127 /// @param canSend If can send messages or not
You can’t perform that action at this time.
0 commit comments