Skip to content

Commit

Permalink
use VerifyMembershipProof function name until #6775
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez committed Jul 8, 2024
1 parent c0ad6c4 commit f374ea4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions modules/core/02-client/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions modules/core/03-connection/keeper/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion modules/core/03-connection/types/expected_keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f374ea4

Please sign in to comment.