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

[Session] Add support for GetSession via the CLI + deps #123

Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b2c94aa
Beginning work on CLI getSession
Olshansk Nov 1, 2023
68ded80
Updated the Makefile and replace [] & <> for POSIX consistency
Olshansk Nov 1, 2023
66a328a
Snapshot - progressing on tests
Olshansk Nov 1, 2023
9a24b12
Fixed the hydration tests
Olshansk Nov 1, 2023
45dd78a
Fixed more hydration tests
Olshansk Nov 1, 2023
d306302
Improve CLI tests
Olshansk Nov 1, 2023
4725df9
Added more request validation
Olshansk Nov 1, 2023
d548105
Merge branch 'main' into issues/15/implement_get_session_cli
Olshansk Nov 1, 2023
0c4bfc3
Merge branch 'main' into issues/15/implement_get_session_cli
Olshansk Nov 1, 2023
3c539c0
All tests passing
Olshansk Nov 1, 2023
12dd5f2
Completed self review
Olshansk Nov 1, 2023
5ed793a
Tiny nits after recording video
Olshansk Nov 1, 2023
8b4a7ea
Merge branch 'main' into issues/15/implement_get_session_cli
Olshansk Nov 2, 2023
e00d389
Merge with main
Olshansk Nov 2, 2023
cab5395
Fix issues after merge with main
Olshansk Nov 2, 2023
5b675c8
Don't hard-code addresses
Olshansk Nov 2, 2023
736291b
Merge branch 'main' into issues/15/implement_get_session_cli
Olshansk Nov 3, 2023
0e99b08
Follow up on a few of Bryan's comments
Olshansk Nov 3, 2023
109f09a
Ran goimports -w app/app.go
Olshansk Nov 6, 2023
d5d03cd
Merge branch 'main' into issues/15/implement_get_session_cli
Olshansk Nov 7, 2023
73d78db
Update Makefile
Olshansk Nov 7, 2023
04b9ce0
Update x/session/keeper/session_hydrator_test.go
Olshansk Nov 7, 2023
dc8a37d
Update x/shared/helpers/service_test.go
Olshansk Nov 7, 2023
2c940f4
[Miner] feat: add `TxClient` (#94)
bryanchriswhite Nov 7, 2023
9bf5508
[Off-chain] refactor: keyring errors & helpers (#131)
bryanchriswhite Nov 7, 2023
6ebb23b
[Miner] feat: add supplier client (#42)
bryanchriswhite Nov 7, 2023
e24489a
Reply to some review comments
Olshansk Nov 7, 2023
b312089
Rename session errors
Olshansk Nov 7, 2023
bc92251
Add back miss &&
Olshansk Nov 7, 2023
f4c37da
Fixed a few failing tests
Olshansk Nov 7, 2023
9245065
Merge with issues/140/rename_serviceid_to_service
Olshansk Nov 7, 2023
44ef893
Fix all the remaining test
Olshansk Nov 7, 2023
4990027
Merge branch 'issues/140/rename_serviceid_to_service' into issues/15/…
Olshansk Nov 7, 2023
2525c87
Fix last failing test
Olshansk Nov 7, 2023
823262a
[Service] Rename the `ServiceId` proto to `Service` (#150)
Olshansk Nov 8, 2023
a70bbbb
Merge with main
Olshansk Nov 8, 2023
dd17f66
Fixing tests
Olshansk Nov 8, 2023
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
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,26 @@ supplier2_unstake: ## Unstake supplier2
supplier3_unstake: ## Unstake supplier3
SUPPLIER=supplier3 make supplier_unstake

###############
### Session ###
###############

.PHONY: get_session
get_session: ## Retrieve the session given the following env vars: (APP_ADDR, SVC, HEIGHT)
pocketd --home=$(POCKETD_HOME) q session get-session $(APP) $(SVC) $(HEIGHT) --node $(POCKE T_NODE)

.PHONY: get_session_app1_anvil
get_session_app1_anvil: ## Retrieve the session for (app1, anvil, latest_height)
APP=pokt1mrqt5f7qh8uxs27cjm9t7v9e74a9vvdnq5jva4 SVC=anvil HEIGHT=0 make get_session
Olshansk marked this conversation as resolved.
Show resolved Hide resolved

.PHONY: get_session_app2_anvil
get_session_app2_anvil: ## Retrieve the session for (app2, anvil, latest_height)
APP=pokt184zvylazwu4queyzpl0gyz9yf5yxm2kdhh9hpm SVC=anvil HEIGHT=0 make get_session

.PHONY: get_session_app3_anvil
get_session_app3_anvil: ## Retrieve the session for (app3, anvil, latest_height)
APP=pokt1lqyu4v88vp8tzc86eaqr4lq8rwhssyn6rfwzex SVC=anvil HEIGHT=0 make get_session

################
### Accounts ###
################
Expand Down
23 changes: 11 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"io"
"os"
"path/filepath"

// this line is used by starport scaffolding # stargate/app/moduleImport

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
Expand Down Expand Up @@ -575,17 +574,6 @@ func New(
)
serviceModule := servicemodule.NewAppModule(appCodec, app.ServiceKeeper, app.AccountKeeper, app.BankKeeper)

app.SessionKeeper = *sessionmodulekeeper.NewKeeper(
appCodec,
keys[sessionmoduletypes.StoreKey],
keys[sessionmoduletypes.MemStoreKey],
app.GetSubspace(sessionmoduletypes.ModuleName),

app.ApplicationKeeper,
app.SupplierKeeper,
)
sessionModule := sessionmodule.NewAppModule(appCodec, app.SessionKeeper, app.AccountKeeper, app.BankKeeper)

app.SupplierKeeper = *suppliermodulekeeper.NewKeeper(
appCodec,
keys[suppliermoduletypes.StoreKey],
Expand Down Expand Up @@ -618,6 +606,17 @@ func New(
)
applicationModule := applicationmodule.NewAppModule(appCodec, app.ApplicationKeeper, app.AccountKeeper, app.BankKeeper)

app.SessionKeeper = *sessionmodulekeeper.NewKeeper(
appCodec,
keys[sessionmoduletypes.StoreKey],
keys[sessionmoduletypes.MemStoreKey],
app.GetSubspace(sessionmoduletypes.ModuleName),

app.ApplicationKeeper,
app.SupplierKeeper,
)
sessionModule := sessionmodule.NewAppModule(appCodec, app.SessionKeeper, app.AccountKeeper, app.BankKeeper)

// this line is used by starport scaffolding # stargate/app/keeperDefinition

/**** IBC Routing ****/
Expand Down
Loading