M. J. Fromberger
db690c3b68
rpc: fix hash encoding in JSON parameters ( #6813 )
The responses from node RPCs encode hash values as hexadecimal strings. This
behaviour is stipulated in our OpenAPI documentation. In some cases, however,
hashes received as JSON parameters were being decoded as byte buffers, as is
the convention for JSON.
This resulted in the confusing situation that a hash reported by one request
(e.g., broadcast_tx_commit) could not be passed as a parameter to another
(e.g., tx) via JSON, without translating the hex-encoded output hash into the
base64 encoding used by JSON for opaque bytes.
Fixes #6802 .
3 years ago
Sam Kleinman
d56a44b884
node: minimize hardcoded service initialization ( #6798 )
* node: minimize hardcoded service initialization
* hacking
* nil safety
* reduce space
* remove genesis state store
* fix lint
* fix pex
* unwind some odering effects
* fix tests
* remove unused experiment
3 years ago
Sam Kleinman
886519e3ca
rpc: add subscription id to events ( #6386 )
Addresses #3931
4 years ago
Sam Kleinman
663c0bba9c
rpc: decouple test fixtures from node implementation ( #6533 )
4 years ago
Sam Kleinman
d9134063e7
rpc: add chunked rpc interface ( #6445 )
4 years ago
Sam Kleinman
0b0914b3df
rpc: remove global environment ( #6426 )
4 years ago
Aleksandr Bezobchuk
003f394512
rpc: index block events to support block event queries ( #6226 )
4 years ago
Callum Waters
162f67cf26
correct spelling to US english ( #6077 )
4 years ago
Anton Kaliaev
85a4be87a7
rpc/client: take context as first param ( #5347 )
Closes #5145
also applies to light/client
4 years ago
Marko
0ed8dba991
lint: enable errcheck ( #5336 )
## Description
Enable errcheck linter throughout the codebase
Closes : #5059
4 years ago
Marko
b6a5f7b126
rpc: add private & unconditional to /dial_peer ( #5293 )
## Description
Allow dialing of private and unconditional peers through the RPC
Closes : #1705
4 years ago
Anton Kaliaev
257a374b78
rpc: add /check_tx endpoint ( #5017 )
Closes #4549
5 years ago
Anton Kaliaev
ce3c9c2341
rpc/core: return an error if `page=0` ( #4947 )
* rpc/core: return an error if `page=0`
Closes #4942
affected endpoints:
- /validators
- /tx_search
* swagger: update doc for /unconfirmed_txs
5 years ago
Federico Kunze
da924fc62d
rpc: add BlockByHash to Client ( #4923 )
Ethermint currently has to maintain a map height-> block hash on the store (see here) as it needs to expose the eth_getBlockByHash JSON-RPC query for Web3 compatibility. This query is currently not supported by the tendermint RPC client.
5 years ago
Anton Kaliaev
a14ff5cb30
rpc: refactor lib folder ( #4836 )
Closes https://github.com/tendermint/tendermint/issues/3857
Moves `lib/` folder to `jsonrpc/`.
Renames:
**packages**
`rpc` package -> `jsonrpc` package
`rpcclient` package -> `client` package
`rpcserver` package -> `server` package
**structs and interfaces**
```
JSONRPCClient to Client
JSONRPCRequestBatch to RequestBatch
JSONRPCCaller to Caller
```
**functions**
```
StartHTTPServer to Serve
StartHTTPAndTLSServer to ServeTLS
rpc/jsonrpc/client: rename NewURIClient to NewURI
NewJSONRPCClient to New
NewJSONRPCClientWithHTTPClient to NewWithHTTPClient
NewWSClient to NewWS
```
**misc**
- unexpose `ResponseWriterWrapper`
- remove unused http_params.go
5 years ago
Anton Kaliaev
b7b721c484
change use of errors.Wrap to fmt.Errorf with %w verb
Closes #4603
Commands used (VIM):
```
:args `rg -l errors.Wrap`
:argdo normal @q | update
```
where q is a macros rewriting the `errors.Wrap` to `fmt.Errorf`.
5 years ago
Erik Grinaker
fdf9c7ae64
rpc/client: split out client packages ( #4628 )
* rpc/client: initial split into directories
* lite2: split out test package
* rpc/client: simplify client constructurs
* updated docs
* updated changelog
5 years ago
Ethan Frey
931af6a072
Combine local and http into client package, unify tests with table-driven tests
8 years ago
Ethan Frey
cd9ee9d84b
cleanup
8 years ago
Ethan Frey
26f4b5c98e
Clean up package names
8 years ago
Ethan Frey
ce044dbb76
Extracted Clients into a consistent interface, fixed type issue in http.Client
8 years ago
Ethan Frey
7c26be3242
Begin implementation of local client
8 years ago