[Session] Add support for GetSession
via the CLI + deps
#163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Human Summary
GetSession
GetSession
[]
with<>
in all CLI functions to differentiate required vs optional paramsSessionHydrator
(and added tests) to account additional error casesScreen.Recording.2023-11-01.at.4.49.33.PM.mov
AI Summary
Summary generated by Reviewpad on 08 Nov 23 20:55 UTC
This pull request includes the following changes:
In the file
query_application.go
, the commandshow-application
now requires an argument<application_address>
instead of[address]
.In the file
query_supplier.go
, theCmdShowSupplier
function'sUse
field has been updated from"show-supplier [address]"
to"show-supplier <supplier_address>"
. This change modifies the command usage pattern by replacing the optional[address]
argument with the required<supplier_address>
argument.The file "go.sum" includes the addition of new dependencies: "github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a", "github.com/gogo/status v1.1.1", "google.golang.org/genproto v0.0.0-20180518175338-11a468237815", and "google.golang.org/grpc v1.12.0".
The file
session.go
in thetestutil/keeper
package has the following changes:TestServiceId1
andTestServiceId2
have been updated, and new variablesTestServiceId11
andTestServiceId22
have been added.TestServiceId12
has been added.TestApp1Address
andTestApp2Address
have been updated.TestApp1
andTestApp2
have been updated.TestSupplier1
andTestSupplier2
have been updated.In the file
session_hydrator.go
, the following changes are made:github.com/pokt-network/poktroll/x/shared/helpers
has been added.types.ErrSessionHydration
,types.ErrSessionAppNotFound
,types.ErrSessionAppNotStakedForService
, andtypes.ErrSessionSuppliersNotFound
.The file diff includes the addition of the required module "github.com/gogo/status" with version v1.1.1.
In the file
tx_delegate_to_gateway.go
, the following changes are made:delegate-to-gateway
now requires a required argumentgateway_address
.gateway_address
argument.The file
Makefile
has several changes, mainly updating the targets to use thepoktrolld_addr
helper and adding new targets.The diff in the file "service.proto" includes changes to the comments and message fields. Only the comments have been modified, whereas the field names remain the same.
In the file
tx_stake_gateway.go
, the changes involve updates to theCmdStakeGateway
function, including changes to command usage, short description, and long description. Additionally, the import statements have been reorganized.The file
QueryGetSessionRequest
is a new file that introduces theQueryGetSessionRequest
type in thetypes
package. It also defines theNewQueryGetSessionRequest
constructor function and theValidateBasic
method for this type.In the file
query_get_session.go
, the changes include input validation for thereq
parameter and the use of the current block height if the block height is not specified. The session hydration function is called with the context and session hydrator.The file
service_test.go
has undergone changes related to service validation, including test case additions and the introduction of a dedicated function to validate service names.The file
helpers_test.go
has undergone changes related to test file setup, including additional import statements, initialization of the SDK configuration, and creation of network objects.In the file
x/session/keeper/query_get_session_test.go
, changes involve the addition of test cases and import statements.The changes in the file "service_test.go" suggest enhancements to test coverage and handling of more edge cases for the
IsValidService
function.The changes in the file
helpers_test.go
involve the addition and modification of import statements, declaration of a variable to avoid unused import error, initialization of the SDK configuration, and test file setup.Based on the file diff, changes were made to the
New
function, involving the removal and addition of code related to theSessionKeeper
.The changes in the file "tx_submit_proof.go" involve import statements, usage message updates, and code arrangement.
The file
network.go
has been modified to add a new item to theDefaultApplicationModuleGenesisState
function and to include a comment suggesting evaluation of the `nullify.FillIssue
Type of change
Select one or more:
Testing
make go_develop_and_test
Sanity Checklist