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
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion e2e/tests/session.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Feature: Session Namespace
# The timeout for when a claim can be submitted on-chain depends on `createClaimWindowStartHeight`, which
# is a function of `SessionGracePeriod`. The higher this value, the higher this timeout needs to be. Since
# this test is not dependant on the grace period, setting it to 0 and having a lower grace period will simplify it.
And the user should wait for "7" seconds
And the user should wait for "10" seconds
red-0ne marked this conversation as resolved.
Show resolved Hide resolved
Then the claim created by supplier "supplier1" for service "svc1" for application "app1" should be persisted on-chain
# TODO_IMPROVE: And an event should be emitted...
And after the supplier submits a proof for the session for service "svc1" for application "app1"
Expand Down
2 changes: 2 additions & 0 deletions testutil/keeper/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ func ProofKeeper(
log.NewNopLogger(),
authority.String(),
mockSessionKeeper,
nil,
red-0ne marked this conversation as resolved.
Show resolved Hide resolved
nil,
)

ctx := sdk.NewContext(stateStore, cmtproto.Header{}, false, log.NewNopLogger())
Expand Down
10 changes: 8 additions & 2 deletions x/proof/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ type (
// should be the x/gov module account.
authority string

sessionKeeper types.SessionKeeper
sessionKeeper types.SessionKeeper
applicationKeeper types.ApplicationKeeper
accountKeeper types.AccountKeeper
}
)

Expand All @@ -32,6 +34,8 @@ func NewKeeper(
authority string,

sessionKeeper types.SessionKeeper,
applicationKeeper types.ApplicationKeeper,
accountKeeper types.AccountKeeper,
) Keeper {
if _, err := sdk.AccAddressFromBech32(authority); err != nil {
panic(fmt.Sprintf("invalid authority address: %s", authority))
Expand All @@ -43,7 +47,9 @@ func NewKeeper(
authority: authority,
logger: logger,

sessionKeeper: sessionKeeper,
sessionKeeper: sessionKeeper,
applicationKeeper: applicationKeeper,
accountKeeper: accountKeeper,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can directly import the auth (not authz) module like the session module here same with the pubkey client as they are part of the same keeper - add this to app.go and keeper declaration

}
}

Expand Down
Loading
Loading