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

Add VerifyChannelUpgradeError and VerifyChannelUpgradeErrorAbsence methods to 03-connection #1609

Closed
5 tasks
damiannolan opened this issue Jun 29, 2022 · 1 comment

Comments

@damiannolan
Copy link
Member

damiannolan commented Jun 29, 2022

Summary

The UpgradeErrorPath MUST have an associated verification membership and non-membership function so that a counterparty may verify that chain has stored an empty or non-empty error in the UpgradeErrorPath.

Using the existing state verification keeper functions in 03-connection for reference:

  • VerifyChannelUpgradeError

  • Retrieve the ClientState and associated store using the provided connectionEnd

    • An error should be returned if the ClientState cannot be found
    • An error should be returned if the ClientState is inactive
  • Construct the MerklePath using the UpgradeErrorPath defined in 24-host

  • Invoke VerifyMembership using the associated ClientState

func (k Keeper) VerifyChannelUpgradeError(
	ctx sdk.Context,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
        errorReceipt channeltypes.ErrorReceipt,
) error {
        return nil
}

  • VerifyChannelUpgradeErrorAbsence

  • Retrieve the ClientState and associated store using the provided connectionEnd

    • An error should be returned if the ClientState cannot be found
    • An error should be returned if the ClientState is inactive
  • Construct the MerklePath using the UpgradeErrorPath defined in 24-host

  • Invoke VerifyNonMembership using the associated ClientState

func (k Keeper) VerifyChannelUpgradeErrorAbsence(
	ctx sdk.Context,
	connection exported.ConnectionI,
	height exported.Height,
	proof []byte,
	portID,
	channelID string,
) error {
        return nil
}

Ref: https://github.com/cosmos/ibc/blob/master/spec/core/ics-004-channel-and-packet-semantics/UPGRADES.md#UpgradeError-Path


Note the ClientState interface will contain a generic VerifyMembership method following the completion of:


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@damiannolan damiannolan added this to the 04-channel upgrades alpha milestone Jun 29, 2022
@damiannolan damiannolan self-assigned this Jun 29, 2022
@damiannolan damiannolan mentioned this issue Jun 29, 2022
10 tasks
@crodriguezvega crodriguezvega moved this to Backlog in ibc-go Jun 29, 2022
@damiannolan damiannolan moved this from Backlog to On hold in ibc-go Jul 21, 2022
@damiannolan
Copy link
Member Author

I'm going to start putting tests in place for this issue until we VerifyMembership and VerifyNonMembership merged into the feat branch

@crodriguezvega crodriguezvega moved this from On hold to Todo in ibc-go Aug 19, 2022
@crodriguezvega crodriguezvega moved this to Todo in ibc-go Nov 1, 2022
@chatton chatton assigned chatton and unassigned damiannolan Mar 28, 2023
@charleenfei charleenfei moved this from Todo to In progress in ibc-go Mar 29, 2023
@damiannolan damiannolan moved this from In progress to In review in ibc-go Mar 31, 2023
@github-project-automation github-project-automation bot moved this from In review to Todo in ibc-go Mar 31, 2023
@damiannolan damiannolan moved this from Todo to Done in ibc-go Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants