context: remove verifier & trust node (#6805)

* remove verifier

* more removal of trustnode flag

* add todo

* fix lint

* remove file

* remove viper and add link to issue

* remve mention of trustnode
This commit is contained in:
Marko
2020-07-23 06:44:18 +00:00
committed by GitHub
parent e0a81d2cca
commit e6a56226a8
24 changed files with 17 additions and 303 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ This query returns the address that owns a particular name. The getter function
+ The function should first initialize a new [`Context`](../interfaces/query-lifecycle.md#context) with the application `codec`.
+ If applicable, the `Context` is used to retrieve any parameters (e.g. the query originator's address to be used in the query) and marshal them with the query parameter type, in preparation to be relayed to a node. There are no `Context` parameters in this case because the query does not involve any information about the user.
+ The `queryRoute` is used to construct a `path` [`baseapp`](../core/baseapp.md) will use to route the query to the appropriate [querier](./querier.md). The expected format for a query `path` is "queryCategory/queryRoute/queryType/arg1/arg2/...", where `queryCategory` can be `p2p`, `store`, `app`, or `custom`, `queryRoute` is the name of the module, and `queryType` is the name of the query type defined within the module. [`baseapp`](../core/baseapp.md) can handle each type of `queryCategory` by routing it to a module querier or retrieving results directly from stores and functions for querying peer nodes. Module queries are `custom` type queries (some SDK modules have exceptions, such as `auth` and `gov` module queries).
+ The `Context` `QueryWithData()` function is used to relay the query to a node and retrieve the response. It requires the `path`. It returns the result and height of the query upon success or an error if the query fails. In addition, it will verify the returned proof if `TrustNode` is disabled. If proof verification fails or the query height is invalid, an error will be returned.
+ The `Context` `QueryWithData()` function is used to relay the query to a node and retrieve the response. It requires the `path`. It returns the result and height of the query upon success or an error if the query fails.
+ The `codec` is used to nmarshal the response and the `Context` is used to print the output back to the user.
- **Flags.** Add any [flags](#flags) to the command.