From 18d216ebd340c2420b98e0075fc071394e354c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:41:52 +0200 Subject: [PATCH 1/3] refactor: remove fn's --- modules/core/23-commitment/types/merkle.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/modules/core/23-commitment/types/merkle.go b/modules/core/23-commitment/types/merkle.go index 319e3ea5b8b..7ebc6bcbde6 100644 --- a/modules/core/23-commitment/types/merkle.go +++ b/modules/core/23-commitment/types/merkle.go @@ -10,7 +10,7 @@ import ( cmtcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" - "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types/v2" + v2 "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types/v2" "github.com/cosmos/ibc-go/v9/modules/core/exported" ) @@ -156,18 +156,6 @@ func (proof MerkleProof) VerifyNonMembership(specs []*ics23.ProofSpec, root expo return nil } -// BatchVerifyMembership verifies a group of key value pairs against the given root -// NOTE: Currently left unimplemented as it is unused -func (MerkleProof) BatchVerifyMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, items map[string][]byte) error { - return errorsmod.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") -} - -// BatchVerifyNonMembership verifies absence of a group of keys against the given root -// NOTE: Currently left unimplemented as it is unused -func (MerkleProof) BatchVerifyNonMembership(specs []*ics23.ProofSpec, root exported.Root, path exported.Path, items [][]byte) error { - return errorsmod.Wrap(ErrInvalidProof, "batch proofs are currently unsupported") -} - // verifyChainedMembershipProof takes a list of proofs and specs and verifies each proof sequentially ensuring that the value is committed to // by first proof and each subsequent subroot is committed to by the next subroot and checking that the final calculated root is equal to the given roothash. // The proofs and specs are passed in from lowest subtree to the highest subtree, but the keys are passed in from highest subtree to lowest. From 42a11301c3ab4d077f78262f9303214e0856e8f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?colin=20axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:43:55 +0200 Subject: [PATCH 2/3] Update modules/core/23-commitment/types/merkle.go --- modules/core/23-commitment/types/merkle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/23-commitment/types/merkle.go b/modules/core/23-commitment/types/merkle.go index 7ebc6bcbde6..6015ee62dbe 100644 --- a/modules/core/23-commitment/types/merkle.go +++ b/modules/core/23-commitment/types/merkle.go @@ -10,7 +10,7 @@ import ( cmtcrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" - v2 "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types/v2" + "github.com/cosmos/ibc-go/v9/modules/core/23-commitment/types/v2" "github.com/cosmos/ibc-go/v9/modules/core/exported" ) From 40daf07982ad4535e850cf049e6aef6c412a12ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Axn=C3=A9r?= <25233464+colin-axner@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:44:35 +0200 Subject: [PATCH 3/3] chore: CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e68c1a222da..114fdb24008 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (apps/transfer) [\#7239](https://github.com/cosmos/ibc-go/pull/7239) The following functions have been removed: `BindPort`, `AuthenticateCapability`, `ClaimCapability` * (capability) [\#7279](https://github.com/cosmos/ibc-go/pull/7279) The module `capability` has been removed. * (testing) [\#7305](https://github.com/cosmos/ibc-go/pull/7305) Added `TrustedValidators` map to `TestChain`. This removes the dependency on the `x/staking` module for retrieving trusted validator sets at a given height, and removes the `GetTrustedValidators` method from the `TestChain` struct. +* (23-commitment) [\#7486](https://github.com/cosmos/ibc-go/pull/7486) Remove unimplemented `BatchVerifyMembership` and `BatchVerifyNonMembership` functions ### State Machine Breaking