-
Notifications
You must be signed in to change notification settings - Fork 41
IBC Packet Commitment Timeout Mismatch Across Variable Block-Time Chains #138
Copy link
Copy link
Closed
Labels
Complexity: HardcoreIssues requiring deep systems-level engineering rigorIssues requiring deep systems-level engineering rigorGrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSLayer: Core-EngineCore engine layerCore engine layerMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official CampaignOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26Third CampaignCampaign: Third CampaignCampaign: Third CampaignType: Core-ArchitectureCore architecture changeCore architecture changeenhancementNew feature or requestNew feature or request
Description
Activity
Metadata
Metadata
Assignees
Labels
Complexity: HardcoreIssues requiring deep systems-level engineering rigorIssues requiring deep systems-level engineering rigorGrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSLayer: Core-EngineCore engine layerCore engine layerMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official CampaignOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26Third CampaignCampaign: Third CampaignCampaign: Third CampaignType: Core-ArchitectureCore architecture changeCore architecture changeenhancementNew feature or requestNew feature or request
Problem Statement / Feature Objective
The IBC (Inter-Blockchain Communication) packet commitment timeout is calculated using the source chain's block time assumption. When sending packets to a chain with variable block times (e.g., 2-30s range), the timeout can expire prematurely on fast blocks or be excessively long on slow blocks, causing packet loss or settlement delays.
Technical Invariants & Bounds
source_height + (timeout_delta / source_block_time).Codebase Navigation Guide
src/cross-chain/ibc/packet-timeout.rs— timeout calculation.src/cross-chain/ibc/block-time-estimator.rs— block time estimation.src/cross-chain/ibc/packet-relayer.rs— packet relay logic.src/cross-chain/consensus/header-sync.rs— header synchronization.Implementation Blueprint
block-time-estimator.rs, maintain an exponential moving average (EMA) of block times with alpha = 0.3 over 100 blocks; also track the 95th percentile.packet-timeout.rs, compute timeout assource_height + ceil(timeout_delta / p95_block_time_ms)instead of using a fixed value.packet-relayer.rs, emit aPacketTimeoutMisestimationevent when a packet times out but the destination chain is still at or below the estimated timeout height.