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

[Proof] Relay signature & Merkle proof validation #406

Merged
merged 27 commits into from
Mar 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
61c8dc8
feat: Implement proof's smt and signature validations
red-0ne Mar 1, 2024
6239e74
[Proof] refactor: ring client for on-chain use (#411)
bryanchriswhite Mar 5, 2024
835889e
refactor: make session comparaison more generic
red-0ne Mar 6, 2024
a01cb26
chore: add comments
red-0ne Mar 6, 2024
8a91394
Merge branch 'main' into feat/proof-validation
bryanchriswhite Mar 7, 2024
0b82243
[PubKeyClient] Implement PubKeyClient for on/off-chain usage (#413)
red-0ne Mar 7, 2024
74e7a09
chore: Address review change requests
red-0ne Mar 7, 2024
e4484be
chore: Update keeper query clients in-code documentation
red-0ne Mar 8, 2024
3f277e7
chore: Add godoc comments
red-0ne Mar 8, 2024
2d5af98
fix: test error msg assertion
red-0ne Mar 11, 2024
4bf0b9f
chore: Address review change requests
red-0ne Mar 13, 2024
75db907
chore: Add missing change requests
red-0ne Mar 13, 2024
f7f28bf
Merge remote-tracking branch 'origin/main' into feat/proof-validation
red-0ne Mar 13, 2024
3357fea
chore: Remove pubkey client
red-0ne Mar 14, 2024
f90ca76
chore: Fix unit tests and ring client removal consideration
red-0ne Mar 14, 2024
46c61dd
Offline review of 406
Olshansk Mar 19, 2024
14638bd
fix: Make relay req/res meta a non-pointer
red-0ne Mar 19, 2024
ab43ea7
fix: Restore bank expected keeper
red-0ne Mar 20, 2024
298e7ad
chore: Update SMT dependency
red-0ne Mar 21, 2024
19ae70f
A couple more nits
Olshansk Mar 21, 2024
7be1fe4
Merge branch 'main' into feat/proof-validation
Olshansk Mar 21, 2024
ac91121
Removed accidental period
Olshansk Mar 21, 2024
25295d3
Fixing unit tests
Olshansk Mar 21, 2024
e09e719
Fix impors after debugging
Olshansk Mar 21, 2024
6df5967
Empty commit
Olshansk Mar 21, 2024
b103308
Minor e2e test fix
Olshansk Mar 21, 2024
ce194fa
Merge branch 'main' into feat/proof-validation
Olshansk Mar 21, 2024
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
chore: Update keeper query clients in-code documentation
red-0ne committed Mar 8, 2024
commit e4484bee31a80761f0b60a3d42653d1b78caf858
5 changes: 5 additions & 0 deletions pkg/crypto/rings/client.go
Original file line number Diff line number Diff line change
@@ -18,6 +18,11 @@ import (

var _ crypto.RingClient = (*ringClient)(nil)

// ringClient is an implementation of the RingClient interface that uses the
// client.ApplicationQueryClient to get applications delegation information and
// needed to construct the ring for signing relay requests.
red-0ne marked this conversation as resolved.
Show resolved Hide resolved
// It also uses the pubkeyclient.PubKeyClient to get the public keys for the
// addresses in the ring.
red-0ne marked this conversation as resolved.
Show resolved Hide resolved
type ringClient struct {
// logger is the logger for the ring cache.
logger polylog.Logger
5 changes: 5 additions & 0 deletions x/proof/types/account_query_client.go
Original file line number Diff line number Diff line change
@@ -17,6 +17,11 @@ type AccountKeeperQueryClient struct {

// NewAccountKeeperQueryClient returns a new AccountQueryClient that is backed
// by an AccountKeeper instance.
// It is used by the PubKeyClient to get the public key that corresponds to the
// provided address.
// This implementation is a thin wrapper around the AccountKeeper and does
// not rely on the QueryClient contrariwise to the off-chain implementation.
// It should be injected into the PubKeyClient when initialized from within the a keeper.
func NewAccountKeeperQueryClient(accountKeeper AccountKeeper) client.AccountQueryClient {
red-0ne marked this conversation as resolved.
Show resolved Hide resolved
return &AccountKeeperQueryClient{keeper: accountKeeper}
}
6 changes: 6 additions & 0 deletions x/proof/types/application_query_client.go
Original file line number Diff line number Diff line change
@@ -15,10 +15,16 @@ type AppKeeperQueryClient struct {

// NewAppKeeperQueryClient returns a new ApplicationQueryClient that is backed
// by an ApplicationKeeper instance.
// It is used by the RingClient to get the applications that are delegated to
red-0ne marked this conversation as resolved.
Show resolved Hide resolved
// by a given application.
red-0ne marked this conversation as resolved.
Show resolved Hide resolved
// This implementation is a thin wrapper around the ApplicationKeeper and does
// not rely on the QueryClient contrariwise to the off-chain implementation.
// It should be injected into the RingClient when initialized from within the a keeper.
func NewAppKeeperQueryClient(appKeeper ApplicationKeeper) client.ApplicationQueryClient {
red-0ne marked this conversation as resolved.
Show resolved Hide resolved
return &AppKeeperQueryClient{keeper: appKeeper}
}

// GetApplication returns the application corresponding to the given address.
func (appQueryClient *AppKeeperQueryClient) GetApplication(
ctx context.Context,
appAddr string,