Skip to content
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

In timeout processing, account for moving channel state to flush complete #4262

Closed
2 of 5 tasks
colin-axner opened this issue Aug 2, 2023 · 0 comments
Closed
2 of 5 tasks
Assignees
Labels
channel-upgradability Channel upgradability feature

Comments

@colin-axner
Copy link
Contributor

Summary

Requires:

Add the following spec changes to TimeoutExecuted function in 04-channel.

    if channel.state == FLUSHING {
      upgradeTimeout = privateStore.get(counterpartyUpgradeTimeout(portIdentifier, channelIdentifier))
      if upgradeTimeout != nil {
        // counterparty-specified timeout must not have exceeded
        // if it has, then restore the channel and abort upgrade handshake
        if (upgradeTimeout.timeoutHeight != 0 && currentHeight() >= upgradeTimeout.timeoutHeight) ||
            (upgradeTimeout.timeoutTimestamp != 0 && currentTimestamp() >= upgradeTimeout.timeoutTimestamp ) {
                restoreChannel(portIdentifier, channelIdentifier)
        } else if pendingInflightPackets(portIdentifier, channelIdentifier) == nil {
          // if this was the last in-flight packet, then move channel state to FLUSHCOMPLETE
          channel.state = FLUSHCOMPLETE
          publicStore.set(channelPath(portIdentifier, channelIdentifier), channel)
        }
      }
    }

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@colin-axner colin-axner added the channel-upgradability Channel upgradability feature label Aug 2, 2023
@colin-axner colin-axner added this to the 04-channel upgrades alpha milestone Aug 2, 2023
@crodriguezvega crodriguezvega moved this to Todo in ibc-go Aug 20, 2023
@chatton chatton self-assigned this Aug 22, 2023
@chatton chatton moved this from Todo to In review in ibc-go Aug 22, 2023
@chatton chatton closed this as completed Aug 24, 2023
@github-project-automation github-project-automation bot moved this from In review to Done in ibc-go Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
channel-upgradability Channel upgradability feature
Projects
Archived in project
Development

No branches or pull requests

2 participants