Switch IAVL Store query to use ics proofs (#6324)
* switch iavl store to use ics proof * fix proofs to return for correct height * appease linter * Register commitment op correctly * Make CommitmentOp generic over all ics23 specs (#6331) * Make the CommitmentOp generic over all ics23 ProofSpecs, using Type to distinguish * Register SimpleMerkle ics23 proof op as well * Addressed linter issues * move commitment proof to types * Apply suggestions from code review Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com> * address review comments: * Apply suggestions from code review Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> * allow proofs against empty store * address review comments * Update store/types/proof.go Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> * add changelog Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com> Co-authored-by: colin axner <25233464+colin-axner@users.noreply.github.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
co-authored by
colin axner
Federico Kunze
Alexander Bezobchuk
Ethan Frey
Marko
parent
65ea305336
commit
d9e1497e89
@@ -1,8 +1,9 @@
|
||||
package rootmulti
|
||||
|
||||
import (
|
||||
"github.com/tendermint/iavl"
|
||||
"github.com/tendermint/tendermint/crypto/merkle"
|
||||
|
||||
storetypes "github.com/cosmos/cosmos-sdk/store/types"
|
||||
)
|
||||
|
||||
// RequireProof returns whether proof is required for the subpath.
|
||||
@@ -21,7 +22,7 @@ func RequireProof(subpath string) bool {
|
||||
func DefaultProofRuntime() (prt *merkle.ProofRuntime) {
|
||||
prt = merkle.NewProofRuntime()
|
||||
prt.RegisterOpDecoder(merkle.ProofOpSimpleValue, merkle.SimpleValueOpDecoder)
|
||||
prt.RegisterOpDecoder(iavl.ProofOpIAVLValue, iavl.ValueOpDecoder)
|
||||
prt.RegisterOpDecoder(iavl.ProofOpIAVLAbsence, iavl.AbsenceOpDecoder)
|
||||
prt.RegisterOpDecoder(storetypes.ProofOpIAVLCommitment, storetypes.CommitmentOpDecoder)
|
||||
prt.RegisterOpDecoder(storetypes.ProofOpSimpleMerkleCommitment, storetypes.CommitmentOpDecoder)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user