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

Feat: state verifier #766

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more tests
pr0n00gler committed Nov 14, 2024
commit 3ecc8ee45ce361a6cf72b549b123eae1cc60d1e2
21 changes: 21 additions & 0 deletions x/state-verifier/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -111,9 +111,30 @@
Proof: resp.ProofOps,
Value: resp.Value,
StoragePrefix: ibchost.StoreKey,
}}, resp.Height - 2, fmt.Errorf("Please ensure proof was submitted with correct proofHeight and to the correct chain.")

Check failure on line 114 in x/state-verifier/keeper/keeper_test.go

GitHub Actions / lint

error-strings: error strings should not be capitalized or end with punctuation or a newline (revive)
},
},
{
name: "invalid storage prefix",
malleate: func(sender string, ctx sdk.Context) ([]*iqtypes.StorageValue, int64, error) {
clientKey := host.FullClientStateKey(suite.Path.EndpointA.ClientID)

resp, err := suite.ChainA.App.Query(ctx, &types.RequestQuery{
Path: fmt.Sprintf("store/%s/key", ibchost.StoreKey),
Height: suite.ChainA.LastHeader.Header.Height - 1,
Data: clientKey,
Prove: true,
})
suite.Require().NoError(err)

return []*iqtypes.StorageValue{{
Key: resp.Key,
Proof: resp.ProofOps,
Value: resp.Value,
StoragePrefix: "kekekek",
}}, resp.Height, fmt.Errorf("Please ensure the path and value are both correct.")

Check failure on line 135 in x/state-verifier/keeper/keeper_test.go

GitHub Actions / lint

error-strings: error strings should not be capitalized or end with punctuation or a newline (revive)
},
},
}

for i, tc := range tests {