From f374ea496467136f406ca32b02409ce6dd3c6e81 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Mon, 8 Jul 2024 09:55:58 +0200 Subject: [PATCH] use VerifyMembershipProof function name until https://github.com/cosmos/ibc-go/issues/6775 --- modules/core/02-client/keeper/keeper.go | 4 ++-- modules/core/03-connection/keeper/verify.go | 18 +++++++++--------- .../03-connection/types/expected_keepers.go | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/core/02-client/keeper/keeper.go b/modules/core/02-client/keeper/keeper.go index f18cbf186a7..85d656a8e14 100644 --- a/modules/core/02-client/keeper/keeper.go +++ b/modules/core/02-client/keeper/keeper.go @@ -318,8 +318,8 @@ func (k *Keeper) ValidateSelfClient(ctx sdk.Context, clientState exported.Client return k.consensusHost.ValidateSelfClient(ctx, clientState) } -// VerifyMembershipp retrieves the light client module for the clientID and verifies the proof of the existence of a key-value pair at a specified height. -func (k *Keeper) VerifyMembershipp(ctx sdk.Context, clientID string, height exported.Height, delayTimePeriod uint64, delayBlockPeriod uint64, proof []byte, path exported.Path, value []byte) error { +// VerifyMembershipProof retrieves the light client module for the clientID and verifies the proof of the existence of a key-value pair at a specified height. +func (k *Keeper) VerifyMembershipProof(ctx sdk.Context, clientID string, height exported.Height, delayTimePeriod uint64, delayBlockPeriod uint64, proof []byte, path exported.Path, value []byte) error { clientModule, err := k.getLightClientModule(ctx, clientID) if err != nil { return err diff --git a/modules/core/03-connection/keeper/verify.go b/modules/core/03-connection/keeper/verify.go index f371fe2680d..31d7fb32bb7 100644 --- a/modules/core/03-connection/keeper/verify.go +++ b/modules/core/03-connection/keeper/verify.go @@ -40,7 +40,7 @@ func (k *Keeper) VerifyClientState( return err } - if err := k.clientKeeper.VerifyMembershipp( + if err := k.clientKeeper.VerifyMembershipProof( ctx, clientID, height, 0, 0, // skip delay period checks for non-packet processing verification proof, merklePath, bz, @@ -77,7 +77,7 @@ func (k *Keeper) VerifyClientConsensusState( return err } - if err := k.clientKeeper.VerifyMembershipp( + if err := k.clientKeeper.VerifyMembershipProof( ctx, clientID, height, 0, 0, // skip delay period checks for non-packet processing verification proof, merklePath, bz, @@ -114,7 +114,7 @@ func (k *Keeper) VerifyConnectionState( return err } - if err := k.clientKeeper.VerifyMembershipp( + if err := k.clientKeeper.VerifyMembershipProof( ctx, clientID, height, 0, 0, // skip delay period checks for non-packet processing verification proof, merklePath, bz, @@ -152,7 +152,7 @@ func (k *Keeper) VerifyChannelState( return err } - if err := k.clientKeeper.VerifyMembershipp( + if err := k.clientKeeper.VerifyMembershipProof( ctx, clientID, height, 0, 0, // skip delay period checks for non-packet processing verification proof, merklePath, bz, @@ -190,7 +190,7 @@ func (k *Keeper) VerifyPacketCommitment( return err } - if err := k.clientKeeper.VerifyMembershipp( + if err := k.clientKeeper.VerifyMembershipProof( ctx, clientID, height, timeDelay, blockDelay, proof, merklePath, commitmentBytes, ); err != nil { return errorsmod.Wrapf(err, "failed packet commitment verification for client (%s)", clientID) @@ -226,7 +226,7 @@ func (k *Keeper) VerifyPacketAcknowledgement( return err } - if err := k.clientKeeper.VerifyMembershipp( + if err := k.clientKeeper.VerifyMembershipProof( ctx, clientID, height, timeDelay, blockDelay, proof, merklePath, channeltypes.CommitAcknowledgement(acknowledgement), ); err != nil { @@ -298,7 +298,7 @@ func (k *Keeper) VerifyNextSequenceRecv( return err } - if err := k.clientKeeper.VerifyMembershipp( + if err := k.clientKeeper.VerifyMembershipProof( ctx, clientID, height, timeDelay, blockDelay, proof, merklePath, sdk.Uint64ToBigEndian(nextSequenceRecv), @@ -335,7 +335,7 @@ func (k *Keeper) VerifyChannelUpgradeError( return err } - if err := k.clientKeeper.VerifyMembershipp( + if err := k.clientKeeper.VerifyMembershipProof( ctx, clientID, height, 0, 0, // skip delay period checks for non-packet processing verification proof, merklePath, bz, @@ -372,7 +372,7 @@ func (k *Keeper) VerifyChannelUpgrade( return err } - if err := k.clientKeeper.VerifyMembershipp( + if err := k.clientKeeper.VerifyMembershipProof( ctx, clientID, proofHeight, 0, 0, // skip delay period checks for non-packet processing verification upgradeProof, merklePath, bz, diff --git a/modules/core/03-connection/types/expected_keepers.go b/modules/core/03-connection/types/expected_keepers.go index cce56163847..f216814e24d 100644 --- a/modules/core/03-connection/types/expected_keepers.go +++ b/modules/core/03-connection/types/expected_keepers.go @@ -16,7 +16,7 @@ type ClientKeeper interface { GetClientConsensusState(ctx sdk.Context, clientID string, height exported.Height) (exported.ConsensusState, bool) GetSelfConsensusState(ctx sdk.Context, height exported.Height) (exported.ConsensusState, error) ValidateSelfClient(ctx sdk.Context, clientState exported.ClientState) error - VerifyMembershipp(ctx sdk.Context, clientID string, height exported.Height, delayTimePeriod uint64, delayBlockPeriod uint64, proof []byte, path exported.Path, value []byte) error + VerifyMembershipProof(ctx sdk.Context, clientID string, height exported.Height, delayTimePeriod uint64, delayBlockPeriod uint64, proof []byte, path exported.Path, value []byte) error VerifyNonMembership(ctx sdk.Context, clientID string, height exported.Height, delayTimePeriod uint64, delayBlockPeriod uint64, proof []byte, path exported.Path) error IterateClientStates(ctx sdk.Context, prefix []byte, cb func(string, exported.ClientState) bool) ClientStore(ctx sdk.Context, clientID string) storetypes.KVStore