-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Session] Implement the 1st iteration of the SessionHydrator (#78)
Add support for: - Storing `ServiceConfigs` in the `Application` store - Storing `ServiceConfigs` in the `Supplier` store - Business logic for `GetSession` and the underlying `SessionHydrator` Not adding support for: - Staking/unstaking `Service(s)` for `Application` / `Supplier` - Using the proper (prior) `BlockHash` for session generation - The `cliContext` required to retrieve a `Session` See #78 for more details ---- Co-authored-by: Bryan White <[email protected]> Co-authored-by: Redouane Lakrache <[email protected]> Co-authored-by: red-0ne <[email protected]> Co-authored-by: Daniel Olshansky <[email protected]> Co-authored-by: harry <[email protected]>
- Loading branch information
1 parent
14593da
commit d7d87eb
Showing
27 changed files
with
2,425 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,48 @@ | ||
syntax = "proto3"; | ||
|
||
package pocket.session; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
|
||
import "pocket/session/params.proto"; | ||
import "pocket/session/session.proto"; | ||
import "pocket/shared/service.proto"; | ||
|
||
option go_package = "pocket/x/session/types"; | ||
|
||
// Query defines the gRPC querier service. | ||
service Query { | ||
|
||
// Parameters queries the parameters of the module. | ||
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { | ||
option (google.api.http).get = "/pocket/session/params"; | ||
|
||
} | ||
|
||
// Queries a list of GetSession items. | ||
rpc GetSession (QueryGetSessionRequest) returns (QueryGetSessionResponse) { | ||
option (google.api.http).get = "/pocket/session/get_session"; | ||
|
||
} | ||
} | ||
// QueryParamsRequest is request type for the Query/Params RPC method. | ||
message QueryParamsRequest {} | ||
|
||
// QueryParamsResponse is response type for the Query/Params RPC method. | ||
message QueryParamsResponse { | ||
|
||
// params holds all the parameters of this module. | ||
Params params = 1 [(gogoproto.nullable) = false]; | ||
} | ||
|
||
message QueryGetSessionRequest {} | ||
message QueryGetSessionRequest { | ||
string application_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the application using cosmos' ScalarDescriptor to ensure deterministic encoding | ||
shared.ServiceId service_id = 2; // The service id to query the session for | ||
int64 block_height = 3; // The block height to query the session for | ||
} | ||
|
||
message QueryGetSessionResponse {} | ||
message QueryGetSessionResponse { | ||
session.Session session = 1; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.